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 "src/compiler/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace compiler { | 10 namespace compiler { |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 void InstructionSelector::VisitInt32MulHigh(Node* node) { | 771 void InstructionSelector::VisitInt32MulHigh(Node* node) { |
772 // TODO(arm64): Can we do better here? | 772 // TODO(arm64): Can we do better here? |
773 Arm64OperandGenerator g(this); | 773 Arm64OperandGenerator g(this); |
774 InstructionOperand* const smull_operand = g.TempRegister(); | 774 InstructionOperand* const smull_operand = g.TempRegister(); |
775 Emit(kArm64Smull, smull_operand, g.UseRegister(node->InputAt(0)), | 775 Emit(kArm64Smull, smull_operand, g.UseRegister(node->InputAt(0)), |
776 g.UseRegister(node->InputAt(1))); | 776 g.UseRegister(node->InputAt(1))); |
777 Emit(kArm64Asr, g.DefineAsRegister(node), smull_operand, g.TempImmediate(32)); | 777 Emit(kArm64Asr, g.DefineAsRegister(node), smull_operand, g.TempImmediate(32)); |
778 } | 778 } |
779 | 779 |
780 | 780 |
| 781 void InstructionSelector::VisitUint32MulHigh(Node* node) { |
| 782 // TODO(arm64): Can we do better here? |
| 783 Arm64OperandGenerator g(this); |
| 784 InstructionOperand* const smull_operand = g.TempRegister(); |
| 785 Emit(kArm64Umull, smull_operand, g.UseRegister(node->InputAt(0)), |
| 786 g.UseRegister(node->InputAt(1))); |
| 787 Emit(kArm64Lsr, g.DefineAsRegister(node), smull_operand, g.TempImmediate(32)); |
| 788 } |
| 789 |
| 790 |
781 void InstructionSelector::VisitInt32Div(Node* node) { | 791 void InstructionSelector::VisitInt32Div(Node* node) { |
782 VisitRRR(this, kArm64Idiv32, node); | 792 VisitRRR(this, kArm64Idiv32, node); |
783 } | 793 } |
784 | 794 |
785 | 795 |
786 void InstructionSelector::VisitInt64Div(Node* node) { | 796 void InstructionSelector::VisitInt64Div(Node* node) { |
787 VisitRRR(this, kArm64Idiv, node); | 797 VisitRRR(this, kArm64Idiv, node); |
788 } | 798 } |
789 | 799 |
790 | 800 |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1344 MachineOperatorBuilder::Flags | 1354 MachineOperatorBuilder::Flags |
1345 InstructionSelector::SupportedMachineOperatorFlags() { | 1355 InstructionSelector::SupportedMachineOperatorFlags() { |
1346 return MachineOperatorBuilder::kFloat64Floor | | 1356 return MachineOperatorBuilder::kFloat64Floor | |
1347 MachineOperatorBuilder::kFloat64Ceil | | 1357 MachineOperatorBuilder::kFloat64Ceil | |
1348 MachineOperatorBuilder::kFloat64RoundTruncate | | 1358 MachineOperatorBuilder::kFloat64RoundTruncate | |
1349 MachineOperatorBuilder::kFloat64RoundTiesAway; | 1359 MachineOperatorBuilder::kFloat64RoundTiesAway; |
1350 } | 1360 } |
1351 } // namespace compiler | 1361 } // namespace compiler |
1352 } // namespace internal | 1362 } // namespace internal |
1353 } // namespace v8 | 1363 } // namespace v8 |
OLD | NEW |