diff --git a/rpcs3/Emu/Cell/PPUTranslator.cpp b/rpcs3/Emu/Cell/PPUTranslator.cpp index 36b7f4afd7..4f63fb7191 100644 --- a/rpcs3/Emu/Cell/PPUTranslator.cpp +++ b/rpcs3/Emu/Cell/PPUTranslator.cpp @@ -3690,7 +3690,7 @@ void PPUTranslator::FCTIW(ppu_opcode_t op) //const auto sat_h = m_ir->CreateFCmpOGE(b, ConstantFP::get(GetType(), std::pow(2, 31))); //const auto converted = m_ir->CreateFPToSI(FP_SAT_OP(sat_l, b), GetType()); //SetFpr(op.frd, m_ir->CreateSelect(sat_h, m_ir->getInt64(0x7fffffff), converted)); - SetFpr(op.frd, m_ir->CreateFPToSI(b, GetType())); + SetFpr(op.frd, Call(GetType(), "llvm.x86.sse2.cvtsd2si", m_ir->CreateInsertElement(GetUndef(), b, uint64_t{0}))); //SetFPSCR_FR(Call(GetType(), m_pure_attr, "__fctiw_get_fr", b)); //SetFPSCR_FI(Call(GetType(), m_pure_attr, "__fctiw_get_fi", b)); @@ -3936,7 +3936,7 @@ void PPUTranslator::FCTID(ppu_opcode_t op) //const auto sat_h = m_ir->CreateFCmpOGE(b, ConstantFP::get(GetType(), std::pow(2, 63))); //const auto converted = m_ir->CreateFPToSI(FP_SAT_OP(sat_l, b), GetType()); //SetFpr(op.frd, m_ir->CreateSelect(sat_h, m_ir->getInt64(0x7fffffffffffffff), converted)); - SetFpr(op.frd, m_ir->CreateFPToSI(b, GetType())); + SetFpr(op.frd, Call(GetType(), "llvm.x86.sse2.cvtsd2si64", m_ir->CreateInsertElement(GetUndef(), b, uint64_t{0}))); //SetFPSCR_FR(Call(GetType(), m_pure_attr, "__fctid_get_fr", b)); //SetFPSCR_FI(Call(GetType(), m_pure_attr, "__fctid_get_fi", b));