[Patch,AVR] Print no-return functions as JMP

Georg-Johann Lay avr@gjlay.de
Thu Oct 13 20:15:00 GMT 2011


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





More information about the Gcc-patches mailing list