Chromium Code Reviews

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

Issue 1779713009: Implement optional turbofan UnalignedLoad and UnalignedStore operators (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Unaligned access simulate using load/shift/or and store/shift/and Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 311 matching lines...)
322 AddressingMode addressing_mode = 322 AddressingMode addressing_mode =
323 g.GetEffectiveAddressMemoryOperand(node, inputs, &input_count); 323 g.GetEffectiveAddressMemoryOperand(node, inputs, &input_count);
324 InstructionCode code = 324 InstructionCode code =
325 opcode | AddressingModeField::encode(addressing_mode); 325 opcode | AddressingModeField::encode(addressing_mode);
326 inputs[input_count++] = val; 326 inputs[input_count++] = val;
327 Emit(code, 0, static_cast<InstructionOperand*>(nullptr), input_count, 327 Emit(code, 0, static_cast<InstructionOperand*>(nullptr), input_count,
328 inputs); 328 inputs);
329 } 329 }
330 } 330 }
331 331
332 // Architecture supports unaligned access, therefore VisitLoad is used instead
333 void InstructionSelector::VisitUnalignedLoad(Node* node) { UNREACHABLE(); }
334
335 // Architecture supports unaligned access, therefore VisitStore is used instead
336 void InstructionSelector::VisitUnalignedStore(Node* node) { UNREACHABLE(); }
332 337
333 void InstructionSelector::VisitCheckedLoad(Node* node) { 338 void InstructionSelector::VisitCheckedLoad(Node* node) {
334 CheckedLoadRepresentation load_rep = CheckedLoadRepresentationOf(node->op()); 339 CheckedLoadRepresentation load_rep = CheckedLoadRepresentationOf(node->op());
335 IA32OperandGenerator g(this); 340 IA32OperandGenerator g(this);
336 Node* const buffer = node->InputAt(0); 341 Node* const buffer = node->InputAt(0);
337 Node* const offset = node->InputAt(1); 342 Node* const offset = node->InputAt(1);
338 Node* const length = node->InputAt(2); 343 Node* const length = node->InputAt(2);
339 ArchOpcode opcode = kArchNop; 344 ArchOpcode opcode = kArchNop;
340 switch (load_rep.representation()) { 345 switch (load_rep.representation()) {
341 case MachineRepresentation::kWord8: 346 case MachineRepresentation::kWord8:
(...skipping 1246 matching lines...)
1588 MachineOperatorBuilder::kFloat64RoundTruncate | 1593 MachineOperatorBuilder::kFloat64RoundTruncate |
1589 MachineOperatorBuilder::kFloat32RoundTiesEven | 1594 MachineOperatorBuilder::kFloat32RoundTiesEven |
1590 MachineOperatorBuilder::kFloat64RoundTiesEven; 1595 MachineOperatorBuilder::kFloat64RoundTiesEven;
1591 } 1596 }
1592 return flags; 1597 return flags;
1593 } 1598 }
1594 1599
1595 } // namespace compiler 1600 } // namespace compiler
1596 } // namespace internal 1601 } // namespace internal
1597 } // namespace v8 1602 } // namespace v8
OLDNEW

Powered by Google App Engine