| Index: src/x64/lithium-codegen-x64.cc
|
| ===================================================================
|
| --- src/x64/lithium-codegen-x64.cc (revision 6350)
|
| +++ src/x64/lithium-codegen-x64.cc (working copy)
|
| @@ -866,7 +866,22 @@
|
|
|
|
|
| void LCodeGen::DoAddI(LAddI* instr) {
|
| - Abort("Unimplemented: %s", "DoAddI");
|
| + LOperand* left = instr->InputAt(0);
|
| + LOperand* right = instr->InputAt(1);
|
| + ASSERT(left->Equals(instr->result()));
|
| +
|
| + if (right->IsConstantOperand()) {
|
| + __ addl(ToRegister(left),
|
| + Immediate(ToInteger32(LConstantOperand::cast(right))));
|
| + } else if (right->IsRegister()) {
|
| + __ addl(ToRegister(left), ToRegister(right));
|
| + } else {
|
| + __ addl(ToRegister(left), ToOperand(right));
|
| + }
|
| +
|
| + if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) {
|
| + DeoptimizeIf(overflow, instr->environment());
|
| + }
|
| }
|
|
|
|
|
| @@ -876,7 +891,13 @@
|
|
|
|
|
| void LCodeGen::DoArithmeticT(LArithmeticT* instr) {
|
| - Abort("Unimplemented: %s", "DoArithmeticT");
|
| + ASSERT(ToRegister(instr->InputAt(0)).is(rdx));
|
| + ASSERT(ToRegister(instr->InputAt(1)).is(rax));
|
| + ASSERT(ToRegister(instr->result()).is(rax));
|
| +
|
| + GenericBinaryOpStub stub(instr->op(), NO_OVERWRITE, NO_GENERIC_BINARY_FLAGS);
|
| + stub.SetArgsInRegisters();
|
| + CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
|
|
|
|