From cf2414276928b5da55b1e468530a1d4157ce7b68 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 5 Apr 2016 09:41:23 +0100 Subject: [PATCH] fixup! JitState: Should be final and should have initial values --- src/core/arm/jit_x64/common.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/core/arm/jit_x64/common.h b/src/core/arm/jit_x64/common.h index 926ecda6e..e7a25ca4d 100644 --- a/src/core/arm/jit_x64/common.h +++ b/src/core/arm/jit_x64/common.h @@ -25,7 +25,7 @@ using Cond = ArmDecoder::Cond; using ShiftType = ArmDecoder::ShiftType; using SignExtendRotation = ArmDecoder::SignExtendRotation; -struct JitState { +struct JitState final { JitState() : cpu_state(PrivilegeMode::USER32MODE) {} void Reset() { cpu_state.Reset(); @@ -33,10 +33,12 @@ struct JitState { ARMul_State cpu_state; - u64 save_host_RSP; - u64 return_RIP; - - s32 cycles_remaining; + /// This value should always be appropriately aligned for a CALL instruction to be made. + u64 save_host_RSP = 0; + /// Jitted code will JMP to this value when done. Should contain the an address which returns to the dispatcher. + u64 return_RIP = 0; + /// If this value becomes <= 0, jitted code will jump to return_RIP. + s32 cycles_remaining = 0; }; constexpr bool IsValidArmReg(ArmReg arm_reg) {