mirror of https://github.com/mgba-emu/mgba.git
ARM: Move shifter call to avoid stack usage
This commit is contained in:
parent
a53b01be00
commit
e9b5190369
|
@ -284,13 +284,13 @@ ATTRIBUTE_NOINLINE static void _neutralS(struct ARMCore* cpu, int32_t d) {
|
|||
|
||||
#define DEFINE_ALU_INSTRUCTION_EX_ARM(NAME, S_BODY, SHIFTER, BODY) \
|
||||
DEFINE_INSTRUCTION_ARM(NAME, \
|
||||
SHIFTER(cpu, opcode); \
|
||||
int rd = (opcode >> 12) & 0xF; \
|
||||
int rn = (opcode >> 16) & 0xF; \
|
||||
int32_t n = cpu->gprs[rn]; \
|
||||
if (UNLIKELY(rn == ARM_PC && (opcode & 0x02000010) == 0x00000010)) { \
|
||||
n += WORD_SIZE_ARM; \
|
||||
} \
|
||||
SHIFTER(cpu, opcode); \
|
||||
BODY; \
|
||||
S_BODY; \
|
||||
if (rd == ARM_PC) { \
|
||||
|
|
Loading…
Reference in New Issue