mirror of
https://github.com/libretro/mgba.git
synced 2024-11-27 18:20:33 +00:00
ARM7: Fix bank switching with LDR[B]T/STR[B]T
This commit is contained in:
parent
bb79334856
commit
6604afb670
1
CHANGES
1
CHANGES
@ -36,6 +36,7 @@ Bugfixes:
|
||||
- GBA Memory: Fix DMAs triggering two cycles early
|
||||
- ARM7: Fix STRT/STRBT
|
||||
- ARM7: Implement undefined STRH/LDRH/LDRSH/LDRSB versions
|
||||
- ARM7: Fix bank switching with LDR[B]T/STR[B]T
|
||||
Misc:
|
||||
- Qt: Window size command line options are now supported
|
||||
- Qt: Increase usability of key mapper
|
||||
|
@ -524,28 +524,32 @@ DEFINE_LOAD_STORE_MODE_3_INSTRUCTION_ARM(STRH, cpu->memory.store16(cpu, address,
|
||||
DEFINE_LOAD_STORE_T_INSTRUCTION_ARM(LDRBT,
|
||||
enum PrivilegeMode priv = cpu->privilegeMode;
|
||||
ARMSetPrivilegeMode(cpu, MODE_USER);
|
||||
cpu->gprs[rd] = cpu->memory.load8(cpu, address, ¤tCycles);
|
||||
int32_t r = cpu->memory.load8(cpu, address, ¤tCycles);
|
||||
ARMSetPrivilegeMode(cpu, priv);
|
||||
cpu->gprs[rd] = r;
|
||||
ARM_LOAD_POST_BODY;)
|
||||
|
||||
DEFINE_LOAD_STORE_T_INSTRUCTION_ARM(LDRT,
|
||||
enum PrivilegeMode priv = cpu->privilegeMode;
|
||||
ARMSetPrivilegeMode(cpu, MODE_USER);
|
||||
cpu->gprs[rd] = cpu->memory.load32(cpu, address, ¤tCycles);
|
||||
int32_t r = cpu->memory.load32(cpu, address, ¤tCycles);
|
||||
ARMSetPrivilegeMode(cpu, priv);
|
||||
cpu->gprs[rd] = r;
|
||||
ARM_LOAD_POST_BODY;)
|
||||
|
||||
DEFINE_LOAD_STORE_T_INSTRUCTION_ARM(STRBT,
|
||||
enum PrivilegeMode priv = cpu->privilegeMode;
|
||||
int32_t r = cpu->gprs[rd];
|
||||
ARMSetPrivilegeMode(cpu, MODE_USER);
|
||||
cpu->memory.store8(cpu, address, cpu->gprs[rd], ¤tCycles);
|
||||
cpu->memory.store8(cpu, address, r, ¤tCycles);
|
||||
ARMSetPrivilegeMode(cpu, priv);
|
||||
ARM_STORE_POST_BODY;)
|
||||
|
||||
DEFINE_LOAD_STORE_T_INSTRUCTION_ARM(STRT,
|
||||
enum PrivilegeMode priv = cpu->privilegeMode;
|
||||
int32_t r = cpu->gprs[rd];
|
||||
ARMSetPrivilegeMode(cpu, MODE_USER);
|
||||
cpu->memory.store32(cpu, address, cpu->gprs[rd], ¤tCycles);
|
||||
cpu->memory.store32(cpu, address, r, ¤tCycles);
|
||||
ARMSetPrivilegeMode(cpu, priv);
|
||||
ARM_STORE_POST_BODY;)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user