all repos — mgba @ 2e78381e55e6335f305c085a143d5b68098a134f

mGBA Game Boy Advance Emulator

Implement SWI
Jeffrey Pfau jeffrey@endrift.com
Sat, 27 Apr 2013 02:56:34 -0700
commit

2e78381e55e6335f305c085a143d5b68098a134f

parent

6c44cf8dfc43376bdcb7dd385412bd00b3103dcb

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

jump to
M src/arm/isa-arm.csrc/arm/isa-arm.c

@@ -663,7 +663,7 @@ int32_t mask = (c ? 0x000000FF : 0) | (f ? 0xFF000000 : 0);

mask &= PSR_USER_MASK | PSR_PRIV_MASK | PSR_STATE_MASK; cpu->spsr.packed = (cpu->spsr.packed & ~mask) | (operand & mask);) -DEFINE_INSTRUCTION_ARM(SWI, ARM_STUB) +DEFINE_INSTRUCTION_ARM(SWI, cpu->board->swi32(cpu->board, opcode & 0xFFFFFF)) #define DECLARE_INSTRUCTION_ARM(EMITTER, NAME) \ EMITTER ## NAME
M src/gba/gba-bios.csrc/gba/gba-bios.c

@@ -134,7 +134,7 @@ }

} void GBASwi32(struct ARMBoard* board, int immediate) { - GBASwi32(board, immediate >> 16); + GBASwi16(board, immediate >> 16); } static void _unLz77(struct GBAMemory* memory, uint32_t source, uint8_t* dest) {