OSDN Git Service

2003-07-09 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@specifix.com>
Wed, 23 Jul 2003 21:47:28 +0000 (21:47 +0000)
committerMichael Snyder <msnyder@specifix.com>
Wed, 23 Jul 2003 21:47:28 +0000 (21:47 +0000)
        * gencode.c (prnd): Clear LSW of result to zeros.

sim/sh/ChangeLog
sim/sh/gencode.c

index 6d449ba..30322e9 100644 (file)
@@ -1,5 +1,6 @@
 2003-07-09  Michael Snyder  <msnyder@redhat.com>
 
+       * gencode.c (prnd): Clear LSW of result to zeros.
        * gencode.c (pmuls): Expression is mis-parenthesized.
        * gencode.c (ppi_gensim): For a conditional ppi insn, if the
        condition is false, we want to return (not break).  A break
index 9f5bcf0..f1601c5 100644 (file)
@@ -1479,7 +1479,7 @@ op ppi_tab[] =
     "int Sx = DSP_R (x);",
     "int Sx_grd = GET_DSP_GRD (x);",
     "",
-    "res = Sx + 0x8000;",
+    "res = (Sx + 0x8000) & 0xffff0000;",
     "carry = (unsigned) res < (unsigned) Sx;",
     "res_grd = Sx_grd + carry;",
     "COMPUTE_OVERFLOW;",
@@ -1512,7 +1512,7 @@ op ppi_tab[] =
     "int Sy = DSP_R (y);",
     "int Sy_grd = SIGN32 (Sy);",
     "",
-    "res = Sy + 0x8000;",
+    "res = (Sy + 0x8000) & 0xffff0000;",
     "carry = (unsigned) res < (unsigned) Sy;",
     "res_grd = Sy_grd + carry;",
     "COMPUTE_OVERFLOW;",