OSDN Git Service

* m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
authorAlan Modra <amodra@bigpond.net.au>
Wed, 26 Oct 2005 07:49:05 +0000 (07:49 +0000)
committerAlan Modra <amodra@bigpond.net.au>
Wed, 26 Oct 2005 07:49:05 +0000 (07:49 +0000)
opcodes/ChangeLog
opcodes/m32r-asm.c

index 89ca63d..42c6fe9 100644 (file)
@@ -1,3 +1,7 @@
+2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+       * m32r-asm.c: Regenerate.
+
 2005-10-25  DJ Delorie  <dj@redhat.com>
 
        * m32c-asm.c: Regenerate.
index 50f1363..a5bd363 100644 (file)
@@ -89,7 +89,10 @@ parse_hi16 (CGEN_CPU_DESC cd,
       ++*strp;
       if (errmsg == NULL
          && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
-       value >>= 16;
+       {
+         value >>= 16;
+         value &= 0xffff;
+       }
       *valuep = value;
       return errmsg;
     }
@@ -104,8 +107,9 @@ parse_hi16 (CGEN_CPU_DESC cd,
       if (errmsg == NULL
          && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
         {
-          value = value + (value & 0x8000 ? 0x10000 : 0);
+          value += 0x8000;
           value >>= 16;
+         value &= 0xffff;
         }
       *valuep = value;
       return errmsg;