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

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

Issue 998283002: [turbofan] Introduce optional Float64Min and Float64Max machine operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 a92ce39536f6bc1669cbb41cf04cf4fac2584638..409f033cc8cb6594e7069cc537724e89336bdd44 100644
--- a/src/compiler/machine-operator.h
+++ b/src/compiler/machine-operator.h
@@ -74,12 +74,14 @@ class MachineOperatorBuilder FINAL : public ZoneObject {
// for operations that are unsupported by some back-ends.
enum Flag {
kNoFlags = 0u,
- kFloat64RoundDown = 1u << 0,
- kFloat64RoundTruncate = 1u << 1,
- kFloat64RoundTiesAway = 1u << 2,
- kInt32DivIsSafe = 1u << 3,
- kUint32DivIsSafe = 1u << 4,
- kWord32ShiftIsSafe = 1u << 5
+ kFloat64Max = 1u << 0,
+ kFloat64Min = 1u << 1,
+ kFloat64RoundDown = 1u << 2,
+ kFloat64RoundTruncate = 1u << 3,
+ kFloat64RoundTiesAway = 1u << 4,
+ kInt32DivIsSafe = 1u << 5,
+ kUint32DivIsSafe = 1u << 6,
+ kWord32ShiftIsSafe = 1u << 7
};
typedef base::Flags<Flag, unsigned> Flags;
@@ -166,6 +168,12 @@ class MachineOperatorBuilder FINAL : public ZoneObject {
const Operator* Float64LessThan();
const Operator* Float64LessThanOrEqual();
+ // Floating point min/max complying to IEEE 754.
+ const Operator* Float64Max();
+ const Operator* Float64Min();
+ bool HasFloat64Max() { return flags_ & kFloat64Max; }
+ bool HasFloat64Min() { return flags_ & kFloat64Min; }
+
// 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