Chromium Code Reviews

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

Issue 2258073002: [Turbofan]: Use new MachineTypes in access-builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed write barrier issue. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "src/base/adapters.h" 7 #include "src/base/adapters.h"
8 #include "src/compiler/instruction-selector-impl.h" 8 #include "src/compiler/instruction-selector-impl.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 194 matching lines...)
205 X64OperandGenerator g(this); 205 X64OperandGenerator g(this);
206 Node* base = node->InputAt(0); 206 Node* base = node->InputAt(0);
207 Node* index = node->InputAt(1); 207 Node* index = node->InputAt(1);
208 Node* value = node->InputAt(2); 208 Node* value = node->InputAt(2);
209 209
210 StoreRepresentation store_rep = StoreRepresentationOf(node->op()); 210 StoreRepresentation store_rep = StoreRepresentationOf(node->op());
211 WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind(); 211 WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind();
212 MachineRepresentation rep = store_rep.representation(); 212 MachineRepresentation rep = store_rep.representation();
213 213
214 if (write_barrier_kind != kNoWriteBarrier) { 214 if (write_barrier_kind != kNoWriteBarrier) {
215 DCHECK_EQ(MachineRepresentation::kTagged, rep); 215 DCHECK(rep == MachineRepresentation::kTagged ||
216 rep == MachineRepresentation::kTaggedPointer);
216 AddressingMode addressing_mode; 217 AddressingMode addressing_mode;
217 InstructionOperand inputs[3]; 218 InstructionOperand inputs[3];
218 size_t input_count = 0; 219 size_t input_count = 0;
219 inputs[input_count++] = g.UseUniqueRegister(base); 220 inputs[input_count++] = g.UseUniqueRegister(base);
220 if (g.CanBeImmediate(index)) { 221 if (g.CanBeImmediate(index)) {
221 inputs[input_count++] = g.UseImmediate(index); 222 inputs[input_count++] = g.UseImmediate(index);
222 addressing_mode = kMode_MRI; 223 addressing_mode = kMode_MRI;
223 } else { 224 } else {
224 inputs[input_count++] = g.UseUniqueRegister(index); 225 inputs[input_count++] = g.UseUniqueRegister(index);
225 addressing_mode = kMode_MR1; 226 addressing_mode = kMode_MR1;
(...skipping 2006 matching lines...)
2232 // static 2233 // static
2233 MachineOperatorBuilder::AlignmentRequirements 2234 MachineOperatorBuilder::AlignmentRequirements
2234 InstructionSelector::AlignmentRequirements() { 2235 InstructionSelector::AlignmentRequirements() {
2235 return MachineOperatorBuilder::AlignmentRequirements:: 2236 return MachineOperatorBuilder::AlignmentRequirements::
2236 FullUnalignedAccessSupport(); 2237 FullUnalignedAccessSupport();
2237 } 2238 }
2238 2239
2239 } // namespace compiler 2240 } // namespace compiler
2240 } // namespace internal 2241 } // namespace internal
2241 } // namespace v8 2242 } // namespace v8
OLDNEW

Powered by Google App Engine