2003-07-17 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Fri, 18 Jul 2003 00:08:23 +0000 (00:08 +0000)
committerMichael Snyder <msnyder@vmware.com>
Fri, 18 Jul 2003 00:08:23 +0000 (00:08 +0000)
        * compile.c (decode): IMM16 is always zero-extended.

sim/h8300/ChangeLog
sim/h8300/compile.c

index 2112ad926823ea0560b2fc63f5542b1ec4898a47..77cb91260ddfed650a59232800b1d4aab5b0f12c 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-17  Michael Snyder  <msnyder@redhat.com>
+
+       * compile.c (decode): IMM16 is always zero-extended.
+
 2003-06-24  Michael Snyder  <msnyder@redhat.com>
 
        * sim-main.h (SIM_WIFSTOPPED, SIM_WSTOPSIG): Define.
index 7635655b3e57ac39c6459c9fb073f97367a08d65..3819fdd6929f9c0e311b3de0a4c7f53889ceca3f 100644 (file)
@@ -818,7 +818,9 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
                       (looking_for & SIZE) == L_16U)
                {
                  cst[opnum] = (data[len / 2] << 8) + data[len / 2 + 1];
-                 if ((looking_for & SIZE) != L_16U)
+                 /* Immediates are always unsigned.  */
+                 if ((looking_for & SIZE) != L_16U &&
+                     (looking_for & MODE) != IMM)
                    cst[opnum] = (short) cst[opnum];    /* Sign extend.  */
                }
              else if (looking_for & ABSJMP)
This page took 0.030144 seconds and 4 git commands to generate.