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

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

Issue 2239813002: [compiler] Allow matcher to work on arch without scaling capability (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move out of Matcher template Created 4 years, 4 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/x64/instruction-selector-x64.cc ('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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 inputs[(*input_count)++] = TempImmediate(displacement); 143 inputs[(*input_count)++] = TempImmediate(displacement);
144 return kMode_MI; 144 return kMode_MI;
145 } 145 }
146 } 146 }
147 return mode; 147 return mode;
148 } 148 }
149 149
150 AddressingMode GetEffectiveAddressMemoryOperand(Node* node, 150 AddressingMode GetEffectiveAddressMemoryOperand(Node* node,
151 InstructionOperand inputs[], 151 InstructionOperand inputs[],
152 size_t* input_count) { 152 size_t* input_count) {
153 BaseWithIndexAndDisplacement32Matcher m(node, true); 153 BaseWithIndexAndDisplacement32Matcher m(node, AddressOption::kAllowAll);
154 DCHECK(m.matches()); 154 DCHECK(m.matches());
155 if ((m.displacement() == nullptr || CanBeImmediate(m.displacement()))) { 155 if ((m.displacement() == nullptr || CanBeImmediate(m.displacement()))) {
156 return GenerateMemoryOperandInputs( 156 return GenerateMemoryOperandInputs(
157 m.index(), m.scale(), m.base(), m.displacement(), 157 m.index(), m.scale(), m.base(), m.displacement(),
158 m.displacement_mode(), inputs, input_count); 158 m.displacement_mode(), inputs, input_count);
159 } else { 159 } else {
160 inputs[(*input_count)++] = UseRegister(node->InputAt(0)); 160 inputs[(*input_count)++] = UseRegister(node->InputAt(0));
161 inputs[(*input_count)++] = UseRegister(node->InputAt(1)); 161 inputs[(*input_count)++] = UseRegister(node->InputAt(1));
162 return kMode_MR1; 162 return kMode_MR1;
163 } 163 }
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
1727 // static 1727 // static
1728 MachineOperatorBuilder::AlignmentRequirements 1728 MachineOperatorBuilder::AlignmentRequirements
1729 InstructionSelector::AlignmentRequirements() { 1729 InstructionSelector::AlignmentRequirements() {
1730 return MachineOperatorBuilder::AlignmentRequirements:: 1730 return MachineOperatorBuilder::AlignmentRequirements::
1731 FullUnalignedAccessSupport(); 1731 FullUnalignedAccessSupport();
1732 } 1732 }
1733 1733
1734 } // namespace compiler 1734 } // namespace compiler
1735 } // namespace internal 1735 } // namespace internal
1736 } // namespace v8 1736 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698