diff options
author | James Van Artsdalen <jrv@gnu.org> | 1993-10-02 22:26:01 +0000 |
---|---|---|
committer | James Van Artsdalen <jrv@gnu.org> | 1993-10-02 22:26:01 +0000 |
commit | b980bec031926a0d179602d890b2b448e52f2bbf (patch) | |
tree | ba3254d33430216c1c27dbf11a50c2c62ba7cdbc /gcc/config | |
parent | d81481d3d95364ece0e95fb8d0373bef2e55f50d (diff) | |
download | gcc-b980bec031926a0d179602d890b2b448e52f2bbf.zip gcc-b980bec031926a0d179602d890b2b448e52f2bbf.tar.gz gcc-b980bec031926a0d179602d890b2b448e52f2bbf.tar.bz2 |
(addhi3): Use byte opcodes when the low byte of a word is known to be zero.
From-SVN: r5563
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index f0a0498..6ead794 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1620,6 +1620,24 @@ "" "* { + /* ??? what about offsettable memory references? */ + if (QI_REG_P (operands[0]) + && GET_CODE (operands[2]) == CONST_INT + && (INTVAL (operands[2]) & 0xff) == 0) + { + CC_STATUS_INIT; + + operands[2] = GEN_INT ((INTVAL (operands[2]) >> 8) & 0xff); + + if (operands[2] == const1_rtx) + return AS1 (inc%B0,%h0); + + if (operands[2] == constm1_rtx) + return AS1 (dec%B0,%h0); + + return AS2 (add%B0,%2,%h0); + } + if (operands[2] == const1_rtx) return AS1 (inc%W0,%0); |