Core: Update neg.s for the recompiler

This commit is contained in:
zilmar 2024-02-01 18:17:03 +10:30
parent b6671adf5d
commit ad1a2a2d9a
1 changed files with 24 additions and 5 deletions

View File

@ -7880,6 +7880,24 @@ void CX86RecompilerOps::COP1_S_ABS()
}
void CX86RecompilerOps::COP1_S_NEG()
{
if (FpuExceptionInRecompiler())
{
CompileInitFpuOperation(CRegInfo::RoundUnknown);
if (m_RegWorkingSet.RegInStack(m_Opcode.fs, CRegInfo::FPU_Any))
{
g_Notify->BreakPoint(__FILE__, __LINE__);
return;
}
asmjit::x86::Gp TempReg = m_RegWorkingSet.FPRValuePointer(m_Opcode.fs, CRegInfo::FPU_FloatLow);
CompileCheckFPUInput32(TempReg);
m_RegWorkingSet.PrepareFPTopToBe(m_Opcode.fd, m_Opcode.fs, CRegInfo::FPU_Float);
m_Assembler.fchs();
m_RegWorkingSet.SetX86Protected(GetIndexFromX86Reg(TempReg), false);
CompileCheckFPUResult32(m_Opcode.fd);
m_RegWorkingSet.SetFPTopAs(m_Opcode.fd);
}
else
{
CompileCop1Test();
m_RegWorkingSet.FixRoundModel(CRegInfo::RoundDefault);
@ -7887,6 +7905,7 @@ void CX86RecompilerOps::COP1_S_NEG()
m_Assembler.fchs();
m_RegWorkingSet.UnMap_FPR(m_Opcode.fd, true);
}
}
void CX86RecompilerOps::COP1_S_SQRT()
{