OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
10 | 10 |
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1599 LAddI* add = new(zone()) LAddI(left, right); | 1599 LAddI* add = new(zone()) LAddI(left, right); |
1600 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow); | 1600 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow); |
1601 LInstruction* result = use_lea ? DefineAsRegister(add) | 1601 LInstruction* result = use_lea ? DefineAsRegister(add) |
1602 : DefineSameAsFirst(add); | 1602 : DefineSameAsFirst(add); |
1603 if (can_overflow) { | 1603 if (can_overflow) { |
1604 result = AssignEnvironment(result); | 1604 result = AssignEnvironment(result); |
1605 } | 1605 } |
1606 return result; | 1606 return result; |
1607 } else if (instr->representation().IsExternal()) { | 1607 } else if (instr->representation().IsExternal()) { |
1608 DCHECK(instr->left()->representation().IsExternal()); | 1608 DCHECK(instr->left()->representation().IsExternal()); |
1609 DCHECK(instr->right()->representation().IsInteger32()); | 1609 DCHECK(instr->right()->representation().IsInteger32() || |
| 1610 instr->right()->representation().IsTagged()); |
1610 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); | 1611 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); |
1611 bool use_lea = LAddI::UseLea(instr); | 1612 bool use_lea = LAddI::UseLea(instr); |
1612 LOperand* left = UseRegisterAtStart(instr->left()); | 1613 LOperand* left = UseRegisterAtStart(instr->left()); |
1613 HValue* right_candidate = instr->right(); | 1614 HValue* right_candidate = instr->right(); |
1614 LOperand* right = use_lea | 1615 LOperand* right = use_lea |
1615 ? UseRegisterOrConstantAtStart(right_candidate) | 1616 ? UseRegisterOrConstantAtStart(right_candidate) |
1616 : UseOrConstantAtStart(right_candidate); | 1617 : UseOrConstantAtStart(right_candidate); |
1617 LAddI* add = new(zone()) LAddI(left, right); | 1618 LAddI* add = new(zone()) LAddI(left, right); |
1618 LInstruction* result = use_lea | 1619 LInstruction* result = use_lea |
1619 ? DefineAsRegister(add) | 1620 ? DefineAsRegister(add) |
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2737 LAllocateBlockContext* result = | 2738 LAllocateBlockContext* result = |
2738 new(zone()) LAllocateBlockContext(context, function); | 2739 new(zone()) LAllocateBlockContext(context, function); |
2739 return MarkAsCall(DefineFixed(result, rsi), instr); | 2740 return MarkAsCall(DefineFixed(result, rsi), instr); |
2740 } | 2741 } |
2741 | 2742 |
2742 | 2743 |
2743 } // namespace internal | 2744 } // namespace internal |
2744 } // namespace v8 | 2745 } // namespace v8 |
2745 | 2746 |
2746 #endif // V8_TARGET_ARCH_X64 | 2747 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |