mirror of https://github.com/mgba-emu/mgba.git
Fix Div output registers
This commit is contained in:
parent
118c393d1b
commit
f7fbb877e0
|
@ -111,7 +111,7 @@ void GBASwi16(struct ARMBoard* board, int immediate) {
|
||||||
div_t result = div(gba->cpu.gprs[0], gba->cpu.gprs[1]);
|
div_t result = div(gba->cpu.gprs[0], gba->cpu.gprs[1]);
|
||||||
gba->cpu.gprs[0] = result.quot;
|
gba->cpu.gprs[0] = result.quot;
|
||||||
gba->cpu.gprs[1] = result.rem;
|
gba->cpu.gprs[1] = result.rem;
|
||||||
gba->cpu.gprs[2] = abs(result.quot);
|
gba->cpu.gprs[3] = abs(result.quot);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x7:
|
case 0x7:
|
||||||
|
@ -119,7 +119,7 @@ void GBASwi16(struct ARMBoard* board, int immediate) {
|
||||||
div_t result = div(gba->cpu.gprs[1], gba->cpu.gprs[0]);
|
div_t result = div(gba->cpu.gprs[1], gba->cpu.gprs[0]);
|
||||||
gba->cpu.gprs[0] = result.quot;
|
gba->cpu.gprs[0] = result.quot;
|
||||||
gba->cpu.gprs[1] = result.rem;
|
gba->cpu.gprs[1] = result.rem;
|
||||||
gba->cpu.gprs[2] = abs(result.quot);
|
gba->cpu.gprs[3] = abs(result.quot);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0xB:
|
case 0xB:
|
||||||
|
|
Loading…
Reference in New Issue