public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [h8300] misc patches
@ 2008-01-22  1:59 DJ Delorie
  2008-01-23  6:25 ` Hans-Peter Nilsson
  0 siblings, 1 reply; 12+ messages in thread
From: DJ Delorie @ 2008-01-22  1:59 UTC (permalink / raw)
  To: gcc-patches


Two misc patches here.  The first solves this build failure:

gcc/unwind-dw2-fde.c:146: error: unrecognizable insn:
(insn 17 16 18 2gcc/unwind-dw2-fde.c:136 (set (zero_extract:HI (subreg:HI (reg:QI 23) 0)
            (const_int 1 [0x1])
            (const_int 6 [0x6]))
        (const_int 1 [0x1])) -1 (nil))
../gcc/unwind-dw2-fde.c:146: internal compiler error: in extract_insn, at recog.c:1990

	* config/h8300/h8300.md (insv): Allow constants under the
	assumption that they'll get moved to a register later.

Index: h8300.md
===================================================================
--- h8300.md	(revision 131405)
+++ h8300.md	(working copy)
@@ -3285,13 +3285,13 @@
 }")
 
 (define_insn ""
   [(set (zero_extract:HI (match_operand:HI 0 "register_operand" "+r")
 			 (const_int 1)
 			 (match_operand:HI 1 "immediate_operand" "n"))
-	(match_operand:HI 2 "register_operand" "r"))]
+	(match_operand:HI 2 "general_operand" "r"))]
   ""
   "bld	#0,%R2\;bst	%Z1,%Y0 ; i1"
   [(set_attr "length" "4")])
 
 (define_expand "extzv"
   [(set (match_operand:HI 0 "register_operand" "")


This second one solves numerous testsuite failures, as the return insn
in some functions was being deleted during optimization.

	* config/h8300/h8300.c (h8300_expand_epilogue): Return insns
	must be emitted as jumps.

Index: h8300.c
===================================================================
--- h8300.c	(revision 131405)
+++ h8300.c	(working copy)
@@ -927,13 +927,13 @@ h8300_expand_epilogue (void)
       if (TARGET_H8300SX)
 	returned_p = true;
       h8300_push_pop (HARD_FRAME_POINTER_REGNUM, 1, 1, returned_p);
     }
 
   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
    function.  */
 
 int

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-02-20 21:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-22  1:59 [h8300] misc patches DJ Delorie
2008-01-23  6:25 ` Hans-Peter Nilsson
2008-01-23 11:09   ` DJ Delorie
2008-01-24  9:39   ` DJ Delorie
2008-01-24 10:00     ` Hans-Peter Nilsson
2008-01-25  8:56       ` DJ Delorie
2008-02-19 14:37   ` DJ Delorie
2008-02-19 19:34     ` Jeff Law
2008-02-19 19:44       ` DJ Delorie
2008-02-19 19:53         ` Jeff Law
2008-02-20 13:26         ` Jakub Jelinek
2008-02-20 21:46           ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).