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