Bug 869525 - Use xor+setCC instead of setCC+movzbl when convenient. r=nbp

This commit is contained in:
Dan Gohman 2013-05-09 09:52:54 -07:00
parent d1df1cdf56
commit ab45040c9a

View File

@ -23,9 +23,9 @@ ICCompare_Double::Compiler::generateStubCode(MacroAssembler &masm)
Register dest = R0.scratchReg(); Register dest = R0.scratchReg();
Assembler::DoubleCondition cond = JSOpToDoubleCondition(op); Assembler::DoubleCondition cond = JSOpToDoubleCondition(op);
masm.xorl(dest, dest);
masm.compareDouble(cond, FloatReg0, FloatReg1); masm.compareDouble(cond, FloatReg0, FloatReg1);
masm.setCC(Assembler::ConditionFromDoubleCondition(cond), dest); masm.setCC(Assembler::ConditionFromDoubleCondition(cond), dest);
masm.movzxbl(dest, dest);
// Check for NaN, if needed. // Check for NaN, if needed.
Assembler::NaNCond nanCond = Assembler::NaNCondFromDoubleCondition(cond); Assembler::NaNCond nanCond = Assembler::NaNCondFromDoubleCondition(cond);