jitstate: Rename fields s/guest_FPSCR/FPSCR/

This commit is contained in:
MerryMage 2016-09-05 14:39:17 +01:00
parent 6d53bb6d7e
commit 1f61a3d7bc
4 changed files with 11 additions and 11 deletions

View file

@ -366,7 +366,7 @@ void EmitX64::EmitGetFpscrNZCV(IR::Block&, IR::Inst* inst) {
Xbyak::Reg32 result = reg_alloc.DefGpr(inst).cvt32(); 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) { 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(); 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) { 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->mov(ecx, MJitStateReg(Arm::Reg::PC));
code->and_(ebx, u32((1 << 5) | (1 << 9))); code->and_(ebx, u32((1 << 5) | (1 << 9)));
code->shr(ebx, 2); 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->shl(rbx, 32);
code->or_(rbx, rcx); code->or_(rbx, rcx);

View file

@ -47,7 +47,7 @@ struct Jit::Impl {
size_t Execute(size_t cycle_count) { size_t Execute(size_t cycle_count) {
u32 pc = jit_state.Reg[15]; 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; CodePtr code_ptr = GetBasicBlock(descriptor).code_ptr;
return block_of_code.RunCode(&jit_state, code_ptr, cycle_count); return block_of_code.RunCode(&jit_state, code_ptr, cycle_count);

View file

@ -79,12 +79,12 @@ constexpr u32 FPSCR_MODE_MASK = IR::LocationDescriptor::FPSCR_MODE_MASK;
constexpr u32 FPSCR_NZCV_MASK = 0xF0000000; constexpr u32 FPSCR_NZCV_MASK = 0xF0000000;
u32 JitState::Fpscr() const { u32 JitState::Fpscr() const {
ASSERT((guest_FPSCR_mode & ~FPSCR_MODE_MASK) == 0); ASSERT((FPSCR_mode & ~FPSCR_MODE_MASK) == 0);
ASSERT((guest_FPSCR_nzcv & ~FPSCR_NZCV_MASK) == 0); ASSERT((FPSCR_nzcv & ~FPSCR_NZCV_MASK) == 0);
ASSERT((FPSCR_IDC & ~(1 << 7)) == 0); ASSERT((FPSCR_IDC & ~(1 << 7)) == 0);
ASSERT((FPSCR_UFC & ~(1 << 3)) == 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 & 0b0000000000001); // IOC = IE
FPSCR |= (guest_MXCSR & 0b0000000111100) >> 1; // IXC, UFC, OFC, DZC = PE, UE, OE, ZE FPSCR |= (guest_MXCSR & 0b0000000111100) >> 1; // IXC, UFC, OFC, DZC = PE, UE, OE, ZE
FPSCR |= FPSCR_IDC; FPSCR |= FPSCR_IDC;
@ -95,8 +95,8 @@ u32 JitState::Fpscr() const {
void JitState::SetFpscr(u32 FPSCR) { void JitState::SetFpscr(u32 FPSCR) {
old_FPSCR = FPSCR; old_FPSCR = FPSCR;
guest_FPSCR_mode = FPSCR & FPSCR_MODE_MASK; FPSCR_mode = FPSCR & FPSCR_MODE_MASK;
guest_FPSCR_nzcv = FPSCR & FPSCR_NZCV_MASK; FPSCR_nzcv = FPSCR & FPSCR_NZCV_MASK;
guest_MXCSR = 0; guest_MXCSR = 0;
// Exception masks / enables // Exception masks / enables

View file

@ -47,8 +47,8 @@ struct JitState {
u32 FPSCR_IDC = 0; u32 FPSCR_IDC = 0;
u32 FPSCR_UFC = 0; u32 FPSCR_UFC = 0;
u32 guest_FPSCR_mode = 0; u32 FPSCR_mode = 0;
u32 guest_FPSCR_nzcv = 0; u32 FPSCR_nzcv = 0;
u32 old_FPSCR = 0; u32 old_FPSCR = 0;
u32 Fpscr() const; u32 Fpscr() const;
void SetFpscr(u32 FPSCR); void SetFpscr(u32 FPSCR);