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

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

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/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/compiler/machine-type.h" 9 #include "src/compiler/machine-type.h"
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 kFloat32Max = 1u << 0, 110 kFloat32Max = 1u << 0,
111 kFloat32Min = 1u << 1, 111 kFloat32Min = 1u << 1,
112 kFloat64Max = 1u << 2, 112 kFloat64Max = 1u << 2,
113 kFloat64Min = 1u << 3, 113 kFloat64Min = 1u << 3,
114 kFloat64RoundDown = 1u << 4, 114 kFloat64RoundDown = 1u << 4,
115 kFloat64RoundTruncate = 1u << 5, 115 kFloat64RoundTruncate = 1u << 5,
116 kFloat64RoundTiesAway = 1u << 6, 116 kFloat64RoundTiesAway = 1u << 6,
117 kInt32DivIsSafe = 1u << 7, 117 kInt32DivIsSafe = 1u << 7,
118 kUint32DivIsSafe = 1u << 8, 118 kUint32DivIsSafe = 1u << 8,
119 kWord32ShiftIsSafe = 1u << 9, 119 kWord32ShiftIsSafe = 1u << 9,
120 kWord32Ctz = 1u << 10,
120 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | 121 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min |
121 kFloat64RoundDown | kFloat64RoundTruncate | 122 kFloat64RoundDown | kFloat64RoundTruncate |
122 kFloat64RoundTiesAway 123 kFloat64RoundTiesAway | kWord32Ctz
123 }; 124 };
124 typedef base::Flags<Flag, unsigned> Flags; 125 typedef base::Flags<Flag, unsigned> Flags;
125 126
126 explicit MachineOperatorBuilder(Zone* zone, MachineType word = kMachPtr, 127 explicit MachineOperatorBuilder(Zone* zone, MachineType word = kMachPtr,
127 Flags supportedOperators = kNoFlags); 128 Flags supportedOperators = kNoFlags);
128 129
129 const Operator* Word32And(); 130 const Operator* Word32And();
130 const Operator* Word32Or(); 131 const Operator* Word32Or();
131 const Operator* Word32Xor(); 132 const Operator* Word32Xor();
132 const Operator* Word32Shl(); 133 const Operator* Word32Shl();
133 const Operator* Word32Shr(); 134 const Operator* Word32Shr();
134 const Operator* Word32Sar(); 135 const Operator* Word32Sar();
135 const Operator* Word32Ror(); 136 const Operator* Word32Ror();
136 const Operator* Word32Equal(); 137 const Operator* Word32Equal();
137 const Operator* Word32Clz(); 138 const Operator* Word32Clz();
139 const OptionalOperator Word32Ctz();
138 bool Word32ShiftIsSafe() const { return flags_ & kWord32ShiftIsSafe; } 140 bool Word32ShiftIsSafe() const { return flags_ & kWord32ShiftIsSafe; }
139 141
140 const Operator* Word64And(); 142 const Operator* Word64And();
141 const Operator* Word64Or(); 143 const Operator* Word64Or();
142 const Operator* Word64Xor(); 144 const Operator* Word64Xor();
143 const Operator* Word64Shl(); 145 const Operator* Word64Shl();
144 const Operator* Word64Shr(); 146 const Operator* Word64Shr();
145 const Operator* Word64Sar(); 147 const Operator* Word64Sar();
146 const Operator* Word64Ror(); 148 const Operator* Word64Ror();
147 const Operator* Word64Equal(); 149 const Operator* Word64Equal();
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 }; 314 };
313 315
314 316
315 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) 317 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags)
316 318
317 } // namespace compiler 319 } // namespace compiler
318 } // namespace internal 320 } // namespace internal
319 } // namespace v8 321 } // namespace v8
320 322
321 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ 323 #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