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

Unified Diff: crosstest/test_sync_atomic.def

Issue 362463002: Subzero: lower the rest of the atomic operations. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: rebase Created 6 years, 5 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
« no previous file with comments | « crosstest/test_sync_atomic.cpp ('k') | crosstest/test_sync_atomic_main.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crosstest/test_sync_atomic.def
diff --git a/crosstest/test_sync_atomic.def b/crosstest/test_sync_atomic.def
new file mode 100644
index 0000000000000000000000000000000000000000..f84afded9b452af7dda362a61589af6d9e3487e3
--- /dev/null
+++ b/crosstest/test_sync_atomic.def
@@ -0,0 +1,50 @@
+//===- subzero/crosstest/test_sync_atomic.def - macros for tests -*- C++ -*-===//
+//
+// The Subzero Code Generator
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines macros for testing atomic intrinsics (via sync builtins).
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef TEST_SYNC_ATOMIC_DEF
+#define TEST_SYNC_ATOMIC_DEF
+
+#define STR(s) #s
+
+#define RMWOP_TABLE \
+ /* inst */ \
+ X(add) \
+ X(sub) \
+ X(or) \
+ X(and) \
+ X(xor)
+//#define X(inst)
+
+#define ATOMIC_TYPE_TABLE \
+ /* type */ \
+ X(uint8_t) \
+ X(uint16_t) \
+ X(uint32_t) \
+ X(uint64_t)
+//#define X(type)
+
+#define FOR_ALL_RMWTYPES_INST(F, inst) \
+ F(inst, uint8_t) \
+ F(inst, uint16_t) \
+ F(inst, uint32_t) \
+ F(inst, uint64_t)
+
+#define FOR_ALL_RMWOP_TYPES(X) \
+ FOR_ALL_RMWTYPES_INST(X, add) \
+ FOR_ALL_RMWTYPES_INST(X, sub) \
+ FOR_ALL_RMWTYPES_INST(X, or) \
+ FOR_ALL_RMWTYPES_INST(X, and) \
+ FOR_ALL_RMWTYPES_INST(X, xor)
+//#define X(inst, type)
+
+#endif // TEST_SYNC_ATOMIC_DEF
« no previous file with comments | « crosstest/test_sync_atomic.cpp ('k') | crosstest/test_sync_atomic_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698