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

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

Issue 148593004: A64: Synchronize with r18084. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow); 1646 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow);
1647 LInstruction* result = use_lea 1647 LInstruction* result = use_lea
1648 ? DefineAsRegister(add) 1648 ? DefineAsRegister(add)
1649 : DefineSameAsFirst(add); 1649 : DefineSameAsFirst(add);
1650 if (can_overflow) { 1650 if (can_overflow) {
1651 result = AssignEnvironment(result); 1651 result = AssignEnvironment(result);
1652 } 1652 }
1653 return result; 1653 return result;
1654 } else if (instr->representation().IsDouble()) { 1654 } else if (instr->representation().IsDouble()) {
1655 return DoArithmeticD(Token::ADD, instr); 1655 return DoArithmeticD(Token::ADD, instr);
1656 } else if (instr->representation().IsExternal()) {
1657 ASSERT(instr->left()->representation().IsExternal());
1658 ASSERT(instr->right()->representation().IsInteger32());
1659 ASSERT(!instr->CheckFlag(HValue::kCanOverflow));
1660 bool use_lea = LAddI::UseLea(instr);
1661 LOperand* left = UseRegisterAtStart(instr->left());
1662 HValue* right_candidate = instr->right();
1663 LOperand* right = use_lea
1664 ? UseRegisterOrConstantAtStart(right_candidate)
1665 : UseOrConstantAtStart(right_candidate);
1666 LAddI* add = new(zone()) LAddI(left, right);
1667 LInstruction* result = use_lea
1668 ? DefineAsRegister(add)
1669 : DefineSameAsFirst(add);
1670 return result;
1656 } else { 1671 } else {
1657 return DoArithmeticT(Token::ADD, instr); 1672 return DoArithmeticT(Token::ADD, instr);
1658 } 1673 }
1659 } 1674 }
1660 1675
1661 1676
1662 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { 1677 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) {
1663 LOperand* left = NULL; 1678 LOperand* left = NULL;
1664 LOperand* right = NULL; 1679 LOperand* right = NULL;
1665 if (instr->representation().IsSmiOrInteger32()) { 1680 if (instr->representation().IsSmiOrInteger32()) {
(...skipping 22 matching lines...) Expand all
1688 LOperand* left = UseFixedDouble(instr->left(), xmm2); 1703 LOperand* left = UseFixedDouble(instr->left(), xmm2);
1689 LOperand* right = exponent_type.IsDouble() ? 1704 LOperand* right = exponent_type.IsDouble() ?
1690 UseFixedDouble(instr->right(), xmm1) : 1705 UseFixedDouble(instr->right(), xmm1) :
1691 UseFixed(instr->right(), eax); 1706 UseFixed(instr->right(), eax);
1692 LPower* result = new(zone()) LPower(left, right); 1707 LPower* result = new(zone()) LPower(left, right);
1693 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, 1708 return MarkAsCall(DefineFixedDouble(result, xmm3), instr,
1694 CAN_DEOPTIMIZE_EAGERLY); 1709 CAN_DEOPTIMIZE_EAGERLY);
1695 } 1710 }
1696 1711
1697 1712
1698 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1699 ASSERT(instr->representation().IsDouble());
1700 ASSERT(instr->global_object()->representation().IsTagged());
1701 LOperand* global_object = UseTempRegister(instr->global_object());
1702 LOperand* scratch = TempRegister();
1703 LOperand* scratch2 = TempRegister();
1704 LOperand* scratch3 = TempRegister();
1705 LRandom* result = new(zone()) LRandom(
1706 global_object, scratch, scratch2, scratch3);
1707 return DefineFixedDouble(result, xmm1);
1708 }
1709
1710
1711 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1713 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1712 ASSERT(instr->left()->representation().IsSmiOrTagged()); 1714 ASSERT(instr->left()->representation().IsSmiOrTagged());
1713 ASSERT(instr->right()->representation().IsSmiOrTagged()); 1715 ASSERT(instr->right()->representation().IsSmiOrTagged());
1714 LOperand* context = UseFixed(instr->context(), esi); 1716 LOperand* context = UseFixed(instr->context(), esi);
1715 LOperand* left = UseFixed(instr->left(), edx); 1717 LOperand* left = UseFixed(instr->left(), edx);
1716 LOperand* right = UseFixed(instr->right(), eax); 1718 LOperand* right = UseFixed(instr->right(), eax);
1717 LCmpT* result = new(zone()) LCmpT(context, left, right); 1719 LCmpT* result = new(zone()) LCmpT(context, left, right);
1718 return MarkAsCall(DefineFixed(result, eax), instr); 1720 return MarkAsCall(DefineFixed(result, eax), instr);
1719 } 1721 }
1720 1722
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
2786 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2788 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2787 LOperand* object = UseRegister(instr->object()); 2789 LOperand* object = UseRegister(instr->object());
2788 LOperand* index = UseTempRegister(instr->index()); 2790 LOperand* index = UseTempRegister(instr->index());
2789 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2791 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2790 } 2792 }
2791 2793
2792 2794
2793 } } // namespace v8::internal 2795 } } // namespace v8::internal
2794 2796
2795 #endif // V8_TARGET_ARCH_IA32 2797 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698