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

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

Issue 1468303005: [turbofan] Implemented the optional Float32RoundTruncate operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@f32roundup
Patch Set: Apparently std::nearbyint does not exist on all platforms. Created 5 years 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 // Note that Float*Max behaves like `(b < a) ? a : b`, not like Math.max(). 113 // Note that Float*Max behaves like `(b < a) ? a : b`, not like Math.max().
114 // Note that Float*Min behaves like `(a < b) ? a : b`, not like Math.min(). 114 // Note that Float*Min behaves like `(a < b) ? a : b`, not like Math.min().
115 kFloat32Max = 1u << 0, 115 kFloat32Max = 1u << 0,
116 kFloat32Min = 1u << 1, 116 kFloat32Min = 1u << 1,
117 kFloat64Max = 1u << 2, 117 kFloat64Max = 1u << 2,
118 kFloat64Min = 1u << 3, 118 kFloat64Min = 1u << 3,
119 kFloat32RoundDown = 1u << 4, 119 kFloat32RoundDown = 1u << 4,
120 kFloat64RoundDown = 1u << 5, 120 kFloat64RoundDown = 1u << 5,
121 kFloat32RoundUp = 1u << 6, 121 kFloat32RoundUp = 1u << 6,
122 kFloat64RoundUp = 1u << 7, 122 kFloat64RoundUp = 1u << 7,
123 kFloat64RoundTruncate = 1u << 8, 123 kFloat32RoundTruncate = 1u << 8,
124 kFloat64RoundTiesEven = 1u << 9, 124 kFloat64RoundTruncate = 1u << 9,
125 kFloat64RoundTiesAway = 1u << 10, 125 kFloat64RoundTiesEven = 1u << 10,
126 kInt32DivIsSafe = 1u << 11, 126 kFloat64RoundTiesAway = 1u << 11,
127 kUint32DivIsSafe = 1u << 12, 127 kInt32DivIsSafe = 1u << 12,
128 kWord32ShiftIsSafe = 1u << 13, 128 kUint32DivIsSafe = 1u << 13,
129 kWord32Ctz = 1u << 14, 129 kWord32ShiftIsSafe = 1u << 14,
130 kWord64Ctz = 1u << 15, 130 kWord32Ctz = 1u << 15,
131 kWord32Popcnt = 1u << 16, 131 kWord64Ctz = 1u << 16,
132 kWord64Popcnt = 1u << 17, 132 kWord32Popcnt = 1u << 17,
133 kWord64Popcnt = 1u << 18,
133 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min | 134 kAllOptionalOps = kFloat32Max | kFloat32Min | kFloat64Max | kFloat64Min |
134 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp | 135 kFloat32RoundDown | kFloat64RoundDown | kFloat32RoundUp |
135 kFloat64RoundUp | kFloat64RoundTruncate | 136 kFloat64RoundUp | kFloat32RoundTruncate |
136 kFloat64RoundTiesAway | kFloat64RoundTiesEven | 137 kFloat64RoundTruncate | kFloat64RoundTiesAway |
137 kWord32Ctz | kWord64Ctz | kWord32Popcnt | kWord64Popcnt 138 kFloat64RoundTiesEven | kWord32Ctz | kWord64Ctz |
139 kWord32Popcnt | kWord64Popcnt
138 }; 140 };
139 typedef base::Flags<Flag, unsigned> Flags; 141 typedef base::Flags<Flag, unsigned> Flags;
140 142
141 explicit MachineOperatorBuilder(Zone* zone, MachineType word = kMachPtr, 143 explicit MachineOperatorBuilder(Zone* zone, MachineType word = kMachPtr,
142 Flags supportedOperators = kNoFlags); 144 Flags supportedOperators = kNoFlags);
143 145
144 const Operator* Word32And(); 146 const Operator* Word32And();
145 const Operator* Word32Or(); 147 const Operator* Word32Or();
146 const Operator* Word32Xor(); 148 const Operator* Word32Xor();
147 const Operator* Word32Shl(); 149 const Operator* Word32Shl();
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 const Operator* Float32Abs(); 269 const Operator* Float32Abs();
268 270
269 // Floating point abs complying to IEEE 754 (double-precision). 271 // Floating point abs complying to IEEE 754 (double-precision).
270 const Operator* Float64Abs(); 272 const Operator* Float64Abs();
271 273
272 // Floating point rounding. 274 // Floating point rounding.
273 const OptionalOperator Float32RoundDown(); 275 const OptionalOperator Float32RoundDown();
274 const OptionalOperator Float64RoundDown(); 276 const OptionalOperator Float64RoundDown();
275 const OptionalOperator Float32RoundUp(); 277 const OptionalOperator Float32RoundUp();
276 const OptionalOperator Float64RoundUp(); 278 const OptionalOperator Float64RoundUp();
279 const OptionalOperator Float32RoundTruncate();
277 const OptionalOperator Float64RoundTruncate(); 280 const OptionalOperator Float64RoundTruncate();
278 const OptionalOperator Float64RoundTiesAway(); 281 const OptionalOperator Float64RoundTiesAway();
279 const OptionalOperator Float64RoundTiesEven(); 282 const OptionalOperator Float64RoundTiesEven();
280 283
281 // Floating point bit representation. 284 // Floating point bit representation.
282 const Operator* Float64ExtractLowWord32(); 285 const Operator* Float64ExtractLowWord32();
283 const Operator* Float64ExtractHighWord32(); 286 const Operator* Float64ExtractHighWord32();
284 const Operator* Float64InsertLowWord32(); 287 const Operator* Float64InsertLowWord32();
285 const Operator* Float64InsertHighWord32(); 288 const Operator* Float64InsertHighWord32();
286 289
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 }; 345 };
343 346
344 347
345 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) 348 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags)
346 349
347 } // namespace compiler 350 } // namespace compiler
348 } // namespace internal 351 } // namespace internal
349 } // namespace v8 352 } // namespace v8
350 353
351 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ 354 #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