1 diff -Naurp gcc/config/avr/avr.c gcc/config/avr/avr.c
2 --- gcc/config/avr/avr.c 2011-10-27 17:47:15.000000000 +0530
3 +++ gcc/config/avr/avr.c 2011-10-27 17:53:42.000000000 +0530
4 @@ -881,8 +881,9 @@ expand_prologue (void)
5 emit_move_insn (stack_pointer_rtx, frame_pointer_rtx);
7 else if ((!AVR_XMEGA && TARGET_NO_INTERRUPTS )
8 - || cfun->machine->is_signal
9 - || cfun->machine->is_OS_main)
10 + || (!AVR_XMEGA && cfun->machine->is_signal)
11 + || (!AVR_XMEGA && cfun->machine->is_OS_main)
12 + || (AVR_XMEGA && cfun->machine->is_nmi))
14 emit_insn (gen_movhi_sp_r_irq_off (stack_pointer_rtx,
16 @@ -1070,7 +1071,8 @@ expand_epilogue (void)
17 emit_move_insn (stack_pointer_rtx, frame_pointer_rtx);
19 else if ((!AVR_XMEGA && TARGET_NO_INTERRUPTS)
20 - || (!AVR_XMEGA && cfun->machine->is_signal))
21 + || (!AVR_XMEGA && cfun->machine->is_signal)
22 + || (AVR_XMEGA && cfun->machine->is_nmi))
24 emit_insn (gen_movhi_sp_r_irq_off (stack_pointer_rtx,
26 diff -Naurp gcc/function.c gcc/function.c
27 --- gcc/function.c 2011-10-27 17:19:51.000000000 +0530
28 +++ gcc/function.c 2011-10-27 17:53:42.000000000 +0530
29 @@ -5254,6 +5254,14 @@ contains (const_rtx insn, htab_t hash)
33 +prologue_contains (const_rtx insn)
35 + if (contains (insn, prologue_insn_hash))
41 prologue_epilogue_contains (const_rtx insn)
43 if (contains (insn, prologue_insn_hash))
44 diff -Naurp gcc/rtl.h gcc/rtl.h
45 --- gcc/rtl.h 2011-10-27 17:19:52.000000000 +0530
46 +++ gcc/rtl.h 2011-10-27 17:53:42.000000000 +0530
47 @@ -2402,6 +2402,7 @@ extern void print_inline_rtx (FILE *, co
50 extern void reposition_prologue_and_epilogue_notes (void);
51 +extern int prologue_contains (const_rtx);
52 extern int prologue_epilogue_contains (const_rtx);
53 extern int sibcall_epilogue_contains (const_rtx);
54 extern void mark_temp_addr_taken (rtx);