aboutsummaryrefslogtreecommitdiff
path: root/sim/msp430/msp430-sim.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/msp430/msp430-sim.c')
-rw-r--r--sim/msp430/msp430-sim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/msp430/msp430-sim.c b/sim/msp430/msp430-sim.c
index 3a20f6c..6711858 100644
--- a/sim/msp430/msp430-sim.c
+++ b/sim/msp430/msp430-sim.c
@@ -364,7 +364,7 @@ get_op (SIM_DESC sd, MSP430_Opcode_Decoded *opc, int n)
/* Index values are signed. */
if (addr & (1 << (sign - 1)))
- addr |= -1 << sign;
+ addr |= -(1 << sign);
addr += reg;
@@ -565,7 +565,7 @@ put_op (SIM_DESC sd, MSP430_Opcode_Decoded *opc, int n, int val)
/* Index values are signed. */
if (addr & (1 << (sign - 1)))
- addr |= -1 << sign;
+ addr |= -(1 << sign);
addr += reg;