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

Side by Side Diff: src/compiler/arm64/instruction-selector-arm64.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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
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/compiler/instruction-selector-impl.h" 5 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 Node* base = node->InputAt(0); 612 Node* base = node->InputAt(0);
613 Node* index = node->InputAt(1); 613 Node* index = node->InputAt(1);
614 Node* value = node->InputAt(2); 614 Node* value = node->InputAt(2);
615 615
616 StoreRepresentation store_rep = StoreRepresentationOf(node->op()); 616 StoreRepresentation store_rep = StoreRepresentationOf(node->op());
617 WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind(); 617 WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind();
618 MachineRepresentation rep = store_rep.representation(); 618 MachineRepresentation rep = store_rep.representation();
619 619
620 // TODO(arm64): I guess this could be done in a better way. 620 // TODO(arm64): I guess this could be done in a better way.
621 if (write_barrier_kind != kNoWriteBarrier) { 621 if (write_barrier_kind != kNoWriteBarrier) {
622 DCHECK_EQ(MachineRepresentation::kTagged, rep); 622 DCHECK(rep == MachineRepresentation::kTagged ||
623 rep == MachineRepresentation::kTaggedPointer);
623 AddressingMode addressing_mode; 624 AddressingMode addressing_mode;
624 InstructionOperand inputs[3]; 625 InstructionOperand inputs[3];
625 size_t input_count = 0; 626 size_t input_count = 0;
626 inputs[input_count++] = g.UseUniqueRegister(base); 627 inputs[input_count++] = g.UseUniqueRegister(base);
627 // OutOfLineRecordWrite uses the index in an arithmetic instruction, so we 628 // OutOfLineRecordWrite uses the index in an arithmetic instruction, so we
628 // must check kArithmeticImm as well as kLoadStoreImm64. 629 // must check kArithmeticImm as well as kLoadStoreImm64.
629 if (g.CanBeImmediate(index, kArithmeticImm) && 630 if (g.CanBeImmediate(index, kArithmeticImm) &&
630 g.CanBeImmediate(index, kLoadStoreImm64)) { 631 g.CanBeImmediate(index, kLoadStoreImm64)) {
631 inputs[input_count++] = g.UseImmediate(index); 632 inputs[input_count++] = g.UseImmediate(index);
632 addressing_mode = kMode_MRI; 633 addressing_mode = kMode_MRI;
(...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after
2797 // static 2798 // static
2798 MachineOperatorBuilder::AlignmentRequirements 2799 MachineOperatorBuilder::AlignmentRequirements
2799 InstructionSelector::AlignmentRequirements() { 2800 InstructionSelector::AlignmentRequirements() {
2800 return MachineOperatorBuilder::AlignmentRequirements:: 2801 return MachineOperatorBuilder::AlignmentRequirements::
2801 FullUnalignedAccessSupport(); 2802 FullUnalignedAccessSupport();
2802 } 2803 }
2803 2804
2804 } // namespace compiler 2805 } // namespace compiler
2805 } // namespace internal 2806 } // namespace internal
2806 } // namespace v8 2807 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698