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

Unified Diff: src/compiler/instruction-selector.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/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index 58a228b96eff4589ffcb986bbbc545eb18e99f56..7f6fbfd2be2d99981c5808552aa10256f6b14dd3 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -1462,16 +1462,20 @@ void InstructionSelector::VisitNode(Node* node) {
}
case IrOpcode::kAtomicStore:
return VisitAtomicStore(node);
- case IrOpcode::kAtomicExchange: {
- MachineType type = AtomicExchangeRepresentationOf(node->op());
- MarkAsRepresentation(type.representation(), node);
- return VisitAtomicExchange(node);
- }
- case IrOpcode::kAtomicCompareExchange: {
- MachineType type = AtomicCompareExchangeRepresentationOf(node->op());
- MarkAsRepresentation(type.representation(), node);
- return VisitAtomicCompareExchange(node);
- }
+#define ATOMIC_CASE(name) \
+ case IrOpcode::kAtomic##name: { \
+ MachineType type = AtomicOpRepresentationOf(node->op()); \
+ MarkAsRepresentation(type.representation(), node); \
+ return VisitAtomic##name(node); \
+ }
+ ATOMIC_CASE(Exchange)
+ ATOMIC_CASE(CompareExchange)
+ ATOMIC_CASE(Add)
+ ATOMIC_CASE(Sub)
+ ATOMIC_CASE(And)
+ ATOMIC_CASE(Or)
+ ATOMIC_CASE(Xor)
+#undef ATOMIC_CASE
case IrOpcode::kProtectedLoad: {
LoadRepresentation type = LoadRepresentationOf(node->op());
MarkAsRepresentation(type.representation(), node);

Powered by Google App Engine
This is Rietveld 408576698