From 3341e7e7fccc38ec79499a3ac988ff170fba4130 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sun, 28 Jul 2013 22:20:32 +0200 Subject: [PATCH] Fix VROT on 32-bit x86 --- Core/MIPS/x86/CompVFPU.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index 18cf9a8037..48d8d5da44 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -1235,8 +1235,18 @@ void Jit::Comp_VRot(u32 op) { bool negSin = (imm & 0x10) ? true : false; +#ifdef _M_X64 MOVSS(XMM0, fpr.V(sreg)); ABI_CallFunction(negSin ? (void *)&SinCosNegSin : (void *)&SinCos); +#else + // Sigh, passing floats with cdecl isn't pretty. + MOVSS(XMM0, fpr.V(sreg)); + SUB(32, R(ESP), Imm32(4)); + MOVSS(MatR(ESP), XMM0); + ABI_CallFunction(negSin ? (void *)&SinCosNegSin : (void *)&SinCos); + ADD(32, R(ESP), Imm32(4)); +#endif + MOVSS(XMM0, M(&sincostemp[0])); MOVSS(XMM1, M(&sincostemp[1]));