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

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

Issue 1424173006: Implemented the Word64Popcnt TurboFan operator for x64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 kWord32Ctz = 1u << 10,
121 kWord32Popcnt = 1u << 11, 121 kWord32Popcnt = 1u << 11,
122 kWord64Ctz = 1u << 12, 122 kWord64Ctz = 1u << 12,
123 kWord64Popcnt = 1u << 13,
123 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | 124 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min |
124 kFloat64RoundDown | kFloat64RoundTruncate | 125 kFloat64RoundDown | kFloat64RoundTruncate |
125 kFloat64RoundTiesAway | kWord32Ctz | kWord32Popcnt | 126 kFloat64RoundTiesAway | kWord32Ctz | kWord32Popcnt |
126 kWord64Ctz 127 kWord64Ctz | kWord64Popcnt
127 }; 128 };
128 typedef base::Flags<Flag, unsigned> Flags; 129 typedef base::Flags<Flag, unsigned> Flags;
129 130
130 explicit MachineOperatorBuilder(Zone* zone, MachineType word = kMachPtr, 131 explicit MachineOperatorBuilder(Zone* zone, MachineType word = kMachPtr,
131 Flags supportedOperators = kNoFlags); 132 Flags supportedOperators = kNoFlags);
132 133
133 const Operator* Word32And(); 134 const Operator* Word32And();
134 const Operator* Word32Or(); 135 const Operator* Word32Or();
135 const Operator* Word32Xor(); 136 const Operator* Word32Xor();
136 const Operator* Word32Shl(); 137 const Operator* Word32Shl();
137 const Operator* Word32Shr(); 138 const Operator* Word32Shr();
138 const Operator* Word32Sar(); 139 const Operator* Word32Sar();
139 const Operator* Word32Ror(); 140 const Operator* Word32Ror();
140 const Operator* Word32Equal(); 141 const Operator* Word32Equal();
141 const Operator* Word32Clz(); 142 const Operator* Word32Clz();
142 const OptionalOperator Word32Ctz(); 143 const OptionalOperator Word32Ctz();
143 const OptionalOperator Word32Popcnt(); 144 const OptionalOperator Word32Popcnt();
145 const OptionalOperator Word64Popcnt();
144 bool Word32ShiftIsSafe() const { return flags_ & kWord32ShiftIsSafe; } 146 bool Word32ShiftIsSafe() const { return flags_ & kWord32ShiftIsSafe; }
145 147
146 const Operator* Word64And(); 148 const Operator* Word64And();
147 const Operator* Word64Or(); 149 const Operator* Word64Or();
148 const Operator* Word64Xor(); 150 const Operator* Word64Xor();
149 const Operator* Word64Shl(); 151 const Operator* Word64Shl();
150 const Operator* Word64Shr(); 152 const Operator* Word64Shr();
151 const Operator* Word64Sar(); 153 const Operator* Word64Sar();
152 const Operator* Word64Ror(); 154 const Operator* Word64Ror();
153 const Operator* Word64Clz(); 155 const Operator* Word64Clz();
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 }; 323 };
322 324
323 325
324 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) 326 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags)
325 327
326 } // namespace compiler 328 } // namespace compiler
327 } // namespace internal 329 } // namespace internal
328 } // namespace v8 330 } // namespace v8
329 331
330 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ 332 #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