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

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

Issue 2623633003: [Atomics] Make Atomics.exchange a builtin using TF (Closed)
Patch Set: remove 0 extend for arm Created 3 years, 9 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_
6 #define V8_COMPILER_MACHINE_OPERATOR_H_ 6 #define V8_COMPILER_MACHINE_OPERATOR_H_
7 7
8 #include "src/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/base/flags.h" 9 #include "src/base/flags.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 // A CheckedStore needs a MachineType. 91 // A CheckedStore needs a MachineType.
92 typedef MachineRepresentation CheckedStoreRepresentation; 92 typedef MachineRepresentation CheckedStoreRepresentation;
93 93
94 CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const*); 94 CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const*);
95 95
96 int StackSlotSizeOf(Operator const* op); 96 int StackSlotSizeOf(Operator const* op);
97 97
98 MachineRepresentation AtomicStoreRepresentationOf(Operator const* op); 98 MachineRepresentation AtomicStoreRepresentationOf(Operator const* op);
99 99
100 MachineType AtomicExchangeRepresentationOf(Operator const* op);
101
100 // Interface for building machine-level operators. These operators are 102 // Interface for building machine-level operators. These operators are
101 // machine-level but machine-independent and thus define a language suitable 103 // machine-level but machine-independent and thus define a language suitable
102 // for generating code to run on architectures such as ia32, x64, arm, etc. 104 // for generating code to run on architectures such as ia32, x64, arm, etc.
103 class V8_EXPORT_PRIVATE MachineOperatorBuilder final 105 class V8_EXPORT_PRIVATE MachineOperatorBuilder final
104 : public NON_EXPORTED_BASE(ZoneObject) { 106 : public NON_EXPORTED_BASE(ZoneObject) {
105 public: 107 public:
106 // Flags that specify which operations are available. This is useful 108 // Flags that specify which operations are available. This is useful
107 // for operations that are unsupported by some back-ends. 109 // for operations that are unsupported by some back-ends.
108 enum Flag : unsigned { 110 enum Flag : unsigned {
109 kNoFlags = 0u, 111 kNoFlags = 0u,
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 613
612 // checked-load heap, index, length 614 // checked-load heap, index, length
613 const Operator* CheckedLoad(CheckedLoadRepresentation); 615 const Operator* CheckedLoad(CheckedLoadRepresentation);
614 // checked-store heap, index, length, value 616 // checked-store heap, index, length, value
615 const Operator* CheckedStore(CheckedStoreRepresentation); 617 const Operator* CheckedStore(CheckedStoreRepresentation);
616 618
617 // atomic-load [base + index] 619 // atomic-load [base + index]
618 const Operator* AtomicLoad(LoadRepresentation rep); 620 const Operator* AtomicLoad(LoadRepresentation rep);
619 // atomic-store [base + index], value 621 // atomic-store [base + index], value
620 const Operator* AtomicStore(MachineRepresentation rep); 622 const Operator* AtomicStore(MachineRepresentation rep);
623 // atomic-exchange [base + index], value
624 const Operator* AtomicExchange(MachineType rep);
621 625
622 // Target machine word-size assumed by this builder. 626 // Target machine word-size assumed by this builder.
623 bool Is32() const { return word() == MachineRepresentation::kWord32; } 627 bool Is32() const { return word() == MachineRepresentation::kWord32; }
624 bool Is64() const { return word() == MachineRepresentation::kWord64; } 628 bool Is64() const { return word() == MachineRepresentation::kWord64; }
625 MachineRepresentation word() const { return word_; } 629 MachineRepresentation word() const { return word_; }
626 630
627 bool UnalignedLoadSupported(const MachineType& machineType, 631 bool UnalignedLoadSupported(const MachineType& machineType,
628 uint8_t alignment) { 632 uint8_t alignment) {
629 return alignment_requirements_.IsUnalignedLoadSupported(machineType, 633 return alignment_requirements_.IsUnalignedLoadSupported(machineType,
630 alignment); 634 alignment);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 }; 681 };
678 682
679 683
680 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) 684 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags)
681 685
682 } // namespace compiler 686 } // namespace compiler
683 } // namespace internal 687 } // namespace internal
684 } // namespace v8 688 } // namespace v8
685 689
686 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ 690 #endif // V8_COMPILER_MACHINE_OPERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698