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

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

Issue 1524063002: X87: [turbofan] Store nodes use only MachineRepresentation, not MachineType. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 Emit(code, 1, outputs, input_count, inputs); 167 Emit(code, 1, outputs, input_count, inputs);
168 } 168 }
169 169
170 170
171 void InstructionSelector::VisitStore(Node* node) { 171 void InstructionSelector::VisitStore(Node* node) {
172 X87OperandGenerator g(this); 172 X87OperandGenerator g(this);
173 Node* base = node->InputAt(0); 173 Node* base = node->InputAt(0);
174 Node* index = node->InputAt(1); 174 Node* index = node->InputAt(1);
175 Node* value = node->InputAt(2); 175 Node* value = node->InputAt(2);
176 176
177 StoreRepresentation store_rep = OpParameter<StoreRepresentation>(node); 177 StoreRepresentation store_rep = StoreRepresentationOf(node->op());
178 WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind(); 178 WriteBarrierKind write_barrier_kind = store_rep.write_barrier_kind();
179 MachineRepresentation rep = store_rep.machine_type().representation(); 179 MachineRepresentation rep = store_rep.representation();
180 180
181 if (write_barrier_kind != kNoWriteBarrier) { 181 if (write_barrier_kind != kNoWriteBarrier) {
182 DCHECK_EQ(MachineRepresentation::kTagged, rep); 182 DCHECK_EQ(MachineRepresentation::kTagged, rep);
183 AddressingMode addressing_mode; 183 AddressingMode addressing_mode;
184 InstructionOperand inputs[3]; 184 InstructionOperand inputs[3];
185 size_t input_count = 0; 185 size_t input_count = 0;
186 inputs[input_count++] = g.UseUniqueRegister(base); 186 inputs[input_count++] = g.UseUniqueRegister(base);
187 if (g.CanBeImmediate(index)) { 187 if (g.CanBeImmediate(index)) {
188 inputs[input_count++] = g.UseImmediate(index); 188 inputs[input_count++] = g.UseImmediate(index);
189 addressing_mode = kMode_MRI; 189 addressing_mode = kMode_MRI;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 offset_operand, g.UseImmediate(buffer)); 298 offset_operand, g.UseImmediate(buffer));
299 } else { 299 } else {
300 Emit(opcode | AddressingModeField::encode(kMode_MR1), 300 Emit(opcode | AddressingModeField::encode(kMode_MR1),
301 g.DefineAsRegister(node), offset_operand, length_operand, 301 g.DefineAsRegister(node), offset_operand, length_operand,
302 g.UseRegister(buffer), offset_operand); 302 g.UseRegister(buffer), offset_operand);
303 } 303 }
304 } 304 }
305 305
306 306
307 void InstructionSelector::VisitCheckedStore(Node* node) { 307 void InstructionSelector::VisitCheckedStore(Node* node) {
308 MachineRepresentation rep = 308 MachineRepresentation rep = CheckedStoreRepresentationOf(node->op());
309 CheckedStoreRepresentationOf(node->op()).representation();
310 X87OperandGenerator g(this); 309 X87OperandGenerator g(this);
311 Node* const buffer = node->InputAt(0); 310 Node* const buffer = node->InputAt(0);
312 Node* const offset = node->InputAt(1); 311 Node* const offset = node->InputAt(1);
313 Node* const length = node->InputAt(2); 312 Node* const length = node->InputAt(2);
314 Node* const value = node->InputAt(3); 313 Node* const value = node->InputAt(3);
315 ArchOpcode opcode; 314 ArchOpcode opcode;
316 switch (rep) { 315 switch (rep) {
317 case MachineRepresentation::kWord8: 316 case MachineRepresentation::kWord8:
318 opcode = kCheckedStoreWord8; 317 opcode = kCheckedStoreWord8;
319 break; 318 break;
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 MachineOperatorBuilder::kFloat32RoundTruncate | 1326 MachineOperatorBuilder::kFloat32RoundTruncate |
1328 MachineOperatorBuilder::kFloat64RoundTruncate | 1327 MachineOperatorBuilder::kFloat64RoundTruncate |
1329 MachineOperatorBuilder::kFloat32RoundTiesEven | 1328 MachineOperatorBuilder::kFloat32RoundTiesEven |
1330 MachineOperatorBuilder::kFloat64RoundTiesEven; 1329 MachineOperatorBuilder::kFloat64RoundTiesEven;
1331 return flags; 1330 return flags;
1332 } 1331 }
1333 1332
1334 } // namespace compiler 1333 } // namespace compiler
1335 } // namespace internal 1334 } // namespace internal
1336 } // namespace v8 1335 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698