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

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

Issue 1804953002: [wasm] Int64Lowering of I64ReinterpretF64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed unused variables. Created 4 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 | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/int64-lowering.cc
diff --git a/src/compiler/int64-lowering.cc b/src/compiler/int64-lowering.cc
index a6f355d4f5e90aadab205ed4af07623f3f7d5da2..3d3c2419b1fa797327b9127217ac258bd28b1846 100644
--- a/src/compiler/int64-lowering.cc
+++ b/src/compiler/int64-lowering.cc
@@ -444,7 +444,30 @@ void Int64Lowering::LowerNode(Node* node) {
}
// kExprF64ReinterpretI64:
// kExprI64ReinterpretF64:
+ case IrOpcode::kBitcastFloat64ToInt64: {
+ DCHECK(node->InputCount() == 1);
+ Node* input = node->InputAt(0);
+ Node* stack_slot = graph()->NewNode(
+ machine()->StackSlot(MachineRepresentation::kWord64));
+ Node* store = graph()->NewNode(
+ machine()->Store(
+ StoreRepresentation(MachineRepresentation::kFloat64,
+ WriteBarrierKind::kNoWriteBarrier)),
+ stack_slot, graph()->NewNode(common()->Int32Constant(0)), input,
+ graph()->start(), graph()->start());
+
+ Node* high_node =
+ graph()->NewNode(machine()->Load(MachineType::Int32()), stack_slot,
+ graph()->NewNode(common()->Int32Constant(4)), store,
+ graph()->start());
+ Node* low_node =
+ graph()->NewNode(machine()->Load(MachineType::Int32()), stack_slot,
+ graph()->NewNode(common()->Int32Constant(0)), store,
+ graph()->start());
+ ReplaceNode(node, low_node, high_node);
+ break;
+ }
// kExprI64Clz:
// kExprI64Ctz:
case IrOpcode::kWord64Popcnt: {
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698