This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch,AVR] Print no-return functions as JMP
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Denis Chertykov <chertykov at gmail dot com>, Eric Weddington <eric dot weddington at atmel dot com>
- Date: Thu, 13 Oct 2011 21:00:41 +0200
- Subject: Re: [Patch,AVR] Print no-return functions as JMP
- References: <4E972AEF.1020802@gjlay.de> <4E97300E.3070901@redhat.com>
Richard Henderson schrieb:
> On 10/13/2011 11:16 AM, Georg-Johann Lay wrote:
>> This patch saves some ticks and bytes on stack by JUMPing to no-return
>> functions instead of CALLing them.
>>
>> Passes without regression.
>>
>> Ok for trunk?
>>
>> Johann
>>
>> * config/avr/avr-protos.h (avr_out_call): New prototype.
>> * config/avr/avr.md (adjust_len): Add alternative "call".
>> (call_insn, call_calue_insn): Use it. Use avr_out_call to print
>> assembler.
>> * config/avr/avr.c (avr_out_call): New function.
>> (adjust_insn_length): Handle ADJUST_LEN_CALL.
>
> You should have a way to turn this off. Otherwise this makes debugging
> the call to abort impossible.
>
> r~
What do you propose?
o A command line option that is on per default like
-mnoreturn-tail-calls or -mjmp-noreturn
o Hard-coded factor out some function names like "abort",
"exit", "_exit"
Johann