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

Unified Diff: src/compiler/machine-operator.h

Issue 1066393002: [turbofan] Add new Float32Abs and Float64Abs operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/machine-operator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-operator.h
diff --git a/src/compiler/machine-operator.h b/src/compiler/machine-operator.h
index 21510bf5a0fa72822b6bfcf2e8b1984a57dd0438..e459ae47dff75355dd8062793a184a848596cf1a 100644
--- a/src/compiler/machine-operator.h
+++ b/src/compiler/machine-operator.h
@@ -74,16 +74,18 @@ class MachineOperatorBuilder FINAL : public ZoneObject {
// for operations that are unsupported by some back-ends.
enum Flag {
kNoFlags = 0u,
- kFloat32Max = 1u << 0,
- kFloat32Min = 1u << 1,
- kFloat64Max = 1u << 2,
- kFloat64Min = 1u << 3,
- kFloat64RoundDown = 1u << 4,
- kFloat64RoundTruncate = 1u << 5,
- kFloat64RoundTiesAway = 1u << 6,
- kInt32DivIsSafe = 1u << 7,
- kUint32DivIsSafe = 1u << 8,
- kWord32ShiftIsSafe = 1u << 9
+ kFloat32Abs = 1u << 0,
+ kFloat32Max = 1u << 1,
+ kFloat32Min = 1u << 2,
+ kFloat64Abs = 1u << 3,
+ kFloat64Max = 1u << 4,
+ kFloat64Min = 1u << 5,
+ kFloat64RoundDown = 1u << 6,
+ kFloat64RoundTruncate = 1u << 7,
+ kFloat64RoundTiesAway = 1u << 8,
+ kInt32DivIsSafe = 1u << 9,
+ kUint32DivIsSafe = 1u << 10,
+ kWord32ShiftIsSafe = 1u << 11
};
typedef base::Flags<Flag, unsigned> Flags;
@@ -197,6 +199,14 @@ class MachineOperatorBuilder FINAL : public ZoneObject {
bool HasFloat64Max() { return flags_ & kFloat64Max; }
bool HasFloat64Min() { return flags_ & kFloat64Min; }
+ // Floating point abs complying to IEEE 754 (single-precision).
+ const Operator* Float32Abs();
+ bool HasFloat32Abs() const { return flags_ & kFloat32Abs; }
+
+ // Floating point abs complying to IEEE 754 (double-precision).
+ const Operator* Float64Abs();
+ bool HasFloat64Abs() const { return flags_ & kFloat64Abs; }
+
// Floating point rounding.
const Operator* Float64RoundDown();
const Operator* Float64RoundTruncate();
« 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