mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 10:21:21 +00:00
Support FCTID/FCTIW instructions
This commit is contained in:
parent
5d1cafdebc
commit
4eb4186b5c
@ -3919,7 +3919,12 @@ void PPULLVMRecompiler::FRSP(u32 frd, u32 frb, bool rc) {
|
||||
}
|
||||
|
||||
void PPULLVMRecompiler::FCTIW(u32 frd, u32 frb, bool rc) {
|
||||
InterpreterCall("FCTIW", &PPUInterpreter::FCTIW, frd, frb, rc);
|
||||
auto rb_f64 = GetFpr(frb);
|
||||
auto res_i32 = m_ir_builder->CreateFPToSI(rb_f64, m_ir_builder->getInt32Ty());
|
||||
SetFpr(frd, res_i32);
|
||||
|
||||
// TODO: Set flags / Handle NaN / Implement Saturation
|
||||
//InterpreterCall("FCTIW", &PPUInterpreter::FCTIW, frd, frb, rc);
|
||||
}
|
||||
|
||||
void PPULLVMRecompiler::FCTIWZ(u32 frd, u32 frb, bool rc) {
|
||||
@ -4070,7 +4075,12 @@ void PPULLVMRecompiler::FABS(u32 frd, u32 frb, bool rc) {
|
||||
}
|
||||
|
||||
void PPULLVMRecompiler::FCTID(u32 frd, u32 frb, bool rc) {
|
||||
InterpreterCall("FCTID", &PPUInterpreter::FCTID, frd, frb, rc);
|
||||
auto rb_f64 = GetFpr(frb);
|
||||
auto res_i64 = m_ir_builder->CreateFPToSI(rb_f64, m_ir_builder->getInt64Ty());
|
||||
SetFpr(frd, res_i64);
|
||||
|
||||
// TODO: Set flags / Handle NaN / Implement Saturation
|
||||
//InterpreterCall("FCTID", &PPUInterpreter::FCTID, frd, frb, rc);
|
||||
}
|
||||
|
||||
void PPULLVMRecompiler::FCTIDZ(u32 frd, u32 frb, bool rc) {
|
||||
|
@ -613,7 +613,9 @@ void PPULLVMRecompiler::RunAllTests(PPUThread * ppu_state, PPUInterpreter * inte
|
||||
VERIFY_INSTRUCTION_AGAINST_INTERPRETER_USING_RANDOM_INPUT(FNABS, 0, 5, 0, 1, false);
|
||||
VERIFY_INSTRUCTION_AGAINST_INTERPRETER_USING_RANDOM_INPUT(FABS, 0, 5, 0, 1, false);
|
||||
VERIFY_INSTRUCTION_AGAINST_INTERPRETER_USING_RANDOM_INPUT(FCFID, 0, 5, 0, 1, false);
|
||||
|
||||
VERIFY_INSTRUCTION_AGAINST_INTERPRETER_USING_RANDOM_INPUT(FCTID, 0, 5, 0, 1, false);
|
||||
VERIFY_INSTRUCTION_AGAINST_INTERPRETER_USING_RANDOM_INPUT(FCTIW, 0, 5, 0, 1, false);
|
||||
|
||||
PPUState input;
|
||||
input.SetRandom(0x10000);
|
||||
input.GPR[14] = 10;
|
||||
|
@ -423,7 +423,7 @@ void MainFrame::Config(wxCommandEvent& WXUNUSED(event))
|
||||
cbox_cpu_decoder->Append("PPU JIT (LLVM)");
|
||||
|
||||
cbox_spu_decoder->Append("SPU Interpreter");
|
||||
cbox_spu_decoder->Append("SPU JIT (asmjit)");
|
||||
cbox_spu_decoder->Append("SPU JIT (ASMJIT)");
|
||||
|
||||
cbox_gs_render->Append("Null");
|
||||
cbox_gs_render->Append("OpenGL");
|
||||
|
Loading…
x
Reference in New Issue
Block a user