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_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
10 | 10 |
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 DCHECK(instr->right()->representation().IsDouble()); | 758 DCHECK(instr->right()->representation().IsDouble()); |
759 if (op == Token::MOD) { | 759 if (op == Token::MOD) { |
760 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); | 760 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); |
761 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand()); | 761 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand()); |
762 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); | 762 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); |
763 return MarkAsCall(DefineSameAsFirst(result), instr); | 763 return MarkAsCall(DefineSameAsFirst(result), instr); |
764 } else { | 764 } else { |
765 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); | 765 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); |
766 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand()); | 766 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand()); |
767 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); | 767 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); |
768 return CpuFeatures::IsSupported(AVX) ? DefineAsRegister(result) | 768 return DefineSameAsFirst(result); |
769 : DefineSameAsFirst(result); | |
770 } | 769 } |
771 } | 770 } |
772 | 771 |
773 | 772 |
774 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, | 773 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, |
775 HBinaryOperation* instr) { | 774 HBinaryOperation* instr) { |
776 HValue* left = instr->left(); | 775 HValue* left = instr->left(); |
777 HValue* right = instr->right(); | 776 HValue* right = instr->right(); |
778 DCHECK(left->representation().IsTagged()); | 777 DCHECK(left->representation().IsTagged()); |
779 DCHECK(right->representation().IsTagged()); | 778 DCHECK(right->representation().IsTagged()); |
(...skipping 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2714 LOperand* function = UseRegisterAtStart(instr->function()); | 2713 LOperand* function = UseRegisterAtStart(instr->function()); |
2715 LAllocateBlockContext* result = | 2714 LAllocateBlockContext* result = |
2716 new(zone()) LAllocateBlockContext(context, function); | 2715 new(zone()) LAllocateBlockContext(context, function); |
2717 return MarkAsCall(DefineFixed(result, esi), instr); | 2716 return MarkAsCall(DefineFixed(result, esi), instr); |
2718 } | 2717 } |
2719 | 2718 |
2720 | 2719 |
2721 } } // namespace v8::internal | 2720 } } // namespace v8::internal |
2722 | 2721 |
2723 #endif // V8_TARGET_ARCH_IA32 | 2722 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |