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

Side by Side Diff: src/compiler/x64/instruction-selector-x64.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. 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "src/base/adapters.h" 7 #include "src/base/adapters.h"
8 #include "src/compiler/instruction-selector-impl.h" 8 #include "src/compiler/instruction-selector-impl.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 InstructionCode code = 258 InstructionCode code =
259 opcode | AddressingModeField::encode(addressing_mode); 259 opcode | AddressingModeField::encode(addressing_mode);
260 InstructionOperand value_operand = 260 InstructionOperand value_operand =
261 g.CanBeImmediate(value) ? g.UseImmediate(value) : g.UseRegister(value); 261 g.CanBeImmediate(value) ? g.UseImmediate(value) : g.UseRegister(value);
262 inputs[input_count++] = value_operand; 262 inputs[input_count++] = value_operand;
263 Emit(code, 0, static_cast<InstructionOperand*>(nullptr), input_count, 263 Emit(code, 0, static_cast<InstructionOperand*>(nullptr), input_count,
264 inputs); 264 inputs);
265 } 265 }
266 } 266 }
267 267
268 // Architecture supports unaligned access, therefore VisitLoad is used instead
269 void InstructionSelector::VisitUnalignedLoad(Node* node) { UNREACHABLE(); }
270
271 // Architecture supports unaligned access, therefore VisitStore is used instead
272 void InstructionSelector::VisitUnalignedStore(Node* node) { UNREACHABLE(); }
268 273
269 void InstructionSelector::VisitCheckedLoad(Node* node) { 274 void InstructionSelector::VisitCheckedLoad(Node* node) {
270 CheckedLoadRepresentation load_rep = CheckedLoadRepresentationOf(node->op()); 275 CheckedLoadRepresentation load_rep = CheckedLoadRepresentationOf(node->op());
271 X64OperandGenerator g(this); 276 X64OperandGenerator g(this);
272 Node* const buffer = node->InputAt(0); 277 Node* const buffer = node->InputAt(0);
273 Node* const offset = node->InputAt(1); 278 Node* const offset = node->InputAt(1);
274 Node* const length = node->InputAt(2); 279 Node* const length = node->InputAt(2);
275 ArchOpcode opcode = kArchNop; 280 ArchOpcode opcode = kArchNop;
276 switch (load_rep.representation()) { 281 switch (load_rep.representation()) {
277 case MachineRepresentation::kWord8: 282 case MachineRepresentation::kWord8:
(...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after
2048 MachineOperatorBuilder::kFloat64RoundTruncate | 2053 MachineOperatorBuilder::kFloat64RoundTruncate |
2049 MachineOperatorBuilder::kFloat32RoundTiesEven | 2054 MachineOperatorBuilder::kFloat32RoundTiesEven |
2050 MachineOperatorBuilder::kFloat64RoundTiesEven; 2055 MachineOperatorBuilder::kFloat64RoundTiesEven;
2051 } 2056 }
2052 return flags; 2057 return flags;
2053 } 2058 }
2054 2059
2055 } // namespace compiler 2060 } // namespace compiler
2056 } // namespace internal 2061 } // namespace internal
2057 } // namespace v8 2062 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698