[patch RFA] SH: Clobber MACH/MACL in *divsi3_i4_int insns
Kaz Kojima
kkojima@rr.iij4u.or.jp
Tue Mar 28 14:14:00 GMT 2006
Hi,
The new __udivsi3_i4i and __sdivsi3_i4i lib1funcs may use
dmul instructions which clobbers MACH/MACL registers but
the corresponding insns in sh.md don't clobber these registers.
The attached patch add the clobbers to these insns. It seems
that this issue causes a few regressions for libgomp testsuite
on sh4-unknown-linux-gnu.
It's tested with bootstrap and the toplevel "make -k check"
on sh4-unknown-linux-gnu. Ok for the trunk?
Regards,
kaz
--
:ADDPATCH:
2006-03-28 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.md (udivsi3_i4_int): Clobber MACH_REG and MACL_REG.
(divsi3_i4_int): Likewise.
diff -uprN ORIG/trunk/gcc/config/sh/sh.md LOCAL/trunk/gcc/config/sh/sh.md
--- ORIG/trunk/gcc/config/sh/sh.md 2006-03-28 07:46:31.000000000 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.md 2006-03-28 13:40:51.000000000 +0900
@@ -1798,6 +1798,8 @@
(clobber (reg:SI T_REG))
(clobber (reg:SI R1_REG))
(clobber (reg:SI PR_REG))
+ (clobber (reg:SI MACH_REG))
+ (clobber (reg:SI MACL_REG))
(use (match_operand:SI 1 "arith_reg_operand" "r"))]
"TARGET_SH1"
"jsr @%1%#"
@@ -2052,6 +2054,8 @@
(clobber (reg:SI T_REG))
(clobber (reg:SI PR_REG))
(clobber (reg:SI R1_REG))
+ (clobber (reg:SI MACH_REG))
+ (clobber (reg:SI MACL_REG))
(use (match_operand:SI 1 "arith_reg_operand" "r"))]
"TARGET_SH1"
"jsr @%1%#"
More information about the Gcc-patches
mailing list