From 6d4a896759d342850e6a9ba2639d2159df79e5ea Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 20 Feb 2008 16:31:56 -0500 Subject: [PATCH] h8300.md (insv): Force source operand to be a register. * config/h8300/h8300.md (insv): Force source operand to be a register. * config/h8300/h8300.c (h8300_expand_epilogue): Emit return insn as a jump, not as a plain insn. From-SVN: r132498 --- gcc/ChangeLog | 7 +++++++ gcc/config/h8300/h8300.c | 2 +- gcc/config/h8300/h8300.md | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d17b56c7b61..fc400d26ae5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2008-02-20 DJ Delorie + + * config/h8300/h8300.md (insv): Force source operand to be a register. + + * config/h8300/h8300.c (h8300_expand_epilogue): Emit return insn + as a jump, not as a plain insn. + 2008-02-20 Seongbae Park * doc/invoke.texi (Warning Options): Add new option diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 96b6311ce7c..f90bd414735 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -930,7 +930,7 @@ h8300_expand_epilogue (void) } if (!returned_p) - emit_insn (gen_rtx_RETURN (VOIDmode)); + emit_jump_insn (gen_rtx_RETURN (VOIDmode)); } /* Return nonzero if the current function is an interrupt diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 08a8d2e9313..9b6c0aa4e16 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -3282,6 +3282,9 @@ if (GET_CODE (operands[0]) == MEM || GET_CODE (operands[3]) == MEM) FAIL; + + if (GET_CODE (operands[3]) != REG) + operands[3] = force_reg (HImode, operands[3]); }") (define_insn ""