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

Side by Side Diff: src/compiler/raw-machine-assembler.h

Issue 2799863002: [Atomics] use TFJ builtins for atomic add, sub, and, or, and xor (Closed)
Patch Set: [Atomics] use TFJ builtins for atomic add, sub, and, or, and xor Created 3 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 #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
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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 bool deferred_; 876 bool deferred_;
870 friend class RawMachineAssembler; 877 friend class RawMachineAssembler;
871 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel); 878 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel);
872 }; 879 };
873 880
874 } // namespace compiler 881 } // namespace compiler
875 } // namespace internal 882 } // namespace internal
876 } // namespace v8 883 } // namespace v8
877 884
878 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 885 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698