From c112e233c5f47edebd653e743a8f7db3d682091f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 30 Jan 2000 12:27:57 -0800 Subject: [PATCH] alpha.c (alpha_expand_epilogue): Don't emit the return insn. * alpha.c (alpha_expand_epilogue): Don't emit the return insn. * alpha.h (EPILOGUE_USES): New. Mark $26 live. * alpha.md (return): Turn into an expander. (return_internal): Don't use $26. (epilogue): Emit the return insn. From-SVN: r31702 --- gcc/ChangeLog | 8 ++++++++ gcc/config/alpha/alpha.c | 3 --- gcc/config/alpha/alpha.h | 4 ++++ gcc/config/alpha/alpha.md | 16 ++++++---------- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8050ecd9e87..07875c83f02 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2000-01-30 Richard Henderson + + * alpha.c (alpha_expand_epilogue): Don't emit the return insn. + * alpha.h (EPILOGUE_USES): New. Mark $26 live. + * alpha.md (return): Turn into an expander. + (return_internal): Don't use $26. + (epilogue): Emit the return insn. + 2000-01-30 Richard Henderson * alpha.md (negtf2, abstf2): Fix word order thinko. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 6e4dddeb4f6..36f831d648c 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -4721,9 +4721,6 @@ alpha_expand_epilogue () gen_rtx_REG (DImode, vms_save_fp_regno))); } } - - /* Return. */ - emit_jump_insn (gen_return_internal ()); } /* Output the rest of the textual info surrounding the epilogue. */ diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index ad45596f0bb..1d64f37e4bd 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -1267,6 +1267,10 @@ struct machine_function No definition is equivalent to always zero. */ #define EXIT_IGNORE_STACK 1 + +/* Define registers used by the epilogue and return instruction. */ + +#define EPILOGUE_USES(REGNO) ((REGNO) == 26) /* Output assembler code for a block containing the constant parts of a trampoline, leaving space for the variable parts. diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index 74140329839..03e499dba01 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -3984,17 +3984,13 @@ "br $31,%l0" [(set_attr "type" "ibr")]) -(define_insn "return" +(define_expand "return" [(return)] "direct_return ()" - "ret $31,($26),1" - [(set_attr "type" "ibr")]) + "") -;; Use a different pattern for functions which have non-trivial -;; epilogues so as not to confuse jump and reorg. -(define_insn "return_internal" - [(use (reg:DI 26)) - (return)] +(define_insn "*return_internal" + [(return)] "" "ret $31,($26),1" [(set_attr "type" "ibr")]) @@ -5431,9 +5427,9 @@ "mov %1,%0") (define_expand "epilogue" - [(clobber (const_int 0))] + [(return)] "" - "alpha_expand_epilogue (); DONE;") + "alpha_expand_epilogue ();") (define_expand "eh_epilogue" [(use (match_operand:DI 0 "register_operand" "r"))