Fix ADCS C bit
Jeffrey Pfau jeffrey@endrift.com
Thu, 26 Sep 2013 00:25:48 -0700
2 files changed,
4 insertions(+),
5 deletions(-)
M
src/arm/isa-arm.c
→
src/arm/isa-arm.c
@@ -569,10 +569,9 @@ DEFINE_ALU_INSTRUCTION_ARM(ADD, ARM_ADDITION_S(n, cpu->shifterOperand, cpu->gprs[rd]),
int32_t n = cpu->gprs[rn]; cpu->gprs[rd] = n + cpu->shifterOperand;) -DEFINE_ALU_INSTRUCTION_ARM(ADC, ARM_ADDITION_S(n, shifterOperand, cpu->gprs[rd]), +DEFINE_ALU_INSTRUCTION_ARM(ADC, ARM_ADDITION_S(n, cpu->shifterOperand, cpu->gprs[rd]), int32_t n = cpu->gprs[rn]; - int32_t shifterOperand = cpu->shifterOperand + cpu->cpsr.c; - cpu->gprs[rd] = n + shifterOperand;) + cpu->gprs[rd] = n + cpu->shifterOperand + cpu->cpsr.c;) DEFINE_ALU_INSTRUCTION_ARM(AND, ARM_NEUTRAL_S(cpu->gprs[rn], cpu->shifterOperand, cpu->gprs[rd]), cpu->gprs[rd] = cpu->gprs[rn] & cpu->shifterOperand;)
M
src/arm/isa-thumb.c
→
src/arm/isa-thumb.c
@@ -255,9 +255,9 @@ }
THUMB_NEUTRAL_S( , , cpu->gprs[rd])) DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(ADC, - int n = cpu->gprs[rn] + cpu->cpsr.c; + int n = cpu->gprs[rn]; int d = cpu->gprs[rd]; - cpu->gprs[rd] = d + n; + cpu->gprs[rd] = d + n + cpu->cpsr.c; THUMB_ADDITION_S(d, n, cpu->gprs[rd]);) DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(SBC,