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

Unified Diff: src/compiler/simplified-lowering.cc

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/opcodes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index e3ddf5c461d6dadc0f63736d1d3d47855873c2cf..9a696c86a8dd1e1fa5aa9cd758104483bbdb8fe2 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -692,30 +692,43 @@ class RepresentationSelector {
case IrOpcode::kWord64Equal:
return VisitBinop(node, kRepWord64, kRepBit);
+ case IrOpcode::kChangeFloat32ToFloat64:
+ return VisitUnop(node, kTypeNumber | kRepFloat32,
+ kTypeNumber | kRepFloat64);
+ case IrOpcode::kChangeFloat64ToFloat32:
+ return VisitUnop(node, kTypeNumber | kRepFloat64,
+ kTypeNumber | kRepFloat32);
+ case IrOpcode::kChangeFloat64ToInt32:
+ return VisitUnop(node, kTypeInt32 | kRepFloat64,
+ kTypeInt32 | kRepWord32);
+ case IrOpcode::kChangeFloat64ToUint32:
+ return VisitUnop(node, kTypeUint32 | kRepFloat64,
+ kTypeUint32 | kRepWord32);
+
+ case IrOpcode::kChangeInt32ToFloat64:
+ return VisitUnop(node, kTypeInt32 | kRepWord32,
+ kTypeInt32 | kRepFloat64);
case IrOpcode::kChangeInt32ToInt64:
return VisitUnop(node, kTypeInt32 | kRepWord32,
kTypeInt32 | kRepWord64);
+ case IrOpcode::kChangeUint32ToFloat64:
+ return VisitUnop(node, kTypeUint32 | kRepWord32,
+ kTypeUint32 | kRepFloat64);
case IrOpcode::kChangeUint32ToUint64:
return VisitUnop(node, kTypeUint32 | kRepWord32,
kTypeUint32 | kRepWord64);
+
+ case IrOpcode::kTruncateFloat64ToFloat32:
+ return VisitUnop(node, kTypeNumber | kRepFloat64,
+ kTypeNumber | kRepFloat32);
+ case IrOpcode::kTruncateFloat64ToInt32:
+ return VisitUnop(node, kTypeNumber | kRepFloat64,
+ kTypeInt32 | kRepWord32);
case IrOpcode::kTruncateInt64ToInt32:
// TODO(titzer): Is kTypeInt32 correct here?
return VisitUnop(node, kTypeInt32 | kRepWord64,
kTypeInt32 | kRepWord32);
- case IrOpcode::kChangeInt32ToFloat64:
- return VisitUnop(node, kTypeInt32 | kRepWord32,
- kTypeInt32 | kRepFloat64);
- case IrOpcode::kChangeUint32ToFloat64:
- return VisitUnop(node, kTypeUint32 | kRepWord32,
- kTypeUint32 | kRepFloat64);
- case IrOpcode::kChangeFloat64ToInt32:
- return VisitUnop(node, kTypeInt32 | kRepFloat64,
- kTypeInt32 | kRepWord32);
- case IrOpcode::kChangeFloat64ToUint32:
- return VisitUnop(node, kTypeUint32 | kRepFloat64,
- kTypeUint32 | kRepWord32);
-
case IrOpcode::kFloat64Add:
case IrOpcode::kFloat64Sub:
case IrOpcode::kFloat64Mul:
« no previous file with comments | « src/compiler/opcodes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698