| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "src/base/adapters.h" | 7 #include "src/base/adapters.h" |
| 8 #include "src/compiler/instruction-selector-impl.h" | 8 #include "src/compiler/instruction-selector-impl.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 X64OperandGenerator g(selector); | 786 X64OperandGenerator g(selector); |
| 787 InstructionOperand temps[] = {g.TempRegister(rdx)}; | 787 InstructionOperand temps[] = {g.TempRegister(rdx)}; |
| 788 selector->Emit( | 788 selector->Emit( |
| 789 opcode, g.DefineAsFixed(node, rax), g.UseFixed(node->InputAt(0), rax), | 789 opcode, g.DefineAsFixed(node, rax), g.UseFixed(node->InputAt(0), rax), |
| 790 g.UseUniqueRegister(node->InputAt(1)), arraysize(temps), temps); | 790 g.UseUniqueRegister(node->InputAt(1)), arraysize(temps), temps); |
| 791 } | 791 } |
| 792 | 792 |
| 793 | 793 |
| 794 void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode opcode) { | 794 void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode opcode) { |
| 795 X64OperandGenerator g(selector); | 795 X64OperandGenerator g(selector); |
| 796 selector->Emit(opcode, g.DefineAsFixed(node, rdx), | 796 InstructionOperand temps[] = {g.TempRegister(rax)}; |
| 797 g.UseFixed(node->InputAt(0), rax), | 797 selector->Emit( |
| 798 g.UseUniqueRegister(node->InputAt(1))); | 798 opcode, g.DefineAsFixed(node, rdx), g.UseFixed(node->InputAt(0), rax), |
| 799 g.UseUniqueRegister(node->InputAt(1)), arraysize(temps), temps); |
| 799 } | 800 } |
| 800 | 801 |
| 801 } // namespace | 802 } // namespace |
| 802 | 803 |
| 803 | 804 |
| 804 void InstructionSelector::VisitInt32Mul(Node* node) { | 805 void InstructionSelector::VisitInt32Mul(Node* node) { |
| 805 Int32ScaleMatcher m(node, true); | 806 Int32ScaleMatcher m(node, true); |
| 806 if (m.matches()) { | 807 if (m.matches()) { |
| 807 Node* index = node->InputAt(0); | 808 Node* index = node->InputAt(0); |
| 808 Node* base = m.power_of_two_plus_one() ? index : nullptr; | 809 Node* base = m.power_of_two_plus_one() ? index : nullptr; |
| (...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1971 MachineOperatorBuilder::kFloat64RoundTruncate | | 1972 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1972 MachineOperatorBuilder::kFloat32RoundTiesEven | | 1973 MachineOperatorBuilder::kFloat32RoundTiesEven | |
| 1973 MachineOperatorBuilder::kFloat64RoundTiesEven; | 1974 MachineOperatorBuilder::kFloat64RoundTiesEven; |
| 1974 } | 1975 } |
| 1975 return flags; | 1976 return flags; |
| 1976 } | 1977 } |
| 1977 | 1978 |
| 1978 } // namespace compiler | 1979 } // namespace compiler |
| 1979 } // namespace internal | 1980 } // namespace internal |
| 1980 } // namespace v8 | 1981 } // namespace v8 |
| OLD | NEW |