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

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

Issue 1513383003: [turbofan] Store nodes use only MachineRepresentation, not MachineType. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: please mips64 Created 5 years 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/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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 169 }
170 } 170 }
171 171
172 172
173 void InstructionSelector::VisitStore(Node* node) { 173 void InstructionSelector::VisitStore(Node* node) {
174 MipsOperandGenerator g(this); 174 MipsOperandGenerator g(this);
175 Node* base = node->InputAt(0); 175 Node* base = node->InputAt(0);
176 Node* index = node->InputAt(1); 176 Node* index = node->InputAt(1);
177 Node* value = node->InputAt(2); 177 Node* value = node->InputAt(2);
178 178
179 StoreRepresentation store_rep = OpParameter<StoreRepresentation>(node); 179 StoreRepresentation store_rep = StoreRepresentationOf(node->op());
180 WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind(); 180 WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind();
181 MachineRepresentation rep = store_rep.machine_type().representation(); 181 MachineRepresentation rep = store_rep.representation();
182 182
183 // TODO(mips): I guess this could be done in a better way. 183 // TODO(mips): I guess this could be done in a better way.
184 if (write_barrier_kind != kNoWriteBarrier) { 184 if (write_barrier_kind != kNoWriteBarrier) {
185 DCHECK_EQ(MachineRepresentation::kTagged, rep); 185 DCHECK_EQ(MachineRepresentation::kTagged, rep);
186 InstructionOperand inputs[3]; 186 InstructionOperand inputs[3];
187 size_t input_count = 0; 187 size_t input_count = 0;
188 inputs[input_count++] = g.UseUniqueRegister(base); 188 inputs[input_count++] = g.UseUniqueRegister(base);
189 inputs[input_count++] = g.UseUniqueRegister(index); 189 inputs[input_count++] = g.UseUniqueRegister(index);
190 inputs[input_count++] = (write_barrier_kind == kMapWriteBarrier) 190 inputs[input_count++] = (write_barrier_kind == kMapWriteBarrier)
191 ? g.UseRegister(value) 191 ? g.UseRegister(value)
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 : g.UseRegister(length) 838 : g.UseRegister(length)
839 : g.UseRegister(length); 839 : g.UseRegister(length);
840 840
841 Emit(opcode | AddressingModeField::encode(kMode_MRI), 841 Emit(opcode | AddressingModeField::encode(kMode_MRI),
842 g.DefineAsRegister(node), offset_operand, length_operand, 842 g.DefineAsRegister(node), offset_operand, length_operand,
843 g.UseRegister(buffer)); 843 g.UseRegister(buffer));
844 } 844 }
845 845
846 846
847 void InstructionSelector::VisitCheckedStore(Node* node) { 847 void InstructionSelector::VisitCheckedStore(Node* node) {
848 MachineRepresentation rep = 848 MachineRepresentation rep = CheckedStoreRepresentationOf(node->op());
849 CheckedStoreRepresentationOf(node->op()).representation();
850 MipsOperandGenerator g(this); 849 MipsOperandGenerator g(this);
851 Node* const buffer = node->InputAt(0); 850 Node* const buffer = node->InputAt(0);
852 Node* const offset = node->InputAt(1); 851 Node* const offset = node->InputAt(1);
853 Node* const length = node->InputAt(2); 852 Node* const length = node->InputAt(2);
854 Node* const value = node->InputAt(3); 853 Node* const value = node->InputAt(3);
855 ArchOpcode opcode; 854 ArchOpcode opcode;
856 switch (rep) { 855 switch (rep) {
857 case MachineRepresentation::kWord8: 856 case MachineRepresentation::kWord8:
858 opcode = kCheckedStoreWord8; 857 opcode = kCheckedStoreWord8;
859 break; 858 break;
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 MachineOperatorBuilder::kFloat32Max | 1279 MachineOperatorBuilder::kFloat32Max |
1281 MachineOperatorBuilder::kFloat32RoundDown | 1280 MachineOperatorBuilder::kFloat32RoundDown |
1282 MachineOperatorBuilder::kFloat32RoundUp | 1281 MachineOperatorBuilder::kFloat32RoundUp |
1283 MachineOperatorBuilder::kFloat32RoundTruncate | 1282 MachineOperatorBuilder::kFloat32RoundTruncate |
1284 MachineOperatorBuilder::kFloat32RoundTiesEven; 1283 MachineOperatorBuilder::kFloat32RoundTiesEven;
1285 } 1284 }
1286 1285
1287 } // namespace compiler 1286 } // namespace compiler
1288 } // namespace internal 1287 } // namespace internal
1289 } // namespace v8 1288 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator-reducer.cc ('k') | src/compiler/mips64/instruction-selector-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698