Fixed simulation bug: JGE/JL reversed.

This commit is contained in:
Daniel Beer 2010-05-21 13:17:44 +12:00
parent 626b0085a0
commit b897d780c1
1 changed files with 2 additions and 2 deletions

4
sim.c
View File

@ -388,12 +388,12 @@ static int step_jump(struct sim_device *dev, uint16_t ins)
break;
case MSP430_OP_JGE:
sr = ((sr & MSP430_SR_N) ? 1 : 0) !=
sr = ((sr & MSP430_SR_N) ? 1 : 0) ==
((sr & MSP430_SR_V) ? 1 : 0);
break;
case MSP430_OP_JL:
sr = ((sr & MSP430_SR_N) ? 1 : 0) ==
sr = ((sr & MSP430_SR_N) ? 1 : 0) !=
((sr & MSP430_SR_V) ? 1 : 0);
break;