emit-rtl.c (operand_subword): Correctly handle extracting a word from a CONST_DOUBLE for 16bit targets with...
* emit-rtl.c (operand_subword): Correctly handle extracting a word from a CONST_DOUBLE for 16bit targets with !WORDS_BIG_ENDIAN. From-SVN: r17276
This commit is contained in:
parent
9f1ff8e8ea
commit
aa2ae67960
@ -1,5 +1,8 @@
|
|||||||
Thu Jan 1 10:49:12 1998 Jeffrey A Law (law@cygnus.com)
|
Thu Jan 1 10:49:12 1998 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* emit-rtl.c (operand_subword): Correctly handle extracting a word
|
||||||
|
from a CONST_DOUBLE for 16bit targets with !WORDS_BIG_ENDIAN.
|
||||||
|
|
||||||
* mn10200.md (tstxx, cmpxx): Use "nonimmediate_operand" as predicate
|
* mn10200.md (tstxx, cmpxx): Use "nonimmediate_operand" as predicate
|
||||||
for first argument.
|
for first argument.
|
||||||
|
|
||||||
|
@ -1208,7 +1208,7 @@ operand_subword (op, i, validate_address, mode)
|
|||||||
{
|
{
|
||||||
long value;
|
long value;
|
||||||
value = k[i >> 1];
|
value = k[i >> 1];
|
||||||
if ((i & 0x1) == 0)
|
if ((i & 0x1) == !WORDS_BIG_ENDIAN)
|
||||||
value >>= 16;
|
value >>= 16;
|
||||||
value &= 0xffff;
|
value &= 0xffff;
|
||||||
return GEN_INT ((HOST_WIDE_INT) value);
|
return GEN_INT ((HOST_WIDE_INT) value);
|
||||||
@ -1265,6 +1265,13 @@ operand_subword (op, i, validate_address, mode)
|
|||||||
|
|
||||||
REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
|
REAL_VALUE_FROM_CONST_DOUBLE (rv, op);
|
||||||
REAL_VALUE_TO_TARGET_SINGLE (rv, l);
|
REAL_VALUE_TO_TARGET_SINGLE (rv, l);
|
||||||
|
|
||||||
|
if (BITS_PER_WORD == 16)
|
||||||
|
{
|
||||||
|
if ((i & 0x1) == !WORDS_BIG_ENDIAN)
|
||||||
|
l >>= 16;
|
||||||
|
l &= 0xffff;
|
||||||
|
}
|
||||||
return GEN_INT ((HOST_WIDE_INT) l);
|
return GEN_INT ((HOST_WIDE_INT) l);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user