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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-x64.h ('k') | src/x64/macro-assembler-x64.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 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 : UseOrConstantAtStart(right_candidate); 1550 : UseOrConstantAtStart(right_candidate);
1551 LAddI* add = new(zone()) LAddI(left, right); 1551 LAddI* add = new(zone()) LAddI(left, right);
1552 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow); 1552 bool can_overflow = instr->CheckFlag(HValue::kCanOverflow);
1553 LInstruction* result = use_lea 1553 LInstruction* result = use_lea
1554 ? DefineAsRegister(add) 1554 ? DefineAsRegister(add)
1555 : DefineSameAsFirst(add); 1555 : DefineSameAsFirst(add);
1556 if (can_overflow) { 1556 if (can_overflow) {
1557 result = AssignEnvironment(result); 1557 result = AssignEnvironment(result);
1558 } 1558 }
1559 return result; 1559 return result;
1560 } else if (instr->representation().IsExternal()) {
1561 ASSERT(instr->left()->representation().IsExternal());
1562 ASSERT(instr->right()->representation().IsInteger32());
1563 ASSERT(!instr->CheckFlag(HValue::kCanOverflow));
1564 bool use_lea = LAddI::UseLea(instr);
1565 LOperand* left = UseRegisterAtStart(instr->left());
1566 HValue* right_candidate = instr->right();
1567 LOperand* right = use_lea
1568 ? UseRegisterOrConstantAtStart(right_candidate)
1569 : UseOrConstantAtStart(right_candidate);
1570 LAddI* add = new(zone()) LAddI(left, right);
1571 LInstruction* result = use_lea
1572 ? DefineAsRegister(add)
1573 : DefineSameAsFirst(add);
1574 return result;
1560 } else if (instr->representation().IsDouble()) { 1575 } else if (instr->representation().IsDouble()) {
1561 return DoArithmeticD(Token::ADD, instr); 1576 return DoArithmeticD(Token::ADD, instr);
1562 } else { 1577 } else {
1563 return DoArithmeticT(Token::ADD, instr); 1578 return DoArithmeticT(Token::ADD, instr);
1564 } 1579 }
1565 return NULL; 1580 return NULL;
1566 } 1581 }
1567 1582
1568 1583
1569 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { 1584 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) {
(...skipping 24 matching lines...) Expand all
1594 ASSERT(instr->left()->representation().IsDouble()); 1609 ASSERT(instr->left()->representation().IsDouble());
1595 LOperand* left = UseFixedDouble(instr->left(), xmm2); 1610 LOperand* left = UseFixedDouble(instr->left(), xmm2);
1596 LOperand* right = exponent_type.IsDouble() ? 1611 LOperand* right = exponent_type.IsDouble() ?
1597 UseFixedDouble(instr->right(), xmm1) : UseFixed(instr->right(), rdx); 1612 UseFixedDouble(instr->right(), xmm1) : UseFixed(instr->right(), rdx);
1598 LPower* result = new(zone()) LPower(left, right); 1613 LPower* result = new(zone()) LPower(left, right);
1599 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, 1614 return MarkAsCall(DefineFixedDouble(result, xmm3), instr,
1600 CAN_DEOPTIMIZE_EAGERLY); 1615 CAN_DEOPTIMIZE_EAGERLY);
1601 } 1616 }
1602 1617
1603 1618
1604 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1605 ASSERT(instr->representation().IsDouble());
1606 ASSERT(instr->global_object()->representation().IsTagged());
1607 LOperand* global_object = UseTempRegister(instr->global_object());
1608 LOperand* scratch = TempRegister();
1609 LOperand* scratch2 = TempRegister();
1610 LOperand* scratch3 = TempRegister();
1611 LRandom* result = new(zone()) LRandom(
1612 global_object, scratch, scratch2, scratch3);
1613 return DefineFixedDouble(result, xmm1);
1614 }
1615
1616
1617 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1619 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1618 ASSERT(instr->left()->representation().IsTagged()); 1620 ASSERT(instr->left()->representation().IsTagged());
1619 ASSERT(instr->right()->representation().IsTagged()); 1621 ASSERT(instr->right()->representation().IsTagged());
1620 LOperand* context = UseFixed(instr->context(), rsi); 1622 LOperand* context = UseFixed(instr->context(), rsi);
1621 LOperand* left = UseFixed(instr->left(), rdx); 1623 LOperand* left = UseFixed(instr->left(), rdx);
1622 LOperand* right = UseFixed(instr->right(), rax); 1624 LOperand* right = UseFixed(instr->right(), rax);
1623 LCmpT* result = new(zone()) LCmpT(context, left, right); 1625 LCmpT* result = new(zone()) LCmpT(context, left, right);
1624 return MarkAsCall(DefineFixed(result, rax), instr); 1626 return MarkAsCall(DefineFixed(result, rax), instr);
1625 } 1627 }
1626 1628
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
2621 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2623 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2622 LOperand* object = UseRegister(instr->object()); 2624 LOperand* object = UseRegister(instr->object());
2623 LOperand* index = UseTempRegister(instr->index()); 2625 LOperand* index = UseTempRegister(instr->index());
2624 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2626 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2625 } 2627 }
2626 2628
2627 2629
2628 } } // namespace v8::internal 2630 } } // namespace v8::internal
2629 2631
2630 #endif // V8_TARGET_ARCH_X64 2632 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698