| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index 5a4a3bc1d636d19bb4af2eb4288380f160c1afb7..456898214427f4dc77b68f69ac6373c34ad9c0ef 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -1657,6 +1657,21 @@ LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
|
| return result;
|
| } else if (instr->representation().IsDouble()) {
|
| return DoArithmeticD(Token::ADD, instr);
|
| + } else if (instr->representation().IsExternal()) {
|
| + ASSERT(instr->left()->representation().IsExternal());
|
| + ASSERT(instr->right()->representation().IsInteger32());
|
| + ASSERT(!instr->CheckFlag(HValue::kCanOverflow));
|
| + bool use_lea = LAddI::UseLea(instr);
|
| + LOperand* left = UseRegisterAtStart(instr->left());
|
| + HValue* right_candidate = instr->right();
|
| + LOperand* right = use_lea
|
| + ? UseRegisterOrConstantAtStart(right_candidate)
|
| + : UseOrConstantAtStart(right_candidate);
|
| + LAddI* add = new(zone()) LAddI(left, right);
|
| + LInstruction* result = use_lea
|
| + ? DefineAsRegister(add)
|
| + : DefineSameAsFirst(add);
|
| + return result;
|
| } else {
|
| return DoArithmeticT(Token::ADD, instr);
|
| }
|
|
|