- ptest is a SSE 4.1 instruction

This commit is contained in:
Magnus Norddahl 2018-12-02 20:44:36 +01:00
parent 2e383073e8
commit d88d173b38

View file

@ -708,7 +708,9 @@ void JitCompiler::EmitMULF_RK()
void JitCompiler::EmitDIVF_RR()
{
auto label = EmitThrowExceptionLabel(X_DIVISION_BY_ZERO);
cc.ptest(regF[C], regF[C]);
auto zero = newTempXmmSd();
cc.xorpd(zero, zero);
cc.ucomisd(regF[C], zero);
cc.je(label);
auto rc = CheckRegF(C, A);
@ -748,7 +750,9 @@ static double DoubleModF(double a, double b)
void JitCompiler::EmitMODF_RR()
{
auto label = EmitThrowExceptionLabel(X_DIVISION_BY_ZERO);
cc.ptest(regF[C], regF[C]);
auto zero = newTempXmmSd();
cc.xorpd(zero, zero);
cc.ucomisd(regF[C], zero);
cc.je(label);
auto result = newResultXmmSd();
@ -787,7 +791,9 @@ void JitCompiler::EmitMODF_KR()
using namespace asmjit;
auto label = EmitThrowExceptionLabel(X_DIVISION_BY_ZERO);
cc.ptest(regF[C], regF[C]);
auto zero = newTempXmmSd();
cc.xorpd(zero, zero);
cc.ucomisd(regF[C], zero);
cc.je(label);
auto tmp = newTempXmmSd();