all repos — mgba @ f7fbb877e0d7473d000cd27bda563c233a4f5caa

mGBA Game Boy Advance Emulator

Fix Div output registers
Jeffrey Pfau jeffrey@endrift.com
Tue, 30 Apr 2013 20:54:09 -0700
commit

f7fbb877e0d7473d000cd27bda563c233a4f5caa

parent

118c393d1ba94a4147929963b3ec5f5ab34589f1

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/gba/gba-bios.csrc/gba/gba-bios.c

@@ -111,7 +111,7 @@ {

div_t result = div(gba->cpu.gprs[0], gba->cpu.gprs[1]); gba->cpu.gprs[0] = result.quot; gba->cpu.gprs[1] = result.rem; - gba->cpu.gprs[2] = abs(result.quot); + gba->cpu.gprs[3] = abs(result.quot); } break; case 0x7:

@@ -119,7 +119,7 @@ {

div_t result = div(gba->cpu.gprs[1], gba->cpu.gprs[0]); gba->cpu.gprs[0] = result.quot; gba->cpu.gprs[1] = result.rem; - gba->cpu.gprs[2] = abs(result.quot); + gba->cpu.gprs[3] = abs(result.quot); } break; case 0xB: