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

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

Issue 1405453003: CTZ instruction implemented as optional operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed a bug when bmi1=false Created 5 years, 2 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/arm/instruction-selector-arm.cc ('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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 VisitRRO(this, kArm64Ror, node, kShift64Imm); 911 VisitRRO(this, kArm64Ror, node, kShift64Imm);
912 } 912 }
913 913
914 914
915 void InstructionSelector::VisitWord32Clz(Node* node) { 915 void InstructionSelector::VisitWord32Clz(Node* node) {
916 Arm64OperandGenerator g(this); 916 Arm64OperandGenerator g(this);
917 Emit(kArm64Clz32, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0))); 917 Emit(kArm64Clz32, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)));
918 } 918 }
919 919
920 920
921 void InstructionSelector::VisitWord32Ctz(Node* node) { UNREACHABLE(); }
922
923
921 void InstructionSelector::VisitInt32Add(Node* node) { 924 void InstructionSelector::VisitInt32Add(Node* node) {
922 Arm64OperandGenerator g(this); 925 Arm64OperandGenerator g(this);
923 Int32BinopMatcher m(node); 926 Int32BinopMatcher m(node);
924 // Select Madd(x, y, z) for Add(Mul(x, y), z). 927 // Select Madd(x, y, z) for Add(Mul(x, y), z).
925 if (m.left().IsInt32Mul() && CanCover(node, m.left().node())) { 928 if (m.left().IsInt32Mul() && CanCover(node, m.left().node())) {
926 Int32BinopMatcher mleft(m.left().node()); 929 Int32BinopMatcher mleft(m.left().node());
927 // Check multiply can't be later reduced to addition with shift. 930 // Check multiply can't be later reduced to addition with shift.
928 if (LeftShiftForReducedMultiply(&mleft) == 0) { 931 if (LeftShiftForReducedMultiply(&mleft) == 0) {
929 Emit(kArm64Madd32, g.DefineAsRegister(node), 932 Emit(kArm64Madd32, g.DefineAsRegister(node),
930 g.UseRegister(mleft.left().node()), 933 g.UseRegister(mleft.left().node()),
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 MachineOperatorBuilder::kFloat64RoundTruncate | 2114 MachineOperatorBuilder::kFloat64RoundTruncate |
2112 MachineOperatorBuilder::kFloat64RoundTiesAway | 2115 MachineOperatorBuilder::kFloat64RoundTiesAway |
2113 MachineOperatorBuilder::kWord32ShiftIsSafe | 2116 MachineOperatorBuilder::kWord32ShiftIsSafe |
2114 MachineOperatorBuilder::kInt32DivIsSafe | 2117 MachineOperatorBuilder::kInt32DivIsSafe |
2115 MachineOperatorBuilder::kUint32DivIsSafe; 2118 MachineOperatorBuilder::kUint32DivIsSafe;
2116 } 2119 }
2117 2120
2118 } // namespace compiler 2121 } // namespace compiler
2119 } // namespace internal 2122 } // namespace internal
2120 } // namespace v8 2123 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698