]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
Extend TOK_OR() to work with up to 11 parameters
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 13 Oct 2016 13:31:08 +0000 (14:31 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 17 Oct 2016 09:26:06 +0000 (10:26 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
include/arch/x86/symbolic-const.h

index e8be085fa676468d32b580fd632a98ac70a77e05..ad7b97ffa7d5fa69c8f81e7aafcc63c2fd217fd6 100644 (file)
  * </pre>
  */
 /** @cond */
-#define TOK_OR0(t)         (0)
-#define TOK_OR1(t, x)      (t ## x)
-#define TOK_OR2(t, x, ...) (t ## x | TOK_OR1(t, ##__VA_ARGS__))
-#define TOK_OR3(t, x, ...) (t ## x | TOK_OR2(t, ##__VA_ARGS__))
-#define TOK_OR4(t, x, ...) (t ## x | TOK_OR3(t, ##__VA_ARGS__))
-#define TOK_OR5(t, x, ...) (t ## x | TOK_OR4(t, ##__VA_ARGS__))
-#define TOK_OR6(t, x, ...) (t ## x | TOK_OR5(t, ##__VA_ARGS__))
-#define TOK_OR7(t, x, ...) (t ## x | TOK_OR6(t, ##__VA_ARGS__))
-#define TOK_OR8(t, x, ...) (t ## x | TOK_OR7(t, ##__VA_ARGS__))
+#define TOK_OR0(t)          (0)
+#define TOK_OR1(t, x)       (t ## x)
+#define TOK_OR2(t, x, ...)  (t ## x | TOK_OR1(t, ##__VA_ARGS__))
+#define TOK_OR3(t, x, ...)  (t ## x | TOK_OR2(t, ##__VA_ARGS__))
+#define TOK_OR4(t, x, ...)  (t ## x | TOK_OR3(t, ##__VA_ARGS__))
+#define TOK_OR5(t, x, ...)  (t ## x | TOK_OR4(t, ##__VA_ARGS__))
+#define TOK_OR6(t, x, ...)  (t ## x | TOK_OR5(t, ##__VA_ARGS__))
+#define TOK_OR7(t, x, ...)  (t ## x | TOK_OR6(t, ##__VA_ARGS__))
+#define TOK_OR8(t, x, ...)  (t ## x | TOK_OR7(t, ##__VA_ARGS__))
+#define TOK_OR9(t, x, ...)  (t ## x | TOK_OR8(t, ##__VA_ARGS__))
+#define TOK_OR10(t, x, ...) (t ## x | TOK_OR9(t, ##__VA_ARGS__))
+#define TOK_OR11(t, x, ...) (t ## x | TOK_OR10(t, ##__VA_ARGS__))
 /** @endcond */
 #define TOK_OR(t, ...)     VAR_MACRO_C1(TOK_OR, t, ##__VA_ARGS__)