From 8ae0bf93e7874d7556b62e75f2debaae1c1f5ae3 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Sun, 3 Jan 2021 15:25:53 +0000 Subject: [PATCH] JitArm64: Do not use offsetof on non-standard-layout types Applying PR #8687 to Arm64 JIT. --- Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp b/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp index 727f2b8236..1e5b785bbd 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp @@ -105,18 +105,18 @@ void JitArm64::GenerateAsm() // b.effectiveAddress != addr || b.msrBits != msr ARM64Reg pc_and_msr = W25; ARM64Reg pc_and_msr2 = W24; - LDR(INDEX_UNSIGNED, pc_and_msr, block, offsetof(JitBlock, effectiveAddress)); + LDR(INDEX_UNSIGNED, pc_and_msr, block, offsetof(JitBlockData, effectiveAddress)); CMP(pc_and_msr, DISPATCHER_PC); FixupBranch pc_missmatch = B(CC_NEQ); LDR(INDEX_UNSIGNED, pc_and_msr2, PPC_REG, PPCSTATE_OFF(msr)); ANDI2R(pc_and_msr2, pc_and_msr2, JitBaseBlockCache::JIT_CACHE_MSR_MASK); - LDR(INDEX_UNSIGNED, pc_and_msr, block, offsetof(JitBlock, msrBits)); + LDR(INDEX_UNSIGNED, pc_and_msr, block, offsetof(JitBlockData, msrBits)); CMP(pc_and_msr, pc_and_msr2); FixupBranch msr_missmatch = B(CC_NEQ); // return blocks[block_num].normalEntry; - LDR(INDEX_UNSIGNED, block, block, offsetof(JitBlock, normalEntry)); + LDR(INDEX_UNSIGNED, block, block, offsetof(JitBlockData, normalEntry)); BR(block); SetJumpTarget(not_found); SetJumpTarget(pc_missmatch);