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

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

Issue 1778893004: [wasm] Implementation of Word32PairShr and Word32PairSar on arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@pair-shl-test
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 unified diff | Download patch
« no previous file with comments | « src/compiler/arm/instruction-scheduler-arm.cc ('k') | test/cctest/wasm/test-run-wasm-64.cc » ('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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 g.UseRegister(node->InputAt(1)), 799 g.UseRegister(node->InputAt(1)),
800 shift_operand}; 800 shift_operand};
801 801
802 InstructionOperand outputs[] = { 802 InstructionOperand outputs[] = {
803 g.DefineAsRegister(node), 803 g.DefineAsRegister(node),
804 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))}; 804 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
805 805
806 Emit(kArmLslPair, 2, outputs, 3, inputs); 806 Emit(kArmLslPair, 2, outputs, 3, inputs);
807 } 807 }
808 808
809 void InstructionSelector::VisitWord32PairShr(Node* node) { UNIMPLEMENTED(); } 809 void InstructionSelector::VisitWord32PairShr(Node* node) {
810 ArmOperandGenerator g(this);
811 // We use g.UseUniqueRegister here for InputAt(1) and InputAt(2) to to
812 // guarantee that there is no register aliasing with output register.
813 Int32Matcher m(node->InputAt(2));
814 InstructionOperand shift_operand;
815 if (m.HasValue()) {
816 shift_operand = g.UseImmediate(m.node());
817 } else {
818 shift_operand = g.UseUniqueRegister(m.node());
819 }
810 820
811 void InstructionSelector::VisitWord32PairSar(Node* node) { UNIMPLEMENTED(); } 821 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0)),
822 g.UseUniqueRegister(node->InputAt(1)),
823 shift_operand};
824
825 InstructionOperand outputs[] = {
826 g.DefineAsRegister(node),
827 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
828
829 Emit(kArmLsrPair, 2, outputs, 3, inputs);
830 }
831
832 void InstructionSelector::VisitWord32PairSar(Node* node) {
833 ArmOperandGenerator g(this);
834 // We use g.UseUniqueRegister here for InputAt(1) and InputAt(2) to to
835 // guarantee that there is no register aliasing with output register.
836 Int32Matcher m(node->InputAt(2));
837 InstructionOperand shift_operand;
838 if (m.HasValue()) {
839 shift_operand = g.UseImmediate(m.node());
840 } else {
841 shift_operand = g.UseUniqueRegister(m.node());
842 }
843
844 InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0)),
845 g.UseUniqueRegister(node->InputAt(1)),
846 shift_operand};
847
848 InstructionOperand outputs[] = {
849 g.DefineAsRegister(node),
850 g.DefineAsRegister(NodeProperties::FindProjection(node, 1))};
851
852 Emit(kArmAsrPair, 2, outputs, 3, inputs);
853 }
812 854
813 void InstructionSelector::VisitWord32Ror(Node* node) { 855 void InstructionSelector::VisitWord32Ror(Node* node) {
814 VisitShift(this, node, TryMatchROR); 856 VisitShift(this, node, TryMatchROR);
815 } 857 }
816 858
817 859
818 void InstructionSelector::VisitWord32Clz(Node* node) { 860 void InstructionSelector::VisitWord32Clz(Node* node) {
819 VisitRR(this, kArmClz, node); 861 VisitRR(this, kArmClz, node);
820 } 862 }
821 863
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 MachineOperatorBuilder::kFloat64RoundTiesAway | 1795 MachineOperatorBuilder::kFloat64RoundTiesAway |
1754 MachineOperatorBuilder::kFloat32RoundTiesEven | 1796 MachineOperatorBuilder::kFloat32RoundTiesEven |
1755 MachineOperatorBuilder::kFloat64RoundTiesEven; 1797 MachineOperatorBuilder::kFloat64RoundTiesEven;
1756 } 1798 }
1757 return flags; 1799 return flags;
1758 } 1800 }
1759 1801
1760 } // namespace compiler 1802 } // namespace compiler
1761 } // namespace internal 1803 } // namespace internal
1762 } // namespace v8 1804 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-scheduler-arm.cc ('k') | test/cctest/wasm/test-run-wasm-64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698