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

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

Issue 1778493004: [wasm] Int64Lowering of Int64Add on ia32 and arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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 | « src/compiler/instruction-selector.cc ('k') | src/compiler/machine-operator.h » ('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 4e592c1256f4fd3062ef0c0d3249b5b7c0fa5aba..116e261fcf0aa5c3cda989962b77ceb899e14881 100644
--- a/src/compiler/int64-lowering.cc
+++ b/src/compiler/int64-lowering.cc
@@ -251,6 +251,25 @@ void Int64Lowering::LowerNode(Node* node) {
// todo(ahaas): I added a list of missing instructions here to make merging
// easier when I do them one by one.
// kExprI64Add:
+ case IrOpcode::kInt64Add: {
+ DCHECK(node->InputCount() == 2);
+
+ Node* right = node->InputAt(1);
+ node->ReplaceInput(1, GetReplacementLow(right));
+ node->AppendInput(zone(), GetReplacementHigh(right));
+
+ Node* left = node->InputAt(0);
+ node->ReplaceInput(0, GetReplacementLow(left));
+ node->InsertInput(zone(), 1, GetReplacementHigh(left));
+
+ NodeProperties::ChangeOp(node, machine()->Int32PairAdd());
+ // We access the additional return values through projections.
+ Node* low_node = graph()->NewNode(common()->Projection(0), node);
+ Node* high_node = graph()->NewNode(common()->Projection(1), node);
+ ReplaceNode(node, low_node, high_node);
+ break;
+ }
+
// kExprI64Sub:
// kExprI64Mul:
// kExprI64DivS:
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698