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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 DCHECK(instr->right()->representation().IsDouble()); | 741 DCHECK(instr->right()->representation().IsDouble()); |
742 if (op == Token::MOD) { | 742 if (op == Token::MOD) { |
743 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); | 743 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); |
744 LOperand* right = UseFixedDouble(instr->BetterRightOperand(), xmm1); | 744 LOperand* right = UseFixedDouble(instr->BetterRightOperand(), xmm1); |
745 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); | 745 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); |
746 return MarkAsCall(DefineSameAsFirst(result), instr); | 746 return MarkAsCall(DefineSameAsFirst(result), instr); |
747 } else { | 747 } else { |
748 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); | 748 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); |
749 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand()); | 749 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand()); |
750 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); | 750 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); |
751 return DefineSameAsFirst(result); | 751 return CpuFeatures::IsSupported(AVX) ? DefineAsRegister(result) |
| 752 : DefineSameAsFirst(result); |
752 } | 753 } |
753 } | 754 } |
754 | 755 |
755 | 756 |
756 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, | 757 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, |
757 HBinaryOperation* instr) { | 758 HBinaryOperation* instr) { |
758 HValue* left = instr->left(); | 759 HValue* left = instr->left(); |
759 HValue* right = instr->right(); | 760 HValue* right = instr->right(); |
760 DCHECK(left->representation().IsTagged()); | 761 DCHECK(left->representation().IsTagged()); |
761 DCHECK(right->representation().IsTagged()); | 762 DCHECK(right->representation().IsTagged()); |
(...skipping 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2690 LOperand* function = UseRegisterAtStart(instr->function()); | 2691 LOperand* function = UseRegisterAtStart(instr->function()); |
2691 LAllocateBlockContext* result = | 2692 LAllocateBlockContext* result = |
2692 new(zone()) LAllocateBlockContext(context, function); | 2693 new(zone()) LAllocateBlockContext(context, function); |
2693 return MarkAsCall(DefineFixed(result, rsi), instr); | 2694 return MarkAsCall(DefineFixed(result, rsi), instr); |
2694 } | 2695 } |
2695 | 2696 |
2696 | 2697 |
2697 } } // namespace v8::internal | 2698 } } // namespace v8::internal |
2698 | 2699 |
2699 #endif // V8_TARGET_ARCH_X64 | 2700 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |