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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
10 #include "src/lithium-inl.h" | 10 #include "src/lithium-inl.h" |
(...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1628 } | 1628 } |
1629 | 1629 |
1630 | 1630 |
1631 LInstruction* LChunkBuilder::DoPower(HPower* instr) { | 1631 LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
1632 DCHECK(instr->representation().IsDouble()); | 1632 DCHECK(instr->representation().IsDouble()); |
1633 // We call a C function for double power. It can't trigger a GC. | 1633 // We call a C function for double power. It can't trigger a GC. |
1634 // We need to use fixed result register for the call. | 1634 // We need to use fixed result register for the call. |
1635 Representation exponent_type = instr->right()->representation(); | 1635 Representation exponent_type = instr->right()->representation(); |
1636 DCHECK(instr->left()->representation().IsDouble()); | 1636 DCHECK(instr->left()->representation().IsDouble()); |
1637 LOperand* left = UseFixedDouble(instr->left(), xmm2); | 1637 LOperand* left = UseFixedDouble(instr->left(), xmm2); |
1638 LOperand* right = exponent_type.IsDouble() ? | 1638 LOperand* right = |
1639 UseFixedDouble(instr->right(), xmm1) : UseFixed(instr->right(), rdx); | 1639 exponent_type.IsDouble() |
| 1640 ? UseFixedDouble(instr->right(), xmm1) |
| 1641 : UseFixed(instr->right(), MathPowTaggedDescriptor::exponent()); |
1640 LPower* result = new(zone()) LPower(left, right); | 1642 LPower* result = new(zone()) LPower(left, right); |
1641 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, | 1643 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, |
1642 CAN_DEOPTIMIZE_EAGERLY); | 1644 CAN_DEOPTIMIZE_EAGERLY); |
1643 } | 1645 } |
1644 | 1646 |
1645 | 1647 |
1646 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { | 1648 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
1647 DCHECK(instr->left()->representation().IsTagged()); | 1649 DCHECK(instr->left()->representation().IsTagged()); |
1648 DCHECK(instr->right()->representation().IsTagged()); | 1650 DCHECK(instr->right()->representation().IsTagged()); |
1649 LOperand* context = UseFixed(instr->context(), rsi); | 1651 LOperand* context = UseFixed(instr->context(), rsi); |
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2690 LOperand* function = UseRegisterAtStart(instr->function()); | 2692 LOperand* function = UseRegisterAtStart(instr->function()); |
2691 LAllocateBlockContext* result = | 2693 LAllocateBlockContext* result = |
2692 new(zone()) LAllocateBlockContext(context, function); | 2694 new(zone()) LAllocateBlockContext(context, function); |
2693 return MarkAsCall(DefineFixed(result, rsi), instr); | 2695 return MarkAsCall(DefineFixed(result, rsi), instr); |
2694 } | 2696 } |
2695 | 2697 |
2696 | 2698 |
2697 } } // namespace v8::internal | 2699 } } // namespace v8::internal |
2698 | 2700 |
2699 #endif // V8_TARGET_ARCH_X64 | 2701 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |