From 1f61a3d7bc9016471b18fa5294ef68f228005d09 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 5 Sep 2016 14:39:17 +0100 Subject: [PATCH] jitstate: Rename fields s/guest_FPSCR/FPSCR/ --- src/backend_x64/emit_x64.cpp | 6 +++--- src/backend_x64/interface_x64.cpp | 2 +- src/backend_x64/jitstate.cpp | 10 +++++----- src/backend_x64/jitstate.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/backend_x64/emit_x64.cpp b/src/backend_x64/emit_x64.cpp index 731d341a..25d078d3 100644 --- a/src/backend_x64/emit_x64.cpp +++ b/src/backend_x64/emit_x64.cpp @@ -366,7 +366,7 @@ void EmitX64::EmitGetFpscrNZCV(IR::Block&, IR::Inst* inst) { Xbyak::Reg32 result = reg_alloc.DefGpr(inst).cvt32(); - code->mov(result, dword[r15 + offsetof(JitState, guest_FPSCR_nzcv)]); + code->mov(result, dword[r15 + offsetof(JitState, FPSCR_nzcv)]); } void EmitX64::EmitSetFpscrNZCV(IR::Block&, IR::Inst* inst) { @@ -374,7 +374,7 @@ void EmitX64::EmitSetFpscrNZCV(IR::Block&, IR::Inst* inst) { Xbyak::Reg32 value = reg_alloc.UseGpr(inst->GetArg(0)).cvt32(); - code->mov(dword[r15 + offsetof(JitState, guest_FPSCR_nzcv)], value); + code->mov(dword[r15 + offsetof(JitState, FPSCR_nzcv)], value); } void EmitX64::EmitPushRSB(IR::Block&, IR::Inst* inst) { @@ -2272,7 +2272,7 @@ void EmitX64::EmitTerminalPopRSBHint(IR::Term::PopRSBHint, IR::LocationDescripto code->mov(ecx, MJitStateReg(Arm::Reg::PC)); code->and_(ebx, u32((1 << 5) | (1 << 9))); code->shr(ebx, 2); - code->or_(ebx, dword[r15 + offsetof(JitState, guest_FPSCR_mode)]); + code->or_(ebx, dword[r15 + offsetof(JitState, FPSCR_mode)]); code->shl(rbx, 32); code->or_(rbx, rcx); diff --git a/src/backend_x64/interface_x64.cpp b/src/backend_x64/interface_x64.cpp index 987d009c..8655bbd5 100644 --- a/src/backend_x64/interface_x64.cpp +++ b/src/backend_x64/interface_x64.cpp @@ -47,7 +47,7 @@ struct Jit::Impl { size_t Execute(size_t cycle_count) { u32 pc = jit_state.Reg[15]; - IR::LocationDescriptor descriptor{pc, Arm::PSR{jit_state.Cpsr}, Arm::FPSCR{jit_state.guest_FPSCR_mode}}; + IR::LocationDescriptor descriptor{pc, Arm::PSR{jit_state.Cpsr}, Arm::FPSCR{jit_state.FPSCR_mode}}; CodePtr code_ptr = GetBasicBlock(descriptor).code_ptr; return block_of_code.RunCode(&jit_state, code_ptr, cycle_count); diff --git a/src/backend_x64/jitstate.cpp b/src/backend_x64/jitstate.cpp index 52378bdc..98b33df3 100644 --- a/src/backend_x64/jitstate.cpp +++ b/src/backend_x64/jitstate.cpp @@ -79,12 +79,12 @@ constexpr u32 FPSCR_MODE_MASK = IR::LocationDescriptor::FPSCR_MODE_MASK; constexpr u32 FPSCR_NZCV_MASK = 0xF0000000; u32 JitState::Fpscr() const { - ASSERT((guest_FPSCR_mode & ~FPSCR_MODE_MASK) == 0); - ASSERT((guest_FPSCR_nzcv & ~FPSCR_NZCV_MASK) == 0); + ASSERT((FPSCR_mode & ~FPSCR_MODE_MASK) == 0); + ASSERT((FPSCR_nzcv & ~FPSCR_NZCV_MASK) == 0); ASSERT((FPSCR_IDC & ~(1 << 7)) == 0); ASSERT((FPSCR_UFC & ~(1 << 3)) == 0); - u32 FPSCR = guest_FPSCR_mode | guest_FPSCR_nzcv; + u32 FPSCR = FPSCR_mode | FPSCR_nzcv; FPSCR |= (guest_MXCSR & 0b0000000000001); // IOC = IE FPSCR |= (guest_MXCSR & 0b0000000111100) >> 1; // IXC, UFC, OFC, DZC = PE, UE, OE, ZE FPSCR |= FPSCR_IDC; @@ -95,8 +95,8 @@ u32 JitState::Fpscr() const { void JitState::SetFpscr(u32 FPSCR) { old_FPSCR = FPSCR; - guest_FPSCR_mode = FPSCR & FPSCR_MODE_MASK; - guest_FPSCR_nzcv = FPSCR & FPSCR_NZCV_MASK; + FPSCR_mode = FPSCR & FPSCR_MODE_MASK; + FPSCR_nzcv = FPSCR & FPSCR_NZCV_MASK; guest_MXCSR = 0; // Exception masks / enables diff --git a/src/backend_x64/jitstate.h b/src/backend_x64/jitstate.h index 38a8c0be..1dc11b02 100644 --- a/src/backend_x64/jitstate.h +++ b/src/backend_x64/jitstate.h @@ -47,8 +47,8 @@ struct JitState { u32 FPSCR_IDC = 0; u32 FPSCR_UFC = 0; - u32 guest_FPSCR_mode = 0; - u32 guest_FPSCR_nzcv = 0; + u32 FPSCR_mode = 0; + u32 FPSCR_nzcv = 0; u32 old_FPSCR = 0; u32 Fpscr() const; void SetFpscr(u32 FPSCR);