From f067961248ea104024f8b313ae39b3b95af1f8b5 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 19 Apr 2011 16:37:11 -0400 Subject: m32c.c (m32c_emit_epilogue): Don't try to push registers if we already know there aren't any. * 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. From-SVN: r172735 --- gcc/config/m32c/m32c.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gcc/config/m32c/m32c.c') diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 055f34e..c603770 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. */ -- cgit v1.1