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

Side by Side Diff: src/compiler/ia32/instruction-selector-ia32.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 | « no previous file | src/compiler/node-matchers.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/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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 inputs[(*input_count)++] = TempImmediate(displacement); 139 inputs[(*input_count)++] = TempImmediate(displacement);
140 return kMode_MI; 140 return kMode_MI;
141 } 141 }
142 } 142 }
143 return mode; 143 return mode;
144 } 144 }
145 145
146 AddressingMode GetEffectiveAddressMemoryOperand(Node* node, 146 AddressingMode GetEffectiveAddressMemoryOperand(Node* node,
147 InstructionOperand inputs[], 147 InstructionOperand inputs[],
148 size_t* input_count) { 148 size_t* input_count) {
149 BaseWithIndexAndDisplacement32Matcher m(node, true); 149 BaseWithIndexAndDisplacement32Matcher m(node, AddressOption::kAllowAll);
150 DCHECK(m.matches()); 150 DCHECK(m.matches());
151 if ((m.displacement() == nullptr || CanBeImmediate(m.displacement()))) { 151 if ((m.displacement() == nullptr || CanBeImmediate(m.displacement()))) {
152 return GenerateMemoryOperandInputs( 152 return GenerateMemoryOperandInputs(
153 m.index(), m.scale(), m.base(), m.displacement(), 153 m.index(), m.scale(), m.base(), m.displacement(),
154 m.displacement_mode(), inputs, input_count); 154 m.displacement_mode(), inputs, input_count);
155 } else { 155 } else {
156 inputs[(*input_count)++] = UseRegister(node->InputAt(0)); 156 inputs[(*input_count)++] = UseRegister(node->InputAt(0));
157 inputs[(*input_count)++] = UseRegister(node->InputAt(1)); 157 inputs[(*input_count)++] = UseRegister(node->InputAt(1));
158 return kMode_MR1; 158 return kMode_MR1;
159 } 159 }
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 // static 1691 // static
1692 MachineOperatorBuilder::AlignmentRequirements 1692 MachineOperatorBuilder::AlignmentRequirements
1693 InstructionSelector::AlignmentRequirements() { 1693 InstructionSelector::AlignmentRequirements() {
1694 return MachineOperatorBuilder::AlignmentRequirements:: 1694 return MachineOperatorBuilder::AlignmentRequirements::
1695 FullUnalignedAccessSupport(); 1695 FullUnalignedAccessSupport();
1696 } 1696 }
1697 1697
1698 } // namespace compiler 1698 } // namespace compiler
1699 } // namespace internal 1699 } // namespace internal
1700 } // namespace v8 1700 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/node-matchers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698