diff options
author | Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> | 1998-05-07 01:59:07 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@gcc.gnu.org> | 1998-05-07 01:59:07 +0000 |
commit | 436bf9fb5bd9b2b5fb53ff94dc657f6e586efb54 (patch) | |
tree | e007be64757d1113301dffe37530cf95b92682ae /gcc | |
parent | a59bfd78eb56b1828ef7def1d1fa96bde8f4006c (diff) | |
download | gcc-436bf9fb5bd9b2b5fb53ff94dc657f6e586efb54.zip gcc-436bf9fb5bd9b2b5fb53ff94dc657f6e586efb54.tar.gz gcc-436bf9fb5bd9b2b5fb53ff94dc657f6e586efb54.tar.bz2 |
m68k.md (adddi3, subdi3): Properly negate the DImode constant.
* config/m68k/m68k.md (adddi3, subdi3): Properly negate the DImode
constant.
From-SVN: r19607
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.md | 20 |
2 files changed, 19 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9bbb77e..d49b70e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu May 7 10:55:59 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> + + * config/m68k/m68k.md (adddi3, subdi3): Properly negate the DImode + constant. + Wed May 6 22:32:37 CDT 1998 Robert Lipe <robertl@dgii.com> * Makefile.in (dwarfout.o) Add toplev.h dependency. diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index b1501de..cb31fa5 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -2166,7 +2166,11 @@ else operands[1] = adj_offsettable_operand (operands[2], 4); xoperands[0] = operands[3]; - xoperands[1] = operands[2]; + if (GET_CODE (operands[1]) == CONST_INT + && INTVAL (operands[1]) >= -8 && INTVAL (operands[1]) < 0) + xoperands[1] = GEN_INT (-INTVAL (operands[2]) - 1); + else + xoperands[1] = operands[2]; output_asm_insn (output_move_simode (xoperands), xoperands); if (GET_CODE (operands[1]) == CONST_INT) { @@ -2182,9 +2186,9 @@ { operands[1] = GEN_INT (-INTVAL (operands[1])); #ifdef NO_ADDSUB_Q - return \"sub%.l %1,%R0\;addx%.l %3,%0\"; + return \"sub%.l %1,%R0\;subx%.l %3,%0\"; #else - return \"subq%.l %1,%R0\;addx%.l %3,%0\"; + return \"subq%.l %1,%R0\;subx%.l %3,%0\"; #endif } } @@ -2719,7 +2723,11 @@ else operands[1] = adj_offsettable_operand (operands[2], 4); xoperands[0] = operands[3]; - xoperands[1] = operands[2]; + if (GET_CODE (operands[1]) == CONST_INT + && INTVAL (operands[1]) >= -8 && INTVAL (operands[1]) < 0) + xoperands[1] = GEN_INT (-INTVAL (operands[2]) - 1); + else + xoperands[1] = operands[2]; output_asm_insn (output_move_simode (xoperands), xoperands); if (GET_CODE (operands[1]) == CONST_INT) { @@ -2735,9 +2743,9 @@ { operands[1] = GEN_INT (-INTVAL (operands[1])); #ifdef NO_ADDSUB_Q - return \"add%.l %1,%R0\;subx%.l %3,%0\"; + return \"add%.l %1,%R0\;addx%.l %3,%0\"; #else - return \"addq%.l %1,%R0\;subx%.l %3,%0\"; + return \"addq%.l %1,%R0\;addx%.l %3,%0\"; #endif } } |