* config/h8300/h8300.md (insv): Force source operand to be a register.
authordj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Feb 2008 21:31:56 +0000 (21:31 +0000)
committerdj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Feb 2008 21:31:56 +0000 (21:31 +0000)
* config/h8300/h8300.c (h8300_expand_epilogue): Emit return insn
as a jump, not as a plain insn.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132498 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/h8300/h8300.c
gcc/config/h8300/h8300.md

index d17b56c..fc400d2 100644 (file)
@@ -1,3 +1,10 @@
+2008-02-20  DJ Delorie  <dj@redhat.com>
+
+       * 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 <seongbae.park@gmail.com>
 
        * doc/invoke.texi (Warning Options): Add new option
index 96b6311..f90bd41 100644 (file)
@@ -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
index 08a8d2e..9b6c0aa 100644 (file)
   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 ""