aboutsummaryrefslogtreecommitdiff
path: root/sim/v850/simops.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1996-10-24 21:19:22 +0000
committerJeff Law <law@redhat.com>1996-10-24 21:19:22 +0000
commitf009978996aa1c65934b0960953f4cb65b7ac905 (patch)
tree08fbfcb421793bf912134b8e846d2410ebfde58a /sim/v850/simops.c
parent85c09b0518630f580b3cdc82728b22ad09b1ca64 (diff)
downloadfsf-binutils-gdb-f009978996aa1c65934b0960953f4cb65b7ac905.zip
fsf-binutils-gdb-f009978996aa1c65934b0960953f4cb65b7ac905.tar.gz
fsf-binutils-gdb-f009978996aa1c65934b0960953f4cb65b7ac905.tar.bz2
* simops.c (OP_500): Mask off low bit in displacement
for sld.w. (OP_501): Similarly. More bugs exposed by tda testing.
Diffstat (limited to 'sim/v850/simops.c')
-rw-r--r--sim/v850/simops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/v850/simops.c b/sim/v850/simops.c
index 7710232..8993af8 100644
--- a/sim/v850/simops.c
+++ b/sim/v850/simops.c
@@ -455,7 +455,7 @@ OP_500 ()
trace_input ("sld.w", OP_LOAD16, 4);
temp = OP[1];
- temp &= 0x7f;
+ temp &= 0x7e;
op2 = temp << 1;
result = load_mem (State.regs[30] + op2, 4);
State.regs[OP[0]] = result;
@@ -504,7 +504,7 @@ OP_501 ()
trace_input ("sst.w", OP_STORE16, 4);
op0 = State.regs[OP[0]];
temp = OP[1];
- temp &= 0x7f;
+ temp &= 0x7e;
op1 = temp << 1;
store_mem (State.regs[30] + op1, 4, op0);
trace_output (OP_STORE16);