From 9a2eaad15cb90dcf7532d19de670852a487c7b90 Mon Sep 17 00:00:00 2001 From: pengvado Date: Wed, 19 Sep 2012 16:34:21 +0000 Subject: [PATCH] JIT: fix compilation on gcc regression in r4372 --- desmume/src/arm_jit.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/desmume/src/arm_jit.cpp b/desmume/src/arm_jit.cpp index 892e0907f..d79891b9d 100644 --- a/desmume/src/arm_jit.cpp +++ b/desmume/src/arm_jit.cpp @@ -243,12 +243,12 @@ static GPVar total_cycles; #define cpu_ptr(x) dword_ptr(bb_cpu, offsetof(armcpu_t, x)) #define cpu_ptr_byte(x, y) byte_ptr(bb_cpu, offsetof(armcpu_t, x) + y) #define flags_ptr cpu_ptr_byte(CPSR.val, 3) -#define reg_ptr(x) dword_ptr(bb_cpu, offsetof(armcpu_t, R[x])) -#define reg_pos_ptr(x) dword_ptr(bb_cpu, offsetof(armcpu_t, R[REG_POS(i,(x))])) -#define reg_pos_ptrL(x) word_ptr( bb_cpu, offsetof(armcpu_t, R[REG_POS(i,(x))])) -#define reg_pos_ptrH(x) word_ptr( bb_cpu, offsetof(armcpu_t, R[REG_POS(i,(x))]) + 2) -#define reg_pos_ptrB(x) byte_ptr( bb_cpu, offsetof(armcpu_t, R[REG_POS(i,(x))])) -#define reg_pos_thumb(x) dword_ptr(bb_cpu, offsetof(armcpu_t, R[(i>>(x))&0x7])) +#define reg_ptr(x) dword_ptr(bb_cpu, offsetof(armcpu_t, R) + 4*(x)) +#define reg_pos_ptr(x) dword_ptr(bb_cpu, offsetof(armcpu_t, R) + 4*REG_POS(i,(x))) +#define reg_pos_ptrL(x) word_ptr( bb_cpu, offsetof(armcpu_t, R) + 4*REG_POS(i,(x))) +#define reg_pos_ptrH(x) word_ptr( bb_cpu, offsetof(armcpu_t, R) + 4*REG_POS(i,(x)) + 2) +#define reg_pos_ptrB(x) byte_ptr( bb_cpu, offsetof(armcpu_t, R) + 4*REG_POS(i,(x))) +#define reg_pos_thumb(x) dword_ptr(bb_cpu, offsetof(armcpu_t, R) + 4*((i>>(x))&0x7)) #define cp15_ptr(x) dword_ptr(bb_cp15, offsetof(armcp15_t, x)) #define mmu_ptr(x) dword_ptr(bb_mmu, offsetof(MMU_struct, x)) #define mmu_ptr_byte(x) byte_ptr(bb_mmu, offsetof(MMU_struct, x))