mirror of https://github.com/mgba-emu/mgba.git
Fix ADCS C bit
This commit is contained in:
parent
662feed390
commit
99769695d7
|
@ -569,10 +569,9 @@ DEFINE_ALU_INSTRUCTION_ARM(ADD, ARM_ADDITION_S(n, cpu->shifterOperand, cpu->gprs
|
|||
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;)
|
||||
|
|
|
@ -255,9 +255,9 @@ DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(ASR2,
|
|||
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,
|
||||
|
|
Loading…
Reference in New Issue