summaryrefslogtreecommitdiff
path: root/gcc/config/m32c/m32c.c
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-16 22:18:30 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2009-09-16 22:18:30 +0000
commitbd2fe2f170f478b53aebfe89a9de2bb8a1c83f50 (patch)
tree741c4169ead4eff9580b64c147fe6354cac9ea2d /gcc/config/m32c/m32c.c
parent4bae63f6999b9e6d68d47c2ba23978591c5bcccc (diff)
downloadgcc-bd2fe2f170f478b53aebfe89a9de2bb8a1c83f50.tar.gz
* config/m32c/m32c.c (m32c_emit_epilogue): Check for R8C or M16C
chip and ignore the "fast_interrupt" attribute if so. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151780 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m32c/m32c.c')
-rw-r--r--gcc/config/m32c/m32c.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c
index ae4c8973dea..1bf3d1bcb2f 100644
--- a/gcc/config/m32c/m32c.c
+++ b/gcc/config/m32c/m32c.c
@@ -4052,8 +4052,26 @@ m32c_emit_epilogue (void)
if (!bank_switch_p (cfun->decl) && cfun->machine->intr_pushm)
emit_insn (gen_popm (GEN_INT (cfun->machine->intr_pushm)));
+ /* The FREIT (Fast REturn from InTerrupt) instruction should be
+ generated only for M32C/M32CM targets (generate the REIT
+ instruction otherwise). */
if (fast_interrupt_p (cfun->decl))
- emit_jump_insn (gen_epilogue_freit ());
+ {
+ /* Check if fast_attribute is set for M32C or M32CM. */
+ if (TARGET_A24)
+ {
+ emit_jump_insn (gen_epilogue_freit ());
+ }
+ /* If fast_interrupt attribute is set for an R8C or M16C
+ target ignore this attribute and generated REIT
+ instruction. */
+ else
+ {
+ warning (OPT_Wattributes,
+ "%<fast_interrupt%> attribute directive ignored");
+ emit_jump_insn (gen_epilogue_reit_16 ());
+ }
+ }
else if (TARGET_A16)
emit_jump_insn (gen_epilogue_reit_16 ());
else