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