Patchwork [committed] Fix PR target/49880

login
register
mail settings
Submitter Kaz Kojima
Date July 31, 2011, 11:02 p.m.
Message ID <20110801.080221.104943315.kkojima@rr.iij4u.or.jp>
Download mbox | patch
Permalink /patch/107649/
State New
Headers show

Comments

Kaz Kojima - July 31, 2011, 11:02 p.m.
Hi,

The attached patch is to fix PR target/49880.  All SH compilers ICE
with -m4 -mdiv=call-div1 which is a bit unusual combination of
options.  Tested on sh4-unknown-linux-gnu with no new failures.
Applied on trunk.

Regards,
	kaz
--
2011-07-31  Kaz Kojima  <kkojima@gcc.gnu.org>

	PR target/49880
	* config/sh/sh.md (udivsi3_i1): Enable for TARGET_DIVIDE_CALL_DIV1.
	(divsi3_i1): Likewise.

Patch

--- ORIG/trunk/gcc/config/sh/sh.md	2011-07-20 09:27:11.000000000 +0900
+++ trunk/gcc/config/sh/sh.md	2011-07-28 06:49:41.000000000 +0900
@@ -1609,7 +1609,7 @@ 
    (clobber (reg:SI PR_REG))
    (clobber (reg:SI R4_REG))
    (use (match_operand:SI 1 "arith_reg_operand" "r"))]
-  "TARGET_SH1 && ! TARGET_SH4"
+  "TARGET_SH1 && (! TARGET_SH4 || TARGET_DIVIDE_CALL_DIV1)"
   "jsr	@%1%#"
   [(set_attr "type" "sfunc")
    (set_attr "needs_delay_slot" "yes")])
@@ -1815,7 +1815,7 @@ 
    (clobber (reg:SI R2_REG))
    (clobber (reg:SI R3_REG))
    (use (match_operand:SI 1 "arith_reg_operand" "r"))]
-  "TARGET_SH1 && ! TARGET_SH4"
+  "TARGET_SH1 && (! TARGET_SH4 || TARGET_DIVIDE_CALL_DIV1)"
   "jsr	@%1%#"
   [(set_attr "type" "sfunc")
    (set_attr "needs_delay_slot" "yes")])