all repos — mgba @ e9b51903691eb4f841b41f63a74f05ba968ea7eb

mGBA Game Boy Advance Emulator

ARM: Move shifter call to avoid stack usage
Vicki Pfau vi@endrift.com
Sun, 01 Nov 2020 02:28:18 -0800
commit

e9b51903691eb4f841b41f63a74f05ba968ea7eb

parent

a53b01be00e8fc65c1abc28c8d9d3ab59f76c209

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

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

@@ -284,13 +284,13 @@ }

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