Implement DivArm

This commit is contained in:
Jeffrey Pfau 2013-04-27 19:58:21 -07:00
parent fd5661e941
commit dab27463a9
1 changed files with 8 additions and 0 deletions

View File

@ -105,6 +105,14 @@ void GBASwi16(struct ARMBoard* board, int immediate) {
gba->cpu.gprs[2] = abs(result.quot);
}
break;
case 0x7:
{
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);
}
break;
case 0xB:
_CpuSet(gba);
break;