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

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

Issue 594493002: [turbofan] Add operators for float32 support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 3 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/graph-unittest.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 bff0821ec4d25c99c07d6d643f6b53cc59121f5c..23b7ef6453215b4b0e5d8b1ec7f684da30b51309 100644
--- a/src/compiler/machine-operator.h
+++ b/src/compiler/machine-operator.h
@@ -104,23 +104,23 @@ class MachineOperatorBuilder FINAL {
const Operator* Int64LessThan();
const Operator* Int64LessThanOrEqual();
- // Convert representation of integers between float64 and int32/uint32.
- // The precise rounding mode and handling of out of range inputs are *not*
- // defined for these operators, since they are intended only for use with
- // integers.
+ // These operators change the representation of numbers while preserving the
+ // value of the number. Narrowing operators assume the input is representable
+ // in the target type and are *not* defined for other inputs.
+ // Use narrowing change operators only when there is a static guarantee that
+ // the input value is representable in the target value.
+ const Operator* ChangeFloat32ToFloat64();
+ const Operator* ChangeFloat64ToInt32(); // narrowing
+ const Operator* ChangeFloat64ToUint32(); // narrowing
const Operator* ChangeInt32ToFloat64();
- const Operator* ChangeUint32ToFloat64();
- const Operator* ChangeFloat64ToInt32();
- const Operator* ChangeFloat64ToUint32();
-
- // Sign/zero extend int32/uint32 to int64/uint64.
const Operator* ChangeInt32ToInt64();
+ const Operator* ChangeUint32ToFloat64();
const Operator* ChangeUint32ToUint64();
- // Truncate double to int32 using JavaScript semantics.
- const Operator* TruncateFloat64ToInt32();
-
- // Truncate the high order bits and convert the remaining bits to int32.
+ // These operators truncate numbers, both changing the representation of
+ // the number and mapping multiple input values onto the same output value.
+ const Operator* TruncateFloat64ToFloat32();
+ const Operator* TruncateFloat64ToInt32(); // JavaScript semantics.
const Operator* TruncateInt64ToInt32();
// Floating point operators always operate with IEEE 754 round-to-nearest.
« no previous file with comments | « src/compiler/graph-unittest.cc ('k') | src/compiler/machine-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698