2012/5/7 Georg-Johann Lay <a...@gjlay.de>: > AVR-LibC switched from using either signal /or/ interrupt function > attribute to using both at the same time. > > This was never documented or implemented but worked accidentally for > some time, but results in wrong code for 4.7+ > > This patch adds better documentation of these attributes and makes > 'interrupt' silently override 'signal'. > > Besides that, some more sanity checking is done for function attributes. > > ASM_DECLARE_FUNCTION_NAME just served to check isr names. > All the checking is done in the new hook TARGET_SET_CURRENT_FUNCTION > now so that ASM_DECLARE_FUNCTION_NAME from defaults.h can be used, > thus some clean-up in elf.h > > Ok for trunk and 4.7? > > Johann > > PR target/53256 > * config/avr/elf.h (ASM_DECLARE_FUNCTION_NAME): Remove. > * config/avr/avr-protos.h (avr_asm_declare_function_name): Remove. > * config/avr/avr.h (struct machine_function): Add attributes_checked_p. > * config/avr/avr.c (avr_asm_declare_function_name): Remove. > (expand_prologue): Move initialization of cfun->machine->is_naked, > is_interrupt, is_signal, is_OS_task, is_OS_main from here to... > (avr_regs_to_save): Ditto. > (avr_set_current_function): ...this new static function. > (TARGET_SET_CURRENT_FUNCTION): New define. > (avr_function_ok_for_sibcall): Use cfun->machine->is_* instead of > checking attributes of current_function_decl. > (signal_function_p): Rename to avr_signal_function_p. > (interrupt_function_p): Rename to avr_interrupt_function_p. > > * doc/extend.texi (Function Attributes): Better explanation of > 'interrupt' and 'signal for AVR. Move 'ifunc' down for > alphabetical order. >
Approved. Denis.