mirror of
https://github.com/libretro/mgba.git
synced 2024-11-27 02:00:42 +00:00
ARM: Fix MSR when CPSR.T is set
This commit is contained in:
parent
5930e10cf4
commit
cb7c09e63d
1
CHANGES
1
CHANGES
@ -29,6 +29,7 @@ Bugfixes:
|
||||
- GB, GBA Savedata: Fix savestate-related save overwriting (fixes mgba.io/i/834)
|
||||
- Qt: Fix timezone issues with time overrides
|
||||
- Qt: Fix sprite export pausing game indefinitely (fixes mgba.io/i/841)
|
||||
- ARM: Fix MSR when T bit is set
|
||||
Misc:
|
||||
- GBA Timer: Use global cycles for timers
|
||||
- GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
|
||||
|
@ -663,8 +663,9 @@ DEFINE_INSTRUCTION_ARM(MSR,
|
||||
}
|
||||
_ARMReadCPSR(cpu);
|
||||
if (cpu->executionMode == MODE_THUMB) {
|
||||
LOAD_16(cpu->prefetch[0], (cpu->gprs[ARM_PC] - WORD_SIZE_THUMB) & cpu->memory.activeMask, cpu->memory.activeRegion);
|
||||
LOAD_16(cpu->prefetch[1], cpu->gprs[ARM_PC] & cpu->memory.activeMask, cpu->memory.activeRegion);
|
||||
cpu->prefetch[0] = 0x46C0; // nop
|
||||
cpu->prefetch[1] &= 0xFFFF;
|
||||
cpu->gprs[ARM_PC] += WORD_SIZE_THUMB;
|
||||
} else {
|
||||
LOAD_32(cpu->prefetch[0], (cpu->gprs[ARM_PC] - WORD_SIZE_ARM) & cpu->memory.activeMask, cpu->memory.activeRegion);
|
||||
LOAD_32(cpu->prefetch[1], cpu->gprs[ARM_PC] & cpu->memory.activeMask, cpu->memory.activeRegion);
|
||||
@ -704,8 +705,9 @@ DEFINE_INSTRUCTION_ARM(MSRI,
|
||||
}
|
||||
_ARMReadCPSR(cpu);
|
||||
if (cpu->executionMode == MODE_THUMB) {
|
||||
LOAD_16(cpu->prefetch[0], (cpu->gprs[ARM_PC] - WORD_SIZE_THUMB) & cpu->memory.activeMask, cpu->memory.activeRegion);
|
||||
LOAD_16(cpu->prefetch[1], cpu->gprs[ARM_PC] & cpu->memory.activeMask, cpu->memory.activeRegion);
|
||||
cpu->prefetch[0] = 0x46C0; // nop
|
||||
cpu->prefetch[1] &= 0xFFFF;
|
||||
cpu->gprs[ARM_PC] += WORD_SIZE_THUMB;
|
||||
} else {
|
||||
LOAD_32(cpu->prefetch[0], (cpu->gprs[ARM_PC] - WORD_SIZE_ARM) & cpu->memory.activeMask, cpu->memory.activeRegion);
|
||||
LOAD_32(cpu->prefetch[1], cpu->gprs[ARM_PC] & cpu->memory.activeMask, cpu->memory.activeRegion);
|
||||
|
Loading…
Reference in New Issue
Block a user