Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: src/compiler/arm64/instruction-selector-arm64.cc

Issue 1021183002: [turbofan] Turn Math.clz32 into an inlinable builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/arm64/instruction-codes-arm64.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 void InstructionSelector::VisitWord32Ror(Node* node) { 731 void InstructionSelector::VisitWord32Ror(Node* node) {
732 VisitRRO(this, kArm64Ror32, node, kShift32Imm); 732 VisitRRO(this, kArm64Ror32, node, kShift32Imm);
733 } 733 }
734 734
735 735
736 void InstructionSelector::VisitWord64Ror(Node* node) { 736 void InstructionSelector::VisitWord64Ror(Node* node) {
737 VisitRRO(this, kArm64Ror, node, kShift64Imm); 737 VisitRRO(this, kArm64Ror, node, kShift64Imm);
738 } 738 }
739 739
740 740
741 void InstructionSelector::VisitWord32Clz(Node* node) {
742 Arm64OperandGenerator g(this);
743 Emit(kArm64Clz32, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)));
744 }
745
746
741 void InstructionSelector::VisitInt32Add(Node* node) { 747 void InstructionSelector::VisitInt32Add(Node* node) {
742 Arm64OperandGenerator g(this); 748 Arm64OperandGenerator g(this);
743 Int32BinopMatcher m(node); 749 Int32BinopMatcher m(node);
744 // Select Madd(x, y, z) for Add(Mul(x, y), z). 750 // Select Madd(x, y, z) for Add(Mul(x, y), z).
745 if (m.left().IsInt32Mul() && CanCover(node, m.left().node())) { 751 if (m.left().IsInt32Mul() && CanCover(node, m.left().node())) {
746 Int32BinopMatcher mleft(m.left().node()); 752 Int32BinopMatcher mleft(m.left().node());
747 Emit(kArm64Madd32, g.DefineAsRegister(node), 753 Emit(kArm64Madd32, g.DefineAsRegister(node),
748 g.UseRegister(mleft.left().node()), 754 g.UseRegister(mleft.left().node()),
749 g.UseRegister(mleft.right().node()), g.UseRegister(m.right().node())); 755 g.UseRegister(mleft.right().node()), g.UseRegister(m.right().node()));
750 return; 756 return;
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 MachineOperatorBuilder::kFloat64RoundTruncate | 1682 MachineOperatorBuilder::kFloat64RoundTruncate |
1677 MachineOperatorBuilder::kFloat64RoundTiesAway | 1683 MachineOperatorBuilder::kFloat64RoundTiesAway |
1678 MachineOperatorBuilder::kWord32ShiftIsSafe | 1684 MachineOperatorBuilder::kWord32ShiftIsSafe |
1679 MachineOperatorBuilder::kInt32DivIsSafe | 1685 MachineOperatorBuilder::kInt32DivIsSafe |
1680 MachineOperatorBuilder::kUint32DivIsSafe; 1686 MachineOperatorBuilder::kUint32DivIsSafe;
1681 } 1687 }
1682 1688
1683 } // namespace compiler 1689 } // namespace compiler
1684 } // namespace internal 1690 } // namespace internal
1685 } // namespace v8 1691 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-codes-arm64.h ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698