Commit 5bf92e20 by Richard Henderson Committed by Richard Henderson

re PR c/10083 (alpha: ICE while building swi-prolog-packages)

        PR c/10083
        * config/alpha/alpha.md (umuldi3_highpart): Change to expander;
        don't zero_extend const inputs.
	* gcc.c-torture/compile/20030330-1.c: New.

From-SVN: r65047
parent 438f63a8
2003-03-30 Richard Henderson <rth@redhat.com>
PR c/10083
* config/alpha/alpha.md (umuldi3_highpart): Change to expander;
don't zero_extend const inputs.
2003-03-30 Kazu Hirata <kazu@cs.umass.edu> 2003-03-30 Kazu Hirata <kazu@cs.umass.edu>
* reload1.c (reload_cse_move2add): Fix a comment typo. * reload1.c (reload_cse_move2add): Fix a comment typo.
......
...@@ -750,17 +750,31 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none" ...@@ -750,17 +750,31 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
"mulqv %r1,%2,%0" "mulqv %r1,%2,%0"
[(set_attr "type" "imul")]) [(set_attr "type" "imul")])
(define_insn "umuldi3_highpart" (define_expand "umuldi3_highpart"
[(set (match_operand:DI 0 "register_operand" "")
(truncate:DI
(lshiftrt:TI
(mult:TI (zero_extend:TI
(match_operand:DI 1 "register_operand" ""))
(match_operand:DI 2 "reg_or_8bit_operand" ""))
(const_int 64))))]
""
{
if (REG_P (operands[2]))
operands[2] = gen_rtx_ZERO_EXTEND (TImode, operands[2]);
})
(define_insn "*umuldi3_highpart_reg"
[(set (match_operand:DI 0 "register_operand" "=r") [(set (match_operand:DI 0 "register_operand" "=r")
(truncate:DI (truncate:DI
(lshiftrt:TI (lshiftrt:TI
(mult:TI (zero_extend:TI (mult:TI (zero_extend:TI
(match_operand:DI 1 "reg_or_0_operand" "%rJ")) (match_operand:DI 1 "register_operand" "r"))
(zero_extend:TI (zero_extend:TI
(match_operand:DI 2 "reg_or_8bit_operand" "rI"))) (match_operand:DI 2 "register_operand" "r")))
(const_int 64))))] (const_int 64))))]
"" ""
"umulh %r1,%2,%0" "umulh %1,%2,%0"
[(set_attr "type" "imul") [(set_attr "type" "imul")
(set_attr "opsize" "udi")]) (set_attr "opsize" "udi")])
......
/* PR c/10083 */
/* This will result in a very small constant for umul_highpart, which
uncovered a bug in the Alpha machine description. */
unsigned long f(unsigned long x) {
return x % 0x3fffffffffffffff;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment