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

Side by Side Diff: src/compiler/machine-operator.h

Issue 1698483002: [arm][arm64] Improve CountTrailingZero implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed Created 4 years, 10 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/instruction-selector.cc ('k') | src/compiler/machine-operator.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_
6 #define V8_COMPILER_MACHINE_OPERATOR_H_ 6 #define V8_COMPILER_MACHINE_OPERATOR_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/machine-type.h" 9 #include "src/machine-type.h"
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 kFloat32RoundTiesEven = 1u << 10, 128 kFloat32RoundTiesEven = 1u << 10,
129 kFloat64RoundTiesEven = 1u << 11, 129 kFloat64RoundTiesEven = 1u << 11,
130 kFloat64RoundTiesAway = 1u << 12, 130 kFloat64RoundTiesAway = 1u << 12,
131 kInt32DivIsSafe = 1u << 13, 131 kInt32DivIsSafe = 1u << 13,
132 kUint32DivIsSafe = 1u << 14, 132 kUint32DivIsSafe = 1u << 14,
133 kWord32ShiftIsSafe = 1u << 15, 133 kWord32ShiftIsSafe = 1u << 15,
134 kWord32Ctz = 1u << 16, 134 kWord32Ctz = 1u << 16,
135 kWord64Ctz = 1u << 17, 135 kWord64Ctz = 1u << 17,
136 kWord32Popcnt = 1u << 18, 136 kWord32Popcnt = 1u << 18,
137 kWord64Popcnt = 1u << 19, 137 kWord64Popcnt = 1u << 19,
138 kWord32ReverseBits = 1u << 20,
139 kWord64ReverseBits = 1u << 21,
138 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | 140 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min |
139 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp | 141 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp |
140 kFloat64RoundUp | kFloat32RoundTruncate | 142 kFloat64RoundUp | kFloat32RoundTruncate |
141 kFloat64RoundTruncate | kFloat64RoundTiesAway | 143 kFloat64RoundTruncate | kFloat64RoundTiesAway |
142 kFloat32RoundTiesEven | kFloat64RoundTiesEven | 144 kFloat32RoundTiesEven | kFloat64RoundTiesEven |
143 kWord32Ctz | kWord64Ctz | kWord32Popcnt | kWord64Popcnt 145 kWord32Ctz | kWord64Ctz | kWord32Popcnt | kWord64Popcnt |
146 kWord32ReverseBits | kWord64ReverseBits
144 }; 147 };
145 typedef base::Flags<Flag, unsigned> Flags; 148 typedef base::Flags<Flag, unsigned> Flags;
146 149
147 explicit MachineOperatorBuilder( 150 explicit MachineOperatorBuilder(
148 Zone* zone, 151 Zone* zone,
149 MachineRepresentation word = MachineType::PointerRepresentation(), 152 MachineRepresentation word = MachineType::PointerRepresentation(),
150 Flags supportedOperators = kNoFlags); 153 Flags supportedOperators = kNoFlags);
151 154
152 const Operator* Word32And(); 155 const Operator* Word32And();
153 const Operator* Word32Or(); 156 const Operator* Word32Or();
154 const Operator* Word32Xor(); 157 const Operator* Word32Xor();
155 const Operator* Word32Shl(); 158 const Operator* Word32Shl();
156 const Operator* Word32Shr(); 159 const Operator* Word32Shr();
157 const Operator* Word32Sar(); 160 const Operator* Word32Sar();
158 const Operator* Word32Ror(); 161 const Operator* Word32Ror();
159 const Operator* Word32Equal(); 162 const Operator* Word32Equal();
160 const Operator* Word32Clz(); 163 const Operator* Word32Clz();
161 const OptionalOperator Word32Ctz(); 164 const OptionalOperator Word32Ctz();
162 const OptionalOperator Word32Popcnt(); 165 const OptionalOperator Word32Popcnt();
163 const OptionalOperator Word64Popcnt(); 166 const OptionalOperator Word64Popcnt();
167 const OptionalOperator Word32ReverseBits();
168 const OptionalOperator Word64ReverseBits();
164 bool Word32ShiftIsSafe() const { return flags_ & kWord32ShiftIsSafe; } 169 bool Word32ShiftIsSafe() const { return flags_ & kWord32ShiftIsSafe; }
165 170
166 const Operator* Word64And(); 171 const Operator* Word64And();
167 const Operator* Word64Or(); 172 const Operator* Word64Or();
168 const Operator* Word64Xor(); 173 const Operator* Word64Xor();
169 const Operator* Word64Shl(); 174 const Operator* Word64Shl();
170 const Operator* Word64Shr(); 175 const Operator* Word64Shr();
171 const Operator* Word64Sar(); 176 const Operator* Word64Sar();
172 const Operator* Word64Ror(); 177 const Operator* Word64Ror();
173 const Operator* Word64Clz(); 178 const Operator* Word64Clz();
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 }; 367 };
363 368
364 369
365 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) 370 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags)
366 371
367 } // namespace compiler 372 } // namespace compiler
368 } // namespace internal 373 } // namespace internal
369 } // namespace v8 374 } // namespace v8
370 375
371 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ 376 #endif // V8_COMPILER_MACHINE_OPERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/machine-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698