summaryrefslogtreecommitdiffstats
path: root/gcc/config/m32c/m32c.c
diff options
context:
space:
mode:
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-19 20:37:11 +0000
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-19 20:37:11 +0000
commit5dfa0f5a500542eb08e559358b90a4bdbf4aaf4e (patch)
tree97515e749f5b4fd7edaa9e6f32c6622c08a7a6fa /gcc/config/m32c/m32c.c
parent7fbdfd9fe16486799658fe3750f13e6d419de1cf (diff)
downloadppe42-gcc-5dfa0f5a500542eb08e559358b90a4bdbf4aaf4e.tar.gz
ppe42-gcc-5dfa0f5a500542eb08e559358b90a4bdbf4aaf4e.zip
* config/m32c/m32c.c (m32c_emit_epilogue): Don't try to push
registers if we already know there aren't any. (m32c_emit_epilogue): Don't emit a barrier here. (m32c_emit_eh_epilogue): Likewise. * config/m32c/blkmov.md (movstr): Don't fail on wrong-type operands at expand time. * config/m32c/m32c.h (WCHAR_TYPE_SIZE): Change to 4 to match "long int" wchar type. (REG_CLASS_CONTENTS, reg_class, REG_CLASS_NAMES): Remove duplicates. Provide aliases instead. * config/m32c/prologue.md (eh_return): Emit a barrier here. (eh_epilogue): Add a "(return)" here as a hint to other parts of the compiler. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172735 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m32c/m32c.c')
-rw-r--r--gcc/config/m32c/m32c.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c
index 055f34e9320..c603770ad60 100644
--- a/gcc/config/m32c/m32c.c
+++ b/gcc/config/m32c/m32c.c
@@ -4485,11 +4485,14 @@ m32c_emit_prologue (void)
void
m32c_emit_epilogue (void)
{
+ int popm_count = m32c_pushm_popm (PP_justcount);
+
/* This just emits a comment into the .s file for debugging. */
- if (m32c_pushm_popm (PP_justcount) > 0 || cfun->machine->is_interrupt)
+ if (popm_count > 0 || cfun->machine->is_interrupt)
emit_insn (gen_epilogue_start ());
- m32c_pushm_popm (PP_popm);
+ if (popm_count > 0)
+ m32c_pushm_popm (PP_popm);
if (cfun->machine->is_interrupt)
{
@@ -4546,7 +4549,6 @@ m32c_emit_epilogue (void)
emit_jump_insn (gen_epilogue_exitd_16 ());
else
emit_jump_insn (gen_epilogue_exitd_24 ());
- emit_barrier ();
}
void
@@ -4558,7 +4560,6 @@ m32c_emit_eh_epilogue (rtx ret_addr)
assembler, so punt to libgcc. */
emit_jump_insn (gen_eh_epilogue (ret_addr, cfun->machine->eh_stack_adjust));
/* emit_clobber (gen_rtx_REG (HImode, R0L_REGNO)); */
- emit_barrier ();
}
/* Indicate which flags must be properly set for a given conditional. */
OpenPOWER on IntegriCloud