]> gcc.gnu.org Git - gcc.git/commitdiff
emit-rtl.c (constant_subword): Also do sign extension in BITS_PER_WORD == 16 case.
authorJ"orn Rennecke <amylaar@redhat.com>
Wed, 25 Apr 2001 16:14:24 +0000 (16:14 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Wed, 25 Apr 2001 16:14:24 +0000 (17:14 +0100)
* emit-rtl.c (constant_subword): Also do sign extension in
BITS_PER_WORD == 16 case.

From-SVN: r41545

gcc/ChangeLog
gcc/emit-rtl.c

index 87bac601ba21ff33c957159936cbdf2bf43c3d46..c6c57ef95bfa0de6a6c3449f05f81a7a73fc5e9e 100644 (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.
index 480ff15ee98c923c409398841bdee3db99c07fc1..6fe21ae4d25653bfd798269d058239ca80fea6a8 100644 (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);
This page took 0.08189 seconds and 5 git commands to generate.