all repos — mgba @ 8cba417141eec8b1a165cf14516e90bc72302f7f

mGBA Game Boy Advance Emulator

ARM: Fix warnings
Vicki Pfau vi@endrift.com
Mon, 03 Aug 2020 20:30:05 -0700
commit

8cba417141eec8b1a165cf14516e90bc72302f7f

parent

41211639ba654e54ad1a1212682e4f829f3aad33

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

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

@@ -447,12 +447,12 @@

#define ARM_MS_POST_store ARMSetPrivilegeMode(cpu, privilegeMode); #define ARM_MS_POST_load \ - if ((rs & 0x8000) && _ARMModeHasSPSR(cpu->cpsr.priv)) { \ + if (!(rs & 0x8000)) { \ + ARMSetPrivilegeMode(cpu, privilegeMode); \ + } else if (_ARMModeHasSPSR(cpu->cpsr.priv)) { \ cpu->cpsr = cpu->spsr; \ _ARMReadCPSR(cpu); \ - } else { \ - ARMSetPrivilegeMode(cpu, privilegeMode); \ - } \ + } #define DEFINE_LOAD_STORE_MULTIPLE_INSTRUCTION_EX_ARM(NAME, LS, WRITEBACK, S_PRE, S_POST, DIRECTION, POST_BODY) \ DEFINE_INSTRUCTION_ARM(NAME, \