Index: crosstest/test_bitmanip.def |
diff --git a/crosstest/test_bitmanip.def b/crosstest/test_bitmanip.def |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b164ab7088472a687368d185d7a2118588c4ed3e |
--- /dev/null |
+++ b/crosstest/test_bitmanip.def |
@@ -0,0 +1,42 @@ |
+//===- subzero/crosstest/test_bitmanip.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 bit manipulation intrinsics. |
+// |
+//===----------------------------------------------------------------------===// |
+ |
+#ifndef TEST_BIT_MANIP_DEF |
+#define TEST_BIT_MANIP_DEF |
+ |
+#define STR(s) #s |
+ |
+#define BMI_OPS \ |
+ /* inst */ \ |
+ X(ctlz) \ |
+ X(cttz) \ |
+ X(ctpop) |
+// #define X(inst) |
+ |
+#define BMI_TYPES \ |
+ /* type */ \ |
+ X(uint32_t) \ |
+ X(uint64_t) |
+// #define X(type) |
+ |
+#define FOR_ALL_BMI_TYPES_INST(F, inst) \ |
+ F(inst, uint32_t) \ |
+ F(inst, uint64_t) |
+ |
+#define FOR_ALL_BMI_OP_TYPES(X) \ |
+ FOR_ALL_BMI_TYPES_INST(X, ctlz) \ |
+ FOR_ALL_BMI_TYPES_INST(X, cttz) \ |
+ FOR_ALL_BMI_TYPES_INST(X, ctpop) |
+//#define X(inst, type) |
+ |
+#endif // TEST_BIT_MANIP_DEF |