| 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/crankshaft/x64/lithium-x64.h" | 5 #include "src/crankshaft/x64/lithium-x64.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
| 10 | 10 |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 } | 707 } |
| 708 } | 708 } |
| 709 | 709 |
| 710 | 710 |
| 711 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, | 711 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, |
| 712 HArithmeticBinaryOperation* instr) { | 712 HArithmeticBinaryOperation* instr) { |
| 713 DCHECK(instr->representation().IsDouble()); | 713 DCHECK(instr->representation().IsDouble()); |
| 714 DCHECK(instr->left()->representation().IsDouble()); | 714 DCHECK(instr->left()->representation().IsDouble()); |
| 715 DCHECK(instr->right()->representation().IsDouble()); | 715 DCHECK(instr->right()->representation().IsDouble()); |
| 716 if (op == Token::MOD) { | 716 if (op == Token::MOD) { |
| 717 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); | 717 LOperand* left = UseFixedDouble(instr->BetterLeftOperand(), xmm0); |
| 718 LOperand* right = UseFixedDouble(instr->BetterRightOperand(), xmm1); | 718 LOperand* right = UseFixedDouble(instr->BetterRightOperand(), xmm1); |
| 719 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); | 719 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); |
| 720 return MarkAsCall(DefineSameAsFirst(result), instr); | 720 return MarkAsCall(DefineFixedDouble(result, xmm0), instr); |
| 721 } else { | 721 } else { |
| 722 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); | 722 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); |
| 723 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand()); | 723 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand()); |
| 724 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); | 724 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); |
| 725 return CpuFeatures::IsSupported(AVX) ? DefineAsRegister(result) | 725 return CpuFeatures::IsSupported(AVX) ? DefineAsRegister(result) |
| 726 : DefineSameAsFirst(result); | 726 : DefineSameAsFirst(result); |
| 727 } | 727 } |
| 728 } | 728 } |
| 729 | 729 |
| 730 | 730 |
| (...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2569 LOperand* index = UseTempRegister(instr->index()); | 2569 LOperand* index = UseTempRegister(instr->index()); |
| 2570 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2570 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2571 LInstruction* result = DefineSameAsFirst(load); | 2571 LInstruction* result = DefineSameAsFirst(load); |
| 2572 return AssignPointerMap(result); | 2572 return AssignPointerMap(result); |
| 2573 } | 2573 } |
| 2574 | 2574 |
| 2575 } // namespace internal | 2575 } // namespace internal |
| 2576 } // namespace v8 | 2576 } // namespace v8 |
| 2577 | 2577 |
| 2578 #endif // V8_TARGET_ARCH_X64 | 2578 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |