OLD | NEW |
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 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 167 } |
168 | 168 |
169 // Atomic memory operations. | 169 // Atomic memory operations. |
170 Node* AtomicLoad(MachineType rep, Node* base, Node* index) { | 170 Node* AtomicLoad(MachineType rep, Node* base, Node* index) { |
171 return AddNode(machine()->AtomicLoad(rep), base, index); | 171 return AddNode(machine()->AtomicLoad(rep), base, index); |
172 } | 172 } |
173 Node* AtomicStore(MachineRepresentation rep, Node* base, Node* index, | 173 Node* AtomicStore(MachineRepresentation rep, Node* base, Node* index, |
174 Node* value) { | 174 Node* value) { |
175 return AddNode(machine()->AtomicStore(rep), base, index, value); | 175 return AddNode(machine()->AtomicStore(rep), base, index, value); |
176 } | 176 } |
177 | 177 #define ATOMIC_FUNCTION(name) \ |
178 Node* AtomicExchange(MachineType rep, Node* base, Node* index, Node* value) { | 178 Node* Atomic##name(MachineType rep, Node* base, Node* index, Node* value) { \ |
179 return AddNode(machine()->AtomicExchange(rep), base, index, value); | 179 return AddNode(machine()->Atomic##name(rep), base, index, value); \ |
180 } | 180 } |
| 181 ATOMIC_FUNCTION(Exchange); |
| 182 ATOMIC_FUNCTION(Add); |
| 183 ATOMIC_FUNCTION(Sub); |
| 184 ATOMIC_FUNCTION(And); |
| 185 ATOMIC_FUNCTION(Or); |
| 186 ATOMIC_FUNCTION(Xor); |
| 187 #undef ATOMIC_FUNCTION |
181 | 188 |
182 Node* AtomicCompareExchange(MachineType rep, Node* base, Node* index, | 189 Node* AtomicCompareExchange(MachineType rep, Node* base, Node* index, |
183 Node* old_value, Node* new_value) { | 190 Node* old_value, Node* new_value) { |
184 return AddNode(machine()->AtomicCompareExchange(rep), base, index, | 191 return AddNode(machine()->AtomicCompareExchange(rep), base, index, |
185 old_value, new_value); | 192 old_value, new_value); |
186 } | 193 } |
187 | 194 |
188 // Arithmetic Operations. | 195 // Arithmetic Operations. |
189 Node* WordAnd(Node* a, Node* b) { | 196 Node* WordAnd(Node* a, Node* b) { |
190 return AddNode(machine()->WordAnd(), a, b); | 197 return AddNode(machine()->WordAnd(), a, b); |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 bool deferred_; | 884 bool deferred_; |
878 friend class RawMachineAssembler; | 885 friend class RawMachineAssembler; |
879 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel); | 886 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel); |
880 }; | 887 }; |
881 | 888 |
882 } // namespace compiler | 889 } // namespace compiler |
883 } // namespace internal | 890 } // namespace internal |
884 } // namespace v8 | 891 } // namespace v8 |
885 | 892 |
886 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 893 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
OLD | NEW |