Commit 2729e09c authored by ager@chromium.org's avatar ager@chromium.org

ARM: Implement double constants in the lithium ARM backend and fix

missing minus zero check in MathFloor implementation.

Review URL: http://codereview.chromium.org/6303009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 94a0444b
......@@ -1296,7 +1296,10 @@ void LCodeGen::DoConstantI(LConstantI* instr) {
void LCodeGen::DoConstantD(LConstantD* instr) {
Abort("DoConstantD unimplemented.");
ASSERT(instr->result()->IsDoubleRegister());
DwVfpRegister result = ToDoubleRegister(instr->result());
double v = instr->value();
__ vmov(result, v);
}
......@@ -2339,6 +2342,15 @@ void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) {
// Move the result back to general purpose register r0.
__ vmov(result, single_scratch);
// Test for -0.
Label done;
__ cmp(result, Operand(0));
__ b(ne, &done);
__ vmov(scratch, input.high());
__ tst(scratch, Operand(HeapNumber::kSignMask));
DeoptimizeIf(ne, instr->environment());
__ bind(&done);
}
......
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