(addhi3): Use byte opcodes when the low byte of a word is known to be zero.

From-SVN: r5563
This commit is contained in:
James Van Artsdalen 1993-10-02 22:26:01 +00:00
parent d81481d3d9
commit b980bec031
1 changed files with 18 additions and 0 deletions

View File

@ -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);