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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/raw-machine-assembler.h
diff --git a/src/compiler/raw-machine-assembler.h b/src/compiler/raw-machine-assembler.h
index 533945cfa27aa5d557204175ed03036e0d3dc70a..19a0f3bfd4e23b8cd6858e88efe1c822a66f9f54 100644
--- a/src/compiler/raw-machine-assembler.h
+++ b/src/compiler/raw-machine-assembler.h
@@ -174,10 +174,17 @@ class V8_EXPORT_PRIVATE RawMachineAssembler {
Node* value) {
return AddNode(machine()->AtomicStore(rep), base, index, value);
}
-
- Node* AtomicExchange(MachineType rep, Node* base, Node* index, Node* value) {
- return AddNode(machine()->AtomicExchange(rep), base, index, value);
- }
+#define ATOMIC_FUNCTION(name) \
+ Node* Atomic##name(MachineType rep, Node* base, Node* index, Node* value) { \
+ return AddNode(machine()->Atomic##name(rep), base, index, value); \
+ }
+ ATOMIC_FUNCTION(Exchange);
+ ATOMIC_FUNCTION(Add);
+ ATOMIC_FUNCTION(Sub);
+ ATOMIC_FUNCTION(And);
+ ATOMIC_FUNCTION(Or);
+ ATOMIC_FUNCTION(Xor);
+#undef ATOMIC_FUNCTION
Node* AtomicCompareExchange(MachineType rep, Node* base, Node* index,
Node* old_value, Node* new_value) {

Powered by Google App Engine
This is Rietveld 408576698