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

Unified Diff: src/compiler/code-assembler.cc

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/code-assembler.cc
diff --git a/src/compiler/code-assembler.cc b/src/compiler/code-assembler.cc
index 60e0c6f9b76e3473d6ca16363089d09ffc6f0584..1bde4c6a4c3ee2da3949ba3dc1f258eb303ab193 100644
--- a/src/compiler/code-assembler.cc
+++ b/src/compiler/code-assembler.cc
@@ -516,10 +516,18 @@ Node* CodeAssembler::AtomicStore(MachineRepresentation rep, Node* base,
return raw_assembler()->AtomicStore(rep, base, offset, value);
}
-Node* CodeAssembler::AtomicExchange(MachineType type, Node* base, Node* offset,
- Node* value) {
- return raw_assembler()->AtomicExchange(type, base, offset, value);
-}
+#define ATOMIC_FUNCTION(name) \
+ Node* CodeAssembler::Atomic##name(MachineType type, Node* base, \
+ Node* offset, Node* value) { \
+ return raw_assembler()->Atomic##name(type, base, offset, value); \
+ }
+ATOMIC_FUNCTION(Exchange);
+ATOMIC_FUNCTION(Add);
+ATOMIC_FUNCTION(Sub);
+ATOMIC_FUNCTION(And);
+ATOMIC_FUNCTION(Or);
+ATOMIC_FUNCTION(Xor);
+#undef ATOMIC_FUNCTION
Node* CodeAssembler::AtomicCompareExchange(MachineType type, Node* base,
Node* offset, Node* old_value,

Powered by Google App Engine
This is Rietveld 408576698