sim: fix execution of SUB/SUBC/CMP opcodes.
This commit is contained in:
parent
6939f2c90e
commit
1655524a2c
2
sim.c
2
sim.c
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue