diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1994-10-28 14:54:58 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1994-10-28 14:54:58 +0000 |
commit | f94bdcb60d54fd2f812afa85d1334500bf4f6f50 (patch) | |
tree | 121d1dba15eb48ac94c553b607a88a1d37a35da4 /gcc | |
parent | 46a70e454bbf1c3bb547a80f3650386d4b9d32e4 (diff) | |
download | gcc-f94bdcb60d54fd2f812afa85d1334500bf4f6f50.zip gcc-f94bdcb60d54fd2f812afa85d1334500bf4f6f50.tar.gz gcc-f94bdcb60d54fd2f812afa85d1334500bf4f6f50.tar.bz2 |
Fix adddi3.
From-SVN: r8352
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/i386/i386.md | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 3846746..89dca03 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2343,19 +2343,25 @@ ;;- add instructions (define_insn "adddi3" - [(set (match_operand:DI 0 "general_operand" "=&r,ro,o,&r,o,o,o") - (plus:DI (match_operand:DI 1 "general_operand" "%0,0,0,or,riF,riF,o") - (match_operand:DI 2 "general_operand" "o,riF,o,oriF,riF,o,o"))) - (clobber (match_scratch:SI 3 "=X,X,&r,X,X,&r,&r"))] + [(set (match_operand:DI 0 "general_operand" "=&r,ro,o,&r,ro,o,&r,o,o,o") + (plus:DI (match_operand:DI 1 "general_operand" "%0,0,0,o,riF,o,or,riF,riF,o") + (match_operand:DI 2 "general_operand" "o,riF,o,0,0,0,oriF,riF,o,o"))) + (clobber (match_scratch:SI 3 "=X,X,&r,X,X,&r,X,X,&r,&r"))] "" "* { - rtx low[3], high[3], xops[7]; + rtx low[3], high[3], xops[7], temp; CC_STATUS_INIT; - split_di (operands, 3, low, high); + if (rtx_equal_p (operands[0], operands[2])) + { + temp = operands[1]; + operands[1] = operands[2]; + operands[2] = temp; + } + split_di (operands, 3, low, high); if (!rtx_equal_p (operands[0], operands[1])) { xops[0] = high[0]; @@ -2383,7 +2389,7 @@ } } - if (GET_CODE (operands[3]) == REG) + if (GET_CODE (operands[3]) == REG && GET_CODE (operands[2]) != REG) { xops[0] = high[0]; xops[1] = low[0]; |