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

Side by Side Diff: src/compiler/int64-lowering.cc

Issue 1807273002: [wasm] Int64Lowering of Int64Mul on ia32 and arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-phi
Patch Set: Rebase Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/compiler/int64-lowering.h ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/int64-lowering.h" 5 #include "src/compiler/int64-lowering.h"
6 #include "src/compiler/common-operator.h" 6 #include "src/compiler/common-operator.h"
7 #include "src/compiler/diamond.h" 7 #include "src/compiler/diamond.h"
8 #include "src/compiler/graph.h" 8 #include "src/compiler/graph.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 node->InsertInput(zone(), 1, GetReplacementHigh(left)); 296 node->InsertInput(zone(), 1, GetReplacementHigh(left));
297 297
298 NodeProperties::ChangeOp(node, machine()->Int32PairSub()); 298 NodeProperties::ChangeOp(node, machine()->Int32PairSub());
299 // We access the additional return values through projections. 299 // We access the additional return values through projections.
300 Node* low_node = graph()->NewNode(common()->Projection(0), node); 300 Node* low_node = graph()->NewNode(common()->Projection(0), node);
301 Node* high_node = graph()->NewNode(common()->Projection(1), node); 301 Node* high_node = graph()->NewNode(common()->Projection(1), node);
302 ReplaceNode(node, low_node, high_node); 302 ReplaceNode(node, low_node, high_node);
303 break; 303 break;
304 } 304 }
305 // kExprI64Mul: 305 // kExprI64Mul:
306 case IrOpcode::kInt64Mul: {
307 DCHECK(node->InputCount() == 2);
308
309 Node* right = node->InputAt(1);
310 node->ReplaceInput(1, GetReplacementLow(right));
311 node->AppendInput(zone(), GetReplacementHigh(right));
312
313 Node* left = node->InputAt(0);
314 node->ReplaceInput(0, GetReplacementLow(left));
315 node->InsertInput(zone(), 1, GetReplacementHigh(left));
316
317 NodeProperties::ChangeOp(node, machine()->Int32PairMul());
318 // We access the additional return values through projections.
319 Node* low_node = graph()->NewNode(common()->Projection(0), node);
320 Node* high_node = graph()->NewNode(common()->Projection(1), node);
321 ReplaceNode(node, low_node, high_node);
322 break;
323 }
306 // kExprI64DivS: 324 // kExprI64DivS:
307 // kExprI64DivU: 325 // kExprI64DivU:
308 // kExprI64RemS: 326 // kExprI64RemS:
309 // kExprI64RemU: 327 // kExprI64RemU:
310 // kExprI64Ior: 328 // kExprI64Ior:
311 case IrOpcode::kWord64Or: { 329 case IrOpcode::kWord64Or: {
312 DCHECK(node->InputCount() == 2); 330 DCHECK(node->InputCount() == 2);
313 Node* left = node->InputAt(0); 331 Node* left = node->InputAt(0);
314 Node* right = node->InputAt(1); 332 Node* right = node->InputAt(1);
315 333
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 common()->Phi(MachineRepresentation::kWord32, value_count), 709 common()->Phi(MachineRepresentation::kWord32, value_count),
692 value_count + 1, inputs_low, false), 710 value_count + 1, inputs_low, false),
693 graph()->NewNode( 711 graph()->NewNode(
694 common()->Phi(MachineRepresentation::kWord32, value_count), 712 common()->Phi(MachineRepresentation::kWord32, value_count),
695 value_count + 1, inputs_high, false)); 713 value_count + 1, inputs_high, false));
696 } 714 }
697 } 715 }
698 } // namespace compiler 716 } // namespace compiler
699 } // namespace internal 717 } // namespace internal
700 } // namespace v8 718 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/int64-lowering.h ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698