aboutsummaryrefslogtreecommitdiff
path: root/sim/sh/gencode.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2003-07-23 21:47:28 +0000
committerMichael Snyder <msnyder@vmware.com>2003-07-23 21:47:28 +0000
commit1b606171ade7edbc12a8b478295e4063f4b02c0c (patch)
treeff3770744f923bb963e15c076ca2a9f9c2256526 /sim/sh/gencode.c
parentb2bc31014468887eb98748fb140cff7e35aabf42 (diff)
downloadgdb-1b606171ade7edbc12a8b478295e4063f4b02c0c.zip
gdb-1b606171ade7edbc12a8b478295e4063f4b02c0c.tar.gz
gdb-1b606171ade7edbc12a8b478295e4063f4b02c0c.tar.bz2
2003-07-09 Michael Snyder <msnyder@redhat.com>
* gencode.c (prnd): Clear LSW of result to zeros.
Diffstat (limited to 'sim/sh/gencode.c')
-rw-r--r--sim/sh/gencode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index 9f5bcf0..f1601c5 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;",