Chromium Code Reviews| 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 "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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 424 ArmOperandGenerator g(this); | 424 ArmOperandGenerator g(this); |
| 425 Node* base = node->InputAt(0); | 425 Node* base = node->InputAt(0); |
| 426 Node* index = node->InputAt(1); | 426 Node* index = node->InputAt(1); |
| 427 Node* value = node->InputAt(2); | 427 Node* value = node->InputAt(2); |
| 428 | 428 |
| 429 StoreRepresentation store_rep = StoreRepresentationOf(node->op()); | 429 StoreRepresentation store_rep = StoreRepresentationOf(node->op()); |
| 430 WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind(); | 430 WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind(); |
| 431 MachineRepresentation rep = store_rep.representation(); | 431 MachineRepresentation rep = store_rep.representation(); |
| 432 | 432 |
| 433 if (write_barrier_kind != kNoWriteBarrier) { | 433 if (write_barrier_kind != kNoWriteBarrier) { |
| 434 DCHECK_EQ(MachineRepresentation::kTagged, rep); | 434 DCHECK(rep == MachineRepresentation::kTagged || |
| 435 rep == MachineRepresentation::kTaggedPointer); | |
|
Jarin
2016/08/25 05:52:05
Could you introduce some helper function in machin
mvstanton
2016/08/29 12:02:10
CanBeTaggedPointer(rep).
| |
| 435 AddressingMode addressing_mode; | 436 AddressingMode addressing_mode; |
| 436 InstructionOperand inputs[3]; | 437 InstructionOperand inputs[3]; |
| 437 size_t input_count = 0; | 438 size_t input_count = 0; |
| 438 inputs[input_count++] = g.UseUniqueRegister(base); | 439 inputs[input_count++] = g.UseUniqueRegister(base); |
| 439 // OutOfLineRecordWrite uses the index in an 'add' instruction as well as | 440 // OutOfLineRecordWrite uses the index in an 'add' instruction as well as |
| 440 // for the store itself, so we must check compatibility with both. | 441 // for the store itself, so we must check compatibility with both. |
| 441 if (g.CanBeImmediate(index, kArmAdd) && g.CanBeImmediate(index, kArmStr)) { | 442 if (g.CanBeImmediate(index, kArmAdd) && g.CanBeImmediate(index, kArmStr)) { |
| 442 inputs[input_count++] = g.UseImmediate(index); | 443 inputs[input_count++] = g.UseImmediate(index); |
| 443 addressing_mode = kMode_Offset_RI; | 444 addressing_mode = kMode_Offset_RI; |
| 444 } else { | 445 } else { |
| (...skipping 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2258 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); | 2259 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); |
| 2259 req_aligned[0] = MachineType::Float32(); | 2260 req_aligned[0] = MachineType::Float32(); |
| 2260 req_aligned[1] = MachineType::Float64(); | 2261 req_aligned[1] = MachineType::Float64(); |
| 2261 return MachineOperatorBuilder::AlignmentRequirements:: | 2262 return MachineOperatorBuilder::AlignmentRequirements:: |
| 2262 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); | 2263 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); |
| 2263 } | 2264 } |
| 2264 | 2265 |
| 2265 } // namespace compiler | 2266 } // namespace compiler |
| 2266 } // namespace internal | 2267 } // namespace internal |
| 2267 } // namespace v8 | 2268 } // namespace v8 |
| OLD | NEW |