aboutsummaryrefslogtreecommitdiff
path: root/sim/d10v/d10v_sim.h
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2000-01-06 03:07:20 +0000
committerJason Molenda <jmolenda@apple.com>2000-01-06 03:07:20 +0000
commitc3f6f71df382eaaaac4440a91e6f310d03fb8da6 (patch)
treef4c8a0660080321182558bd52319654a94e01ea5 /sim/d10v/d10v_sim.h
parent1b45fe546b666d1bd83d474b66525f1a69dbd92f (diff)
downloadgdb-c3f6f71df382eaaaac4440a91e6f310d03fb8da6.zip
gdb-c3f6f71df382eaaaac4440a91e6f310d03fb8da6.tar.gz
gdb-c3f6f71df382eaaaac4440a91e6f310d03fb8da6.tar.bz2
import gdb-2000-01-05 snapshot
Diffstat (limited to 'sim/d10v/d10v_sim.h')
-rw-r--r--sim/d10v/d10v_sim.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/d10v/d10v_sim.h b/sim/d10v/d10v_sim.h
index 130aed9..5cf43e2 100644
--- a/sim/d10v/d10v_sim.h
+++ b/sim/d10v/d10v_sim.h
@@ -432,7 +432,8 @@ enum
#define INC_ADDR(x,i) \
do \
{ \
- if (PSW_MD && GPR (x) == (MOD_E & ~((i) - 1))) \
+ int test_i = i < 0 ? i : ~((i) - 1); \
+ if (PSW_MD && GPR (x) == (MOD_E & test_i)) \
SET_GPR (x, MOD_S); \
else \
SET_GPR (x, GPR (x) + (i)); \