remove more unnecessary XXX_INVALID constants
[cparser] / builtins.c
index 56d47d6..4a4215d 100644 (file)
@@ -63,9 +63,17 @@ void create_gnu_builtins(void)
        GNU_BUILTIN(return_address, make_function_1_type(type_void_ptr, type_unsigned_int));
        GNU_BUILTIN(frame_address,  make_function_1_type(type_void_ptr, type_unsigned_int));
        GNU_BUILTIN(ffs,            make_function_1_type(type_int, type_unsigned_int));
+       GNU_BUILTIN(ffsl,           make_function_1_type(type_int, type_unsigned_long));
+       GNU_BUILTIN(ffsll,          make_function_1_type(type_int, type_unsigned_long_long));
        GNU_BUILTIN(clz,            make_function_1_type(type_int, type_unsigned_int));
+       GNU_BUILTIN(clzl,           make_function_1_type(type_int, type_unsigned_long));
+       GNU_BUILTIN(clzll,          make_function_1_type(type_int, type_unsigned_long_long));
        GNU_BUILTIN(ctz,            make_function_1_type(type_int, type_unsigned_int));
+       GNU_BUILTIN(ctzl,           make_function_1_type(type_int, type_unsigned_long));
+       GNU_BUILTIN(ctzll,          make_function_1_type(type_int, type_unsigned_long_long));
        GNU_BUILTIN(popcount,       make_function_1_type(type_int, type_unsigned_int));
+       GNU_BUILTIN(popcountl,      make_function_1_type(type_int, type_unsigned_long));
+       GNU_BUILTIN(popcountll,     make_function_1_type(type_int, type_unsigned_long_long));
        GNU_BUILTIN(parity,         make_function_1_type(type_int, type_unsigned_int));
        GNU_BUILTIN(prefetch,       make_function_1_type_variadic(type_float, type_void_ptr));
        GNU_BUILTIN(trap,           make_function_type(type_void, 0, NULL, DM_NORETURN));
@@ -218,14 +226,5 @@ void create_microsoft_intrinsics(void)
        MS_BUILTIN(_BitScanReverse,        make_function_2_type(type_unsigned_char, type_unsigned_long_ptr, type_unsigned_long));
        MS_BUILTIN(_InterlockedExchange,   make_function_2_type(type_long, type_long_ptr, type_long));
        MS_BUILTIN(_InterlockedExchange64, make_function_2_type(type_int64, type_int64_ptr, type_int64));
-
-       if (machine_size <= 32) {
-               MS_BUILTIN(__readeflags,           make_function_0_type(type_unsigned_int));
-               MS_BUILTIN(__writeeflags,          make_function_1_type(type_void, type_unsigned_int));
-       } else {
-               MS_BUILTIN(__readeflags,           make_function_0_type(type_unsigned_int64));
-               MS_BUILTIN(__writeeflags,          make_function_1_type(type_void, type_unsigned_int64));
-       }
-
 #undef MS_BUILTIN
 }