summaryrefslogtreecommitdiff
path: root/sim/sh
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2003-07-23 21:47:28 +0000
committerMichael Snyder <msnyder@specifix.com>2003-07-23 21:47:28 +0000
commit16ba329322bacad5032a8877bfdab68c09fbc6a0 (patch)
treec4717e36c13a357180f5664072f16877b6642052 /sim/sh
parent56d96f4139d2892e8c1feb2605296071a3f37f86 (diff)
downloadgdb-16ba329322bacad5032a8877bfdab68c09fbc6a0.tar.gz
2003-07-09 Michael Snyder <msnyder@redhat.com>
* gencode.c (prnd): Clear LSW of result to zeros.
Diffstat (limited to 'sim/sh')
-rw-r--r--sim/sh/ChangeLog1
-rw-r--r--sim/sh/gencode.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 6d449ba2098..30322e9bd3c 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -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
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index 9f5bcf0c850..f1601c54bd4 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -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;",