| Index: src/arm/lithium-codegen-arm.cc
|
| ===================================================================
|
| --- src/arm/lithium-codegen-arm.cc (revision 6384)
|
| +++ src/arm/lithium-codegen-arm.cc (working copy)
|
| @@ -172,13 +172,13 @@
|
|
|
|
|
| void LGapResolver::RegisterMove(LMoveOperands move) {
|
| - if (move.from()->IsConstantOperand()) {
|
| + if (move.source()->IsConstantOperand()) {
|
| // Constant moves should be last in the machine code. Therefore add them
|
| // first to the result set.
|
| - AddResultMove(move.from(), move.to());
|
| + AddResultMove(move.source(), move.destination());
|
| } else {
|
| - LGapNode* from = LookupNode(move.from());
|
| - LGapNode* to = LookupNode(move.to());
|
| + LGapNode* from = LookupNode(move.source());
|
| + LGapNode* to = LookupNode(move.destination());
|
| if (to->IsAssigned() && to->assigned_from() == from) {
|
| move.Eliminate();
|
| return;
|
| @@ -341,6 +341,11 @@
|
| __ jmp(code->exit());
|
| }
|
|
|
| + // Force constant pool emission at the end of deferred code to make
|
| + // sure that no constant pools are emitted after the official end of
|
| + // the instruction sequence.
|
| + masm()->CheckConstPool(true, false);
|
| +
|
| // Deferred code is the last part of the instruction sequence. Mark
|
| // the generated code as done unless we bailed out.
|
| if (!is_aborted()) status_ = DONE;
|
| @@ -816,8 +821,8 @@
|
| resolver_.Resolve(move->move_operands(), &marker_operand);
|
| for (int i = moves->length() - 1; i >= 0; --i) {
|
| LMoveOperands move = moves->at(i);
|
| - LOperand* from = move.from();
|
| - LOperand* to = move.to();
|
| + LOperand* from = move.source();
|
| + LOperand* to = move.destination();
|
| ASSERT(!from->IsDoubleRegister() ||
|
| !ToDoubleRegister(from).is(dbl_scratch));
|
| ASSERT(!to->IsDoubleRegister() || !ToDoubleRegister(to).is(dbl_scratch));
|
| @@ -999,7 +1004,6 @@
|
|
|
|
|
| void LCodeGen::DoModI(LModI* instr) {
|
| - Abort("ModI not implemented");
|
| class DeferredModI: public LDeferredCode {
|
| public:
|
| DeferredModI(LCodeGen* codegen, LModI* instr)
|
| @@ -1055,7 +1059,6 @@
|
|
|
|
|
| void LCodeGen::DoDivI(LDivI* instr) {
|
| - Abort("DivI not implemented");
|
| class DeferredDivI: public LDeferredCode {
|
| public:
|
| DeferredDivI(LCodeGen* codegen, LDivI* instr)
|
| @@ -1293,7 +1296,10 @@
|
|
|
|
|
| void LCodeGen::DoConstantD(LConstantD* instr) {
|
| - Abort("DoConstantD unimplemented.");
|
| + ASSERT(instr->result()->IsDoubleRegister());
|
| + DwVfpRegister result = ToDoubleRegister(instr->result());
|
| + double v = instr->value();
|
| + __ vmov(result, v);
|
| }
|
|
|
|
|
| @@ -2336,6 +2342,15 @@
|
|
|
| // 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);
|
| }
|
|
|
|
|
|
|