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

Side by Side Diff: src/compiler/x87/instruction-selector-x87.cc

Issue 1845183002: X87: [wasm] Int64Lowering of Int64Mul on ia32 and arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/x87/instruction-codes-x87.h ('k') | no next file » | 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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 574
575 InstructionOperand outputs[] = { 575 InstructionOperand outputs[] = {
576 g.DefineSameAsFirst(node), 576 g.DefineSameAsFirst(node),
577 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; 577 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
578 578
579 InstructionOperand temps[] = {g.TempRegister()}; 579 InstructionOperand temps[] = {g.TempRegister()};
580 580
581 Emit(kX87SubPair, 2, outputs, 4, inputs, 1, temps); 581 Emit(kX87SubPair, 2, outputs, 4, inputs, 1, temps);
582 } 582 }
583 583
584 void InstructionSelector::VisitInt32PairMul(Node* node) { UNIMPLEMENTED(); } 584 void InstructionSelector::VisitInt32PairMul(Node* node) {
585 X87OperandGenerator g(this);
586
587 // InputAt(3) explicitly shares ecx with OutputRegister(1) to save one
588 // register and one mov instruction.
589 InstructionOperand inputs[] = {
590 g.UseUnique(node->InputAt(0)), g.UseUnique(node->InputAt(1)),
591 g.UseUniqueRegister(node->InputAt(2)), g.UseFixed(node->InputAt(3), ecx)};
592
593 InstructionOperand outputs[] = {
594 g.DefineAsFixed(node, eax),
595 g.DefineAsFixed(NodeProperties::FindProjection(node, 1), ecx)};
596
597 InstructionOperand temps[] = {g.TempRegister(edx)};
598
599 Emit(kX87MulPair, 2, outputs, 4, inputs, 1, temps);
600 }
585 601
586 void InstructionSelector::VisitWord32PairShl(Node* node) { 602 void InstructionSelector::VisitWord32PairShl(Node* node) {
587 X87OperandGenerator g(this); 603 X87OperandGenerator g(this);
588 604
589 Node* shift = node->InputAt(2); 605 Node* shift = node->InputAt(2);
590 InstructionOperand shift_operand; 606 InstructionOperand shift_operand;
591 if (g.CanBeImmediate(shift)) { 607 if (g.CanBeImmediate(shift)) {
592 shift_operand = g.UseImmediate(shift); 608 shift_operand = g.UseImmediate(shift);
593 } else { 609 } else {
594 shift_operand = g.UseFixed(shift, ecx); 610 shift_operand = g.UseFixed(shift, ecx);
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 MachineOperatorBuilder::kFloat32RoundTruncate | 1582 MachineOperatorBuilder::kFloat32RoundTruncate |
1567 MachineOperatorBuilder::kFloat64RoundTruncate | 1583 MachineOperatorBuilder::kFloat64RoundTruncate |
1568 MachineOperatorBuilder::kFloat32RoundTiesEven | 1584 MachineOperatorBuilder::kFloat32RoundTiesEven |
1569 MachineOperatorBuilder::kFloat64RoundTiesEven; 1585 MachineOperatorBuilder::kFloat64RoundTiesEven;
1570 return flags; 1586 return flags;
1571 } 1587 }
1572 1588
1573 } // namespace compiler 1589 } // namespace compiler
1574 } // namespace internal 1590 } // namespace internal
1575 } // namespace v8 1591 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x87/instruction-codes-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698