OLD | NEW |
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...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(CanBeTaggedPointer(rep)); |
216 AddressingMode addressing_mode; | 216 AddressingMode addressing_mode; |
217 InstructionOperand inputs[3]; | 217 InstructionOperand inputs[3]; |
218 size_t input_count = 0; | 218 size_t input_count = 0; |
219 inputs[input_count++] = g.UseUniqueRegister(base); | 219 inputs[input_count++] = g.UseUniqueRegister(base); |
220 if (g.CanBeImmediate(index)) { | 220 if (g.CanBeImmediate(index)) { |
221 inputs[input_count++] = g.UseImmediate(index); | 221 inputs[input_count++] = g.UseImmediate(index); |
222 addressing_mode = kMode_MRI; | 222 addressing_mode = kMode_MRI; |
223 } else { | 223 } else { |
224 inputs[input_count++] = g.UseUniqueRegister(index); | 224 inputs[input_count++] = g.UseUniqueRegister(index); |
225 addressing_mode = kMode_MR1; | 225 addressing_mode = kMode_MR1; |
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2250 // static | 2250 // static |
2251 MachineOperatorBuilder::AlignmentRequirements | 2251 MachineOperatorBuilder::AlignmentRequirements |
2252 InstructionSelector::AlignmentRequirements() { | 2252 InstructionSelector::AlignmentRequirements() { |
2253 return MachineOperatorBuilder::AlignmentRequirements:: | 2253 return MachineOperatorBuilder::AlignmentRequirements:: |
2254 FullUnalignedAccessSupport(); | 2254 FullUnalignedAccessSupport(); |
2255 } | 2255 } |
2256 | 2256 |
2257 } // namespace compiler | 2257 } // namespace compiler |
2258 } // namespace internal | 2258 } // namespace internal |
2259 } // namespace v8 | 2259 } // namespace v8 |
OLD | NEW |