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

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

Issue 591023003: WIP: Add first-class support for float32 representations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/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 ec911f49a76a10b57085c6cd6f03fdd3e065d7e3..a72453282acc38523f878e955726591db94f577c 100644
--- a/src/compiler/machine-operator.h
+++ b/src/compiler/machine-operator.h
@@ -62,86 +62,87 @@ class MachineOperatorBuilder FINAL {
public:
explicit MachineOperatorBuilder(MachineType word = kMachPtr);
- const Operator* Word32And() const WARN_UNUSED_RESULT;
- const Operator* Word32Or() const WARN_UNUSED_RESULT;
- const Operator* Word32Xor() const WARN_UNUSED_RESULT;
- const Operator* Word32Shl() const WARN_UNUSED_RESULT;
- const Operator* Word32Shr() const WARN_UNUSED_RESULT;
- const Operator* Word32Sar() const WARN_UNUSED_RESULT;
- const Operator* Word32Ror() const WARN_UNUSED_RESULT;
- const Operator* Word32Equal() const WARN_UNUSED_RESULT;
-
- const Operator* Word64And() const WARN_UNUSED_RESULT;
- const Operator* Word64Or() const WARN_UNUSED_RESULT;
- const Operator* Word64Xor() const WARN_UNUSED_RESULT;
- const Operator* Word64Shl() const WARN_UNUSED_RESULT;
- const Operator* Word64Shr() const WARN_UNUSED_RESULT;
- const Operator* Word64Sar() const WARN_UNUSED_RESULT;
- const Operator* Word64Ror() const WARN_UNUSED_RESULT;
- const Operator* Word64Equal() const WARN_UNUSED_RESULT;
-
- const Operator* Int32Add() const WARN_UNUSED_RESULT;
- const Operator* Int32AddWithOverflow() const WARN_UNUSED_RESULT;
- const Operator* Int32Sub() const WARN_UNUSED_RESULT;
- const Operator* Int32SubWithOverflow() const WARN_UNUSED_RESULT;
- const Operator* Int32Mul() const WARN_UNUSED_RESULT;
- const Operator* Int32Div() const WARN_UNUSED_RESULT;
- const Operator* Int32UDiv() const WARN_UNUSED_RESULT;
- const Operator* Int32Mod() const WARN_UNUSED_RESULT;
- const Operator* Int32UMod() const WARN_UNUSED_RESULT;
- const Operator* Int32LessThan() const WARN_UNUSED_RESULT;
- const Operator* Int32LessThanOrEqual() const WARN_UNUSED_RESULT;
- const Operator* Uint32LessThan() const WARN_UNUSED_RESULT;
- const Operator* Uint32LessThanOrEqual() const WARN_UNUSED_RESULT;
-
- const Operator* Int64Add() const WARN_UNUSED_RESULT;
- const Operator* Int64Sub() const WARN_UNUSED_RESULT;
- const Operator* Int64Mul() const WARN_UNUSED_RESULT;
- const Operator* Int64Div() const WARN_UNUSED_RESULT;
- const Operator* Int64UDiv() const WARN_UNUSED_RESULT;
- const Operator* Int64Mod() const WARN_UNUSED_RESULT;
- const Operator* Int64UMod() const WARN_UNUSED_RESULT;
- const Operator* Int64LessThan() const WARN_UNUSED_RESULT;
- const Operator* Int64LessThanOrEqual() const WARN_UNUSED_RESULT;
-
- // 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.
- const Operator* ChangeInt32ToFloat64() const WARN_UNUSED_RESULT;
- const Operator* ChangeUint32ToFloat64() const WARN_UNUSED_RESULT;
- const Operator* ChangeFloat64ToInt32() const WARN_UNUSED_RESULT;
- const Operator* ChangeFloat64ToUint32() const WARN_UNUSED_RESULT;
-
- // Sign/zero extend int32/uint32 to int64/uint64.
- const Operator* ChangeInt32ToInt64() const WARN_UNUSED_RESULT;
- const Operator* ChangeUint32ToUint64() const WARN_UNUSED_RESULT;
-
- // Truncate double to int32 using JavaScript semantics.
- const Operator* TruncateFloat64ToInt32() const WARN_UNUSED_RESULT;
-
- // Truncate the high order bits and convert the remaining bits to int32.
- const Operator* TruncateInt64ToInt32() const WARN_UNUSED_RESULT;
+ const Operator* Word32And() const;
+ const Operator* Word32Or() const;
+ const Operator* Word32Xor() const;
+ const Operator* Word32Shl() const;
+ const Operator* Word32Shr() const;
+ const Operator* Word32Sar() const;
+ const Operator* Word32Ror() const;
+ const Operator* Word32Equal() const;
+
+ const Operator* Word64And() const;
+ const Operator* Word64Or() const;
+ const Operator* Word64Xor() const;
+ const Operator* Word64Shl() const;
+ const Operator* Word64Shr() const;
+ const Operator* Word64Sar() const;
+ const Operator* Word64Ror() const;
+ const Operator* Word64Equal() const;
+
+ const Operator* Int32Add() const;
+ const Operator* Int32AddWithOverflow() const;
+ const Operator* Int32Sub() const;
+ const Operator* Int32SubWithOverflow() const;
+ const Operator* Int32Mul() const;
+ const Operator* Int32Div() const;
+ const Operator* Int32UDiv() const;
+ const Operator* Int32Mod() const;
+ const Operator* Int32UMod() const;
+ const Operator* Int32LessThan() const;
+ const Operator* Int32LessThanOrEqual() const;
+ const Operator* Uint32LessThan() const;
+ const Operator* Uint32LessThanOrEqual() const;
+
+ const Operator* Int64Add() const;
+ const Operator* Int64Sub() const;
+ const Operator* Int64Mul() const;
+ const Operator* Int64Div() const;
+ const Operator* Int64UDiv() const;
+ const Operator* Int64Mod() const;
+ const Operator* Int64UMod() const;
+ const Operator* Int64LessThan() const;
+ const Operator* Int64LessThanOrEqual() const;
+
+ // 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;
+ const Operator* ChangeFloat64ToFloat32() const; // narrowing
+ const Operator* ChangeFloat64ToInt32() const; // narrowing
+ const Operator* ChangeFloat64ToUint32() const; // narrowing
+ const Operator* ChangeInt32ToFloat64() const;
+ const Operator* ChangeInt32ToInt64() const;
+ const Operator* ChangeUint32ToFloat64() const;
+ const Operator* ChangeUint32ToUint64() const;
+
+ // 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;
+ const Operator* TruncateFloat64ToInt32() const; // JavaScript semantics.
+ const Operator* TruncateInt64ToInt32() const;
// Floating point operators always operate with IEEE 754 round-to-nearest.
- const Operator* Float64Add() const WARN_UNUSED_RESULT;
- const Operator* Float64Sub() const WARN_UNUSED_RESULT;
- const Operator* Float64Mul() const WARN_UNUSED_RESULT;
- const Operator* Float64Div() const WARN_UNUSED_RESULT;
- const Operator* Float64Mod() const WARN_UNUSED_RESULT;
+ const Operator* Float64Add() const;
+ const Operator* Float64Sub() const;
+ const Operator* Float64Mul() const;
+ const Operator* Float64Div() const;
+ const Operator* Float64Mod() const;
// Floating point comparisons complying to IEEE 754.
- const Operator* Float64Equal() const WARN_UNUSED_RESULT;
- const Operator* Float64LessThan() const WARN_UNUSED_RESULT;
- const Operator* Float64LessThanOrEqual() const WARN_UNUSED_RESULT;
+ const Operator* Float64Equal() const;
+ const Operator* Float64LessThan() const;
+ const Operator* Float64LessThanOrEqual() const;
// load [base + index]
- const Operator* Load(LoadRepresentation rep) const WARN_UNUSED_RESULT;
+ const Operator* Load(LoadRepresentation rep) const;
// store [base + index], value
- const Operator* Store(StoreRepresentation rep) const WARN_UNUSED_RESULT;
+ const Operator* Store(StoreRepresentation rep) const;
- // Target machine word-size assumed by this builder.
+ // Target machine word-size for this builder.
bool Is32() const { return word() == kRepWord32; }
bool Is64() const { return word() == kRepWord64; }
MachineType word() const { return word_; }
« 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