Commit bf2bc0b1 authored by vegorov@chromium.org's avatar vegorov@chromium.org

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
parent b635c907
......@@ -3567,6 +3567,7 @@ void LCodeGen::DoStoreKeyedFastDoubleElement(
Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag));
}
if (instr->NeedsCanonicalization()) {
Label is_nan;
// Check for NaN. All NaNs must be canonicalized.
__ BranchF(NULL, &is_nan, eq, value, value);
......@@ -3575,6 +3576,7 @@ void LCodeGen::DoStoreKeyedFastDoubleElement(
// 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(&not_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(); }
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment