diff options
author | J"orn Rennecke <amylaar@redhat.com> | 2001-04-25 16:14:24 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2001-04-25 17:14:24 +0100 |
commit | 73de376fa0e930f494feeda1603dc34eaeef6067 (patch) | |
tree | fc23cad59ba5c632088ab802f8062abbeaab8bbd /gcc/emit-rtl.c | |
parent | 889a80aa959ca3edffb1d39f9472787058f89989 (diff) | |
download | gcc-73de376fa0e930f494feeda1603dc34eaeef6067.zip gcc-73de376fa0e930f494feeda1603dc34eaeef6067.tar.gz gcc-73de376fa0e930f494feeda1603dc34eaeef6067.tar.bz2 |
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
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 480ff15..6fe21ae 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -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); |