Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1954)

Side by Side Diff: src/ia32/lithium-ia32.cc

Issue 1244693002: Add support for adding an external and a tagged pointer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_IA32 9 #if V8_TARGET_ARCH_IA32
10 10
(...skipping 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 ? DefineAsRegister(add) 1623 ? DefineAsRegister(add)
1624 : DefineSameAsFirst(add); 1624 : DefineSameAsFirst(add);
1625 if (can_overflow) { 1625 if (can_overflow) {
1626 result = AssignEnvironment(result); 1626 result = AssignEnvironment(result);
1627 } 1627 }
1628 return result; 1628 return result;
1629 } else if (instr->representation().IsDouble()) { 1629 } else if (instr->representation().IsDouble()) {
1630 return DoArithmeticD(Token::ADD, instr); 1630 return DoArithmeticD(Token::ADD, instr);
1631 } else if (instr->representation().IsExternal()) { 1631 } else if (instr->representation().IsExternal()) {
1632 DCHECK(instr->left()->representation().IsExternal()); 1632 DCHECK(instr->left()->representation().IsExternal());
1633 DCHECK(instr->right()->representation().IsInteger32()); 1633 DCHECK((instr->external_add_type() == AddOfExternalAndInt32 &&
1634 instr->right()->representation().IsInteger32()) ||
1635 (instr->external_add_type() == AddOfExternalAndTagged &&
1636 instr->right()->representation().IsTagged()));
Jarin 2015/07/20 14:17:56 Maybe you want to factor out the two DCHECK into a
1634 DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); 1637 DCHECK(!instr->CheckFlag(HValue::kCanOverflow));
1635 bool use_lea = LAddI::UseLea(instr); 1638 bool use_lea = LAddI::UseLea(instr);
1636 LOperand* left = UseRegisterAtStart(instr->left()); 1639 LOperand* left = UseRegisterAtStart(instr->left());
1637 HValue* right_candidate = instr->right(); 1640 HValue* right_candidate = instr->right();
1638 LOperand* right = use_lea 1641 LOperand* right = use_lea
1639 ? UseRegisterOrConstantAtStart(right_candidate) 1642 ? UseRegisterOrConstantAtStart(right_candidate)
1640 : UseOrConstantAtStart(right_candidate); 1643 : UseOrConstantAtStart(right_candidate);
1641 LAddI* add = new(zone()) LAddI(left, right); 1644 LAddI* add = new(zone()) LAddI(left, right);
1642 LInstruction* result = use_lea 1645 LInstruction* result = use_lea
1643 ? DefineAsRegister(add) 1646 ? DefineAsRegister(add)
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2789 LAllocateBlockContext* result = 2792 LAllocateBlockContext* result =
2790 new(zone()) LAllocateBlockContext(context, function); 2793 new(zone()) LAllocateBlockContext(context, function);
2791 return MarkAsCall(DefineFixed(result, esi), instr); 2794 return MarkAsCall(DefineFixed(result, esi), instr);
2792 } 2795 }
2793 2796
2794 2797
2795 } // namespace internal 2798 } // namespace internal
2796 } // namespace v8 2799 } // namespace v8
2797 2800
2798 #endif // V8_TARGET_ARCH_IA32 2801 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698