]> sourceware.org Git - cgen.git/commitdiff
* cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
authorAlan Modra <amodra@gmail.com>
Thu, 27 Oct 2005 06:57:56 +0000 (06:57 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 27 Oct 2005 06:57:56 +0000 (06:57 +0000)
ChangeLog
cpu/m32r.opc

index 21826e5c6f7304cd9ecd393e7562e5752461898b..941a85f561109e6fef6a9b4de5393de887647637 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+       * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
+
 2005-10-24  DJ Delorie  <dj@redhat.com>
 
        * operand.scm (-anyof-merge-syntax): Print a more useful error
index 12489534d136b0af0d5f16f6a4f44d65e8c5336f..0c40f8fc8c31d468c48203856154ababd14f13c4 100644 (file)
@@ -62,7 +62,6 @@ m32r_cgen_dis_hash (const char * buf ATTRIBUTE_UNUSED, CGEN_INSN_INT value)
 /* -- */
 \f
 /* -- asm.c */
-
 static const char * MISSING_CLOSING_PARENTHESIS = N_("missing `)'");
 
 /* Handle '#' prefixes (i.e. skip over them).  */
@@ -103,7 +102,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;
     }
@@ -118,8 +120,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;
This page took 0.034815 seconds and 5 git commands to generate.