mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-20 14:11:42 +00:00
Revert "Fix Comp_VRot on x86 Linux/Mac/etc."
Seems broken, doesn't built on Windows. This reverts commit d41acebb3de06710fd71a757f598e7c95037166c.
This commit is contained in:
parent
b2298a9e86
commit
c4e02ab41d
@ -1926,33 +1926,13 @@ void Jit::Comp_Vfim(MIPSOpcode op) {
|
|||||||
|
|
||||||
static float sincostemp[2];
|
static float sincostemp[2];
|
||||||
|
|
||||||
union u32float {
|
void SinCos(float angle) {
|
||||||
u32 u;
|
|
||||||
float f;
|
|
||||||
|
|
||||||
operator float() const {
|
|
||||||
return f;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline u32float &operator *=(const float &other) {
|
|
||||||
f *= other;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef _M_X64
|
|
||||||
typedef float SinCosArg;
|
|
||||||
#else
|
|
||||||
typedef u32float SinCosArg;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void SinCos(SinCosArg angle) {
|
|
||||||
angle *= (float)1.57079632679489661923; // pi / 2
|
angle *= (float)1.57079632679489661923; // pi / 2
|
||||||
sincostemp[0] = sinf(angle);
|
sincostemp[0] = sinf(angle);
|
||||||
sincostemp[1] = cosf(angle);
|
sincostemp[1] = cosf(angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SinCosNegSin(SinCosArg angle) {
|
void SinCosNegSin(float angle) {
|
||||||
angle *= (float)1.57079632679489661923; // pi / 2
|
angle *= (float)1.57079632679489661923; // pi / 2
|
||||||
sincostemp[0] = -sinf(angle);
|
sincostemp[0] = -sinf(angle);
|
||||||
sincostemp[1] = cosf(angle);
|
sincostemp[1] = cosf(angle);
|
||||||
@ -1960,8 +1940,14 @@ void SinCosNegSin(SinCosArg angle) {
|
|||||||
|
|
||||||
// Very heavily used by FF:CC
|
// Very heavily used by FF:CC
|
||||||
void Jit::Comp_VRot(MIPSOpcode op) {
|
void Jit::Comp_VRot(MIPSOpcode op) {
|
||||||
|
// DISABLE;
|
||||||
CONDITIONAL_DISABLE;
|
CONDITIONAL_DISABLE;
|
||||||
|
|
||||||
|
// Keeping it enabled in x64 non-windows as it seems fine there.
|
||||||
|
#if defined(_M_IX86) && !defined(_WIN32)
|
||||||
|
DISABLE;
|
||||||
|
#endif
|
||||||
|
|
||||||
int vd = _VD;
|
int vd = _VD;
|
||||||
int vs = _VS;
|
int vs = _VS;
|
||||||
|
|
||||||
@ -1984,8 +1970,12 @@ void Jit::Comp_VRot(MIPSOpcode op) {
|
|||||||
MOVSS(XMM0, fpr.V(sreg));
|
MOVSS(XMM0, fpr.V(sreg));
|
||||||
ABI_CallFunction(negSin ? (void *)&SinCosNegSin : (void *)&SinCos);
|
ABI_CallFunction(negSin ? (void *)&SinCosNegSin : (void *)&SinCos);
|
||||||
#else
|
#else
|
||||||
// Sigh, passing floats with cdecl isn't pretty, ends up on the stack.
|
// Sigh, passing floats with cdecl isn't pretty.
|
||||||
ABI_CallFunction(negSin ? (void *)&SinCosNegSin : (void *)&SinCos, fpr.V(sreg));
|
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
|
#endif
|
||||||
|
|
||||||
MOVSS(XMM0, M(&sincostemp[0]));
|
MOVSS(XMM0, M(&sincostemp[0]));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user