From 2e8162cedbdf51d15707960c7c63740fbcec25b7 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Fri, 27 Sep 2002 18:59:08 +0000 Subject: [PATCH] Fix bug in support for trap instruction. * simops (OP_10007E0): Don't subtract 4 from PC. --- sim/v850/ChangeLog | 4 ++++ sim/v850/simops.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index e10f1dab3a5..100ece186e5 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,7 @@ +2002-09-26 Jim Wilson + + * simops (OP_10007E0): Don't subtract 4 from PC. + 2002-09-19 Nick Clifton * interp.c (sim_open): Remove reference to v850ea. diff --git a/sim/v850/simops.c b/sim/v850/simops.c index d8a4d58ae11..eba728fa287 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -1880,7 +1880,7 @@ OP_10007E0 () ECR |= 0x40 + OP[0]; /* Flag that we are now doing exception processing. */ PSW |= PSW_EP | PSW_ID; - PC = ((OP[0] < 0x10) ? 0x40 : 0x50) - 4; + PC = (OP[0] < 0x10) ? 0x40 : 0x50; return 0; } -- 2.30.2