Commit bd8dc165 by Richard Henderson Committed by Richard Henderson

alpha.md (addsi3, subsi3): Revise 5 Nov change to store DImode value in…

alpha.md (addsi3, subsi3): Revise 5 Nov change to store DImode value in paradoxical SImode result...

        * alpha.md (addsi3, subsi3): Revise 5 Nov change to store DImode
        value in paradoxical SImode result, rather than truncating midpoint.

From-SVN: r23655
parent 9d1a7ce0
Sat Nov 14 15:05:07 1998 Richard Henderson <rth@cygnus.com>
* alpha.md (addsi3, subsi3): Revise 5 Nov change to store DImode
value in paradoxical SImode result, rather than truncating midpoint.
Fri Nov 13 22:19:23 1998 Richard Henderson <rth@cygnus.com> Fri Nov 13 22:19:23 1998 Richard Henderson <rth@cygnus.com>
* alpha.c (reg_not_elim_operand): New. * alpha.c (reg_not_elim_operand): New.
......
...@@ -427,6 +427,8 @@ ...@@ -427,6 +427,8 @@
"" ""
" "
{ {
if (optimize)
{
rtx op1 = gen_lowpart (DImode, operands[1]); rtx op1 = gen_lowpart (DImode, operands[1]);
rtx op2 = gen_lowpart (DImode, operands[2]); rtx op2 = gen_lowpart (DImode, operands[2]);
...@@ -434,12 +436,13 @@ ...@@ -434,12 +436,13 @@
{ {
rtx tmp = gen_reg_rtx (DImode); rtx tmp = gen_reg_rtx (DImode);
emit_insn (gen_adddi3 (tmp, op1, op2)); emit_insn (gen_adddi3 (tmp, op1, op2));
emit_move_insn (operands[0], gen_lowpart (SImode, tmp)); emit_move_insn (gen_lowpart (DImode, operands[0]), tmp);
} }
else else
emit_insn (gen_adddi3 (gen_lowpart (DImode, operands[0]), op1, op2)); emit_insn (gen_adddi3 (gen_lowpart (DImode, operands[0]), op1, op2));
DONE; DONE;
} ") }
}")
(define_insn "" (define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r,r,r,r") [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
...@@ -719,6 +722,8 @@ ...@@ -719,6 +722,8 @@
"" ""
" "
{ {
if (optimize)
{
rtx op1 = gen_lowpart (DImode, operands[1]); rtx op1 = gen_lowpart (DImode, operands[1]);
rtx op2 = gen_lowpart (DImode, operands[2]); rtx op2 = gen_lowpart (DImode, operands[2]);
...@@ -726,11 +731,12 @@ ...@@ -726,11 +731,12 @@
{ {
rtx tmp = gen_reg_rtx (DImode); rtx tmp = gen_reg_rtx (DImode);
emit_insn (gen_subdi3 (tmp, op1, op2)); emit_insn (gen_subdi3 (tmp, op1, op2));
emit_move_insn (operands[0], gen_lowpart (SImode, tmp)); emit_move_insn (gen_lowpart (DImode, operands[0]), tmp);
} }
else else
emit_insn (gen_subdi3 (gen_lowpart (DImode, operands[0]), op1, op2)); emit_insn (gen_subdi3 (gen_lowpart (DImode, operands[0]), op1, op2));
DONE; DONE;
}
} ") } ")
(define_insn "" (define_insn ""
......
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