sim: fix execution of SUB/SUBC/CMP opcodes.

This commit is contained in:
Richard Nauber 2010-12-25 22:36:30 +13:00 committed by Daniel Beer
parent 6939f2c90e
commit 1655524a2c
1 changed files with 1 additions and 1 deletions

2
sim.c
View File

@ -185,7 +185,7 @@ static int step_double(struct sim_device *dev, uint16_t ins)
case MSP430_OP_SUB: case MSP430_OP_SUB:
case MSP430_OP_SUBC: case MSP430_OP_SUBC:
case MSP430_OP_CMP: case MSP430_OP_CMP:
src_data = ~src_data; src_data = (~src_data) & mask;
case MSP430_OP_ADD: case MSP430_OP_ADD:
case MSP430_OP_ADDC: case MSP430_OP_ADDC:
if (opcode == MSP430_OP_ADDC || opcode == MSP430_OP_SUBC) if (opcode == MSP430_OP_ADDC || opcode == MSP430_OP_SUBC)