emit-rtl.c (constant_subword): Also do sign extension in BITS_PER_WORD == 16 case.

* emit-rtl.c (constant_subword): Also do sign extension in
	BITS_PER_WORD == 16 case.

From-SVN: r41545
This commit is contained in:
J"orn Rennecke 2001-04-25 16:14:24 +00:00 committed by Joern Rennecke
parent 889a80aa95
commit 73de376fa0
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Wed Apr 25 17:09:50 2001 J"orn Rennecke <amylaar@redhat.com>
* emit-rtl.c (constant_subword): Also do sign extension in
BITS_PER_WORD == 16 case.
2001-04-25 Jason Merrill <jason_merrill@redhat.com>
* loop.c (try_swap_copy_prop): Go back to checking insn.

View File

@ -1369,7 +1369,7 @@ constant_subword (op, offset, mode)
val = k[offset >> 1];
if ((offset & 1) == ! WORDS_BIG_ENDIAN)
val >>= 16;
val &= 0xffff;
val = ((val & 0xffff) ^ 0x8000) - 0x8000;
return GEN_INT (val);
}
else
@ -1448,7 +1448,7 @@ constant_subword (op, offset, mode)
{
if ((offset & 1) == ! WORDS_BIG_ENDIAN)
val >>= 16;
val &= 0xffff;
val = ((val & 0xffff) ^ 0x8000) - 0x8000;
}
return GEN_INT (val);