Skip to content

Commit

Permalink
EE: replace EE/FPU mov opcode when FPU_RECOMPILE isn't enabled
Browse files Browse the repository at this point in the history
It will be easier for testing if we change the format of the FPU register
  • Loading branch information
gregory38 committed Feb 11, 2016
1 parent 122baa1 commit 50caca4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
10 changes: 10 additions & 0 deletions pcsx2/x86/iFPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ static const __aligned16 u32 s_pos[4] = { 0x7fffffff, 0xffffffff, 0xffffffff, 0x
// *FPU Opcodes!*
//------------------------------------------------------------------

// Those opcode are marked as special ! But I don't understand why we can't run them in the interpreter
#ifndef FPU_RECOMPILE

REC_FPUFUNC(CFC1);
REC_FPUFUNC(CTC1);
REC_FPUFUNC(MFC1);
REC_FPUFUNC(MTC1);

#else

//------------------------------------------------------------------
// CFC1 / CTC1
Expand Down Expand Up @@ -260,6 +269,7 @@ void recMTC1()
}
}
}
#endif
//------------------------------------------------------------------


Expand Down
10 changes: 9 additions & 1 deletion pcsx2/x86/ix86-32/iR5900LoadStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,9 @@ void recSDR()

void recLWC1()
{
#ifndef FPU_RECOMPILE
recCall(::R5900::Interpreter::OpcodeImpl::LWC1);
#else
_deleteFPtoXMMreg(_Rt_, 2);

if (GPR_IS_CONST1(_Rs_))
Expand All @@ -521,12 +524,16 @@ void recLWC1()
xMOV(ptr32[&fpuRegs.fpr[_Rt_].UL], eax);

EE::Profiler.EmitOp(eeOpcode::LWC1);
#endif
}

////////////////////////////////////////////////////
//////////////////////////////////////////////////////

void recSWC1()
{
#ifndef FPU_RECOMPILE
recCall(::R5900::Interpreter::OpcodeImpl::SWC1);
#else
_deleteFPtoXMMreg(_Rt_, 1);

xMOV(edx, ptr32[&fpuRegs.fpr[_Rt_].UL] );
Expand All @@ -548,6 +555,7 @@ void recSWC1()
}

EE::Profiler.EmitOp(eeOpcode::SWC1);
#endif
}

////////////////////////////////////////////////////
Expand Down

0 comments on commit 50caca4

Please sign in to comment.