Beispiel #1
0
void Jit::CompFPComp(int lhs, int rhs, u8 compare, bool allowNaN)
{
	gpr.MapReg(MIPS_REG_FPCOND, false, true);
	MOVSS(XMM0, fpr.R(lhs));
	CMPSS(XMM0, fpr.R(rhs), compare);
	MOVD_xmm(gpr.R(MIPS_REG_FPCOND), XMM0);

	// This means that NaN also means true, e.g. !<> or !>, etc.
	if (allowNaN)
	{
		MOVSS(XMM0, fpr.R(lhs));
		CMPUNORDSS(XMM0, fpr.R(rhs));

		MOVD_xmm(R(EAX), XMM0);
		OR(32, gpr.R(MIPS_REG_FPCOND), R(EAX));
	}
}
Beispiel #2
0
void Jit::CompFPComp(int lhs, int rhs, u8 compare, bool allowNaN)
{
	MOVSS(XMM0, fpr.R(lhs));
	CMPSS(XMM0, fpr.R(rhs), compare);
	MOVSS(M(&currentMIPS->fpcond), XMM0);

	// This means that NaN also means true, e.g. !<> or !>, etc.
	if (allowNaN)
	{
		MOVSS(XMM0, fpr.R(lhs));
		CMPUNORDSS(XMM0, fpr.R(rhs));
		MOVSS(M(&ssCompareTemp), XMM0);

		MOV(32, R(EAX), M(&ssCompareTemp));
		OR(32, M(&currentMIPS->fpcond), R(EAX));
	}
}
Beispiel #3
0
void Jit::CompFPComp(int lhs, int rhs, u8 compare, bool allowNaN) {
	gpr.MapReg(MIPS_REG_FPCOND, false, true);

	// This means that NaN also means true, e.g. !<> or !>, etc.
	if (allowNaN) {
		CopyFPReg(XMM0, fpr.R(lhs));
		CopyFPReg(XMM1, fpr.R(lhs));
		CMPSS(XMM0, fpr.R(rhs), compare);
		CMPUNORDSS(XMM1, fpr.R(rhs));

		POR(XMM0, R(XMM1));
	} else {
		CopyFPReg(XMM0, fpr.R(lhs));
		CMPSS(XMM0, fpr.R(rhs), compare);
	}

	MOVD_xmm(gpr.R(MIPS_REG_FPCOND), XMM0);
}