Core: Update abs.s for recompiler

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

View File

@ -7853,11 +7853,30 @@ void CX86RecompilerOps::COP1_S_DIV()
void CX86RecompilerOps::COP1_S_ABS()
{
CompileCop1Test();
m_RegWorkingSet.FixRoundModel(CRegInfo::RoundDefault);
m_RegWorkingSet.Load_FPR_ToTop(m_Opcode.fd, m_Opcode.fs, CRegInfo::FPU_Float);
m_Assembler.fabs();
m_RegWorkingSet.UnMap_FPR(m_Opcode.fd, true);
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.fabs();
m_RegWorkingSet.SetX86Protected(GetIndexFromX86Reg(TempReg), false);
CompileCheckFPUResult32(m_Opcode.fd);
m_RegWorkingSet.SetFPTopAs(m_Opcode.fd);
}
else
{
CompileCop1Test();
m_RegWorkingSet.FixRoundModel(CRegInfo::RoundDefault);
m_RegWorkingSet.Load_FPR_ToTop(m_Opcode.fd, m_Opcode.fs, CRegInfo::FPU_Float);
m_Assembler.fabs();
m_RegWorkingSet.UnMap_FPR(m_Opcode.fd, true);
}
}
void CX86RecompilerOps::COP1_S_NEG()