ARM: Move shifter call to avoid stack usage

This commit is contained in:
Vicki Pfau 2020-11-01 02:28:18 -08:00
parent a53b01be00
commit e9b5190369
1 changed files with 1 additions and 1 deletions

View File

@ -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) { \