MIPS: Skip canonicalization check in LStoreKeyedFastDoubleElement when it is not needed
Port r11278 (e5dc7ebd). Original commit message: Skip canonicalization check in LStoreKeyedFastDoubleElement when it is not needed: - if value is a result of integer32 to double conversion (can't be NaN); - if value was loaded from fast double backing store (already canonicalized). BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10071004 Patch from Daniel Kalmar <kalmard@homejinni.com>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
b635c90792
commit
bf2bc0b1db
@ -3567,14 +3567,16 @@ void LCodeGen::DoStoreKeyedFastDoubleElement(
|
||||
Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag));
|
||||
}
|
||||
|
||||
Label is_nan;
|
||||
// Check for NaN. All NaNs must be canonicalized.
|
||||
__ BranchF(NULL, &is_nan, eq, value, value);
|
||||
__ Branch(¬_nan);
|
||||
if (instr->NeedsCanonicalization()) {
|
||||
Label is_nan;
|
||||
// Check for NaN. All NaNs must be canonicalized.
|
||||
__ BranchF(NULL, &is_nan, eq, value, value);
|
||||
__ Branch(¬_nan);
|
||||
|
||||
// Only load canonical NaN if the comparison above set the overflow.
|
||||
__ bind(&is_nan);
|
||||
__ Move(value, FixedDoubleArray::canonical_not_the_hole_nan_as_double());
|
||||
// Only load canonical NaN if the comparison above set the overflow.
|
||||
__ bind(&is_nan);
|
||||
__ Move(value, FixedDoubleArray::canonical_not_the_hole_nan_as_double());
|
||||
}
|
||||
|
||||
__ bind(¬_nan);
|
||||
__ sdc1(value, MemOperand(scratch));
|
||||
|
@ -1733,6 +1733,8 @@ class LStoreKeyedFastDoubleElement: public LTemplateInstruction<0, 3, 0> {
|
||||
LOperand* elements() { return inputs_[0]; }
|
||||
LOperand* key() { return inputs_[1]; }
|
||||
LOperand* value() { return inputs_[2]; }
|
||||
|
||||
bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user