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

Side by Side Diff: src/compiler/machine-operator.cc

Issue 1928513002: Implement UnalignedLoad and UnalignedStore in WASM using LoadByte/Shift/Or and StoreByte/Shift/And. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Renamed UnalignedAccessConfig to AlignmentRequirements Created 4 years, 7 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/machine-operator.h" 5 #include "src/compiler/machine-operator.h"
6 6
7 #include "src/base/lazy-instance.h" 7 #include "src/base/lazy-instance.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 10
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 }; \ 523 }; \
524 AtomicStore##Type##Operator kAtomicStore##Type; 524 AtomicStore##Type##Operator kAtomicStore##Type;
525 ATOMIC_REPRESENTATION_LIST(ATOMIC_STORE) 525 ATOMIC_REPRESENTATION_LIST(ATOMIC_STORE)
526 #undef STORE 526 #undef STORE
527 }; 527 };
528 528
529 529
530 static base::LazyInstance<MachineOperatorGlobalCache>::type kCache = 530 static base::LazyInstance<MachineOperatorGlobalCache>::type kCache =
531 LAZY_INSTANCE_INITIALIZER; 531 LAZY_INSTANCE_INITIALIZER;
532 532
533 533 MachineOperatorBuilder::MachineOperatorBuilder(
534 MachineOperatorBuilder::MachineOperatorBuilder(Zone* zone, 534 Zone* zone, MachineRepresentation word, Flags flags,
535 MachineRepresentation word, 535 AlignmentRequirements alignmentConfig)
Jarin 2016/05/12 04:26:13 Style nit: alignmentConfig -> alignment_config (he
536 Flags flags) 536 : cache_(kCache.Get()),
537 : cache_(kCache.Get()), word_(word), flags_(flags) { 537 word_(word),
538 flags_(flags),
539 alignmentConfig_(alignmentConfig) {
538 DCHECK(word == MachineRepresentation::kWord32 || 540 DCHECK(word == MachineRepresentation::kWord32 ||
539 word == MachineRepresentation::kWord64); 541 word == MachineRepresentation::kWord64);
540 } 542 }
541 543
542 544
543 #define PURE(Name, properties, value_input_count, control_input_count, \ 545 #define PURE(Name, properties, value_input_count, control_input_count, \
544 output_count) \ 546 output_count) \
545 const Operator* MachineOperatorBuilder::Name() { return &cache_.k##Name; } 547 const Operator* MachineOperatorBuilder::Name() { return &cache_.k##Name; }
546 PURE_OP_LIST(PURE) 548 PURE_OP_LIST(PURE)
547 #undef PURE 549 #undef PURE
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } 666 }
665 ATOMIC_REPRESENTATION_LIST(STORE) 667 ATOMIC_REPRESENTATION_LIST(STORE)
666 #undef STORE 668 #undef STORE
667 UNREACHABLE(); 669 UNREACHABLE();
668 return nullptr; 670 return nullptr;
669 } 671 }
670 672
671 } // namespace compiler 673 } // namespace compiler
672 } // namespace internal 674 } // namespace internal
673 } // namespace v8 675 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698