Index: src/prelude/builtins.c
===================================================================
--- src/prelude/builtins.c	(revision dc99f38e2db7b4d28474d2e58f743e394a268368)
+++ src/prelude/builtins.c	(revision 0c82fec48a07c0a2b6d255c6384141d7fec74492)
@@ -3,4 +3,5 @@
 #define BT_LAST(NAME) FUNC_SIMPLE(void, NAME)
 
+#define BT_BOOL _Bool
 #define BT_UINTMAX unsigned long int
 #define BT_UINT16 short int
@@ -22,17 +23,27 @@
 #define BT_LONGLONG long long
 #define BT_LONG long
-#define BT_DFLOAT32 _Decimal32
-#define BT_DFLOAT64 _Decimal64
-#define BT_DFLOAT128 _Decimal128
+#define BT_DFLOAT32 __Unsupported
+#define BT_DFLOAT64 __Unsupported
+#define BT_DFLOAT128 __Unsupported
 #define BT_DOUBLEPTR double *
 #define BT_DOUBLE double
 #define BT_FLOATPTR float *
+#define BT_FLOAT128X __Unsupported
+#define BT_FLOAT128 __Unsupported
+#define BT_FLOAT64X __Unsupported
+#define BT_FLOAT64 __Unsupported
+#define BT_FLOAT32X __Unsupported
+#define BT_FLOAT32 __Unsupported
+#define BT_FLOAT16 __Unsupported
 #define BT_FLOAT float
+#define BT_CONST_VPTR const volatile void *
 #define BT_CONST_PTR const void *
 #define BT_CONST_STRING const char *
+#define BT_CONST_TM_PTR const struct tm *
 #define BT_PTR_FN_VOID_VAR_PTR_SIZE 
 #define BT_PTR_CONST_STRING char *const
 #define BT_PTRMODE_PTR 
 #define BT_PTRPTR void **
+#define BT_VPTR volatile void *
 #define BT_PTR void *
 #define BT_VOID void
@@ -47,169 +58,225 @@
 #define BT_SSIZE long int
 #define BT_PID int
-
-#define BT_FN_COMPLEX_LONGDOUBLE_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_COMPLEX_LONGDOUBLE, NAME, BT_LONGDOUBLE)
-#define BT_FN_INT_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_VALIST_ARG)
-#define BT_FN_VOID_PTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_PTR)
-#define BT_FN_INT_CONST_PTR_CONST_PTR_SIZE(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_PTR, BT_CONST_PTR, BT_SIZE)
-#define BT_FN_VOID_VALIST_REF(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VALIST_REF)
-#define BT_FN_FLOAT_COMPLEX_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_COMPLEX_FLOAT)
-#define BT_FN_INT_STRING_SIZE_INT_SIZE_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_SIZE, BT_INT, BT_SIZE, BT_CONST_STRING, BT_VAR)
-#define BT_FN_VOID_PTR_PTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_PTR, BT_PTR)
-#define BT_FN_FLOAT_FLOAT_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_LONGDOUBLE)
-#define BT_FN_INT_UINT(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_UINT)
-#define BT_FN_CONST_STRING(NAME) FUNC_SIMPLE(BT_CONST_STRING, NAME)
-#define BT_FN_FLOAT_FLOAT_FLOATPTR(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_FLOATPTR)
+#define BT_I16 __int128
+#define BT_I8 long long int
+#define BT_I4 int
+#define BT_I2 short
+#define BT_I1 char
+
 #define BT_FN_INT_INT_INT_INT_INT_INT_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_INT, BT_INT, BT_INT, BT_INT, BT_INT, BT_VAR)
-#define BT_FN_INT_INT(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_INT)
-#define BT_FN_INT_FILEPTR_INT_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_FILEPTR, BT_INT, BT_CONST_STRING, BT_VALIST_ARG)
 #define BT_FN_INT_LONG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_LONG)
-#define BT_FN_INT_STRING_SIZE_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_SIZE, BT_CONST_STRING, BT_VAR)
-#define BT_FN_VOID_PTR_WORD_WORD_PTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_PTR, BT_WORD, BT_WORD, BT_PTR)
 #define BT_FN_SIZE_STRING_SIZE_CONST_STRING_CONST_PTR(NAME) FUNC_SIMPLE(BT_SIZE, NAME, BT_STRING, BT_SIZE, BT_CONST_STRING, BT_CONST_PTR)
-#define BT_FN_INT_DFLOAT128(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_DFLOAT128)
-#define BT_FN_DOUBLE_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE)
-#define BT_FN_FLOAT_CONST_STRING(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_CONST_STRING)
-#define BT_FN_LONGDOUBLE_LONGDOUBLE_INT(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_INT)
-#define BT_FN_FLOAT_FLOAT_INT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_INT)
-#define BT_FN_INT_CONST_STRING_CONST_STRING(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_CONST_STRING)
-#define BT_FN_INT_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_LONGDOUBLE)
-#define BT_FN_SIZE_CONST_STRING_CONST_STRING(NAME) FUNC_SIMPLE(BT_SIZE, NAME, BT_CONST_STRING, BT_CONST_STRING)
+#define BT_FN_VOID_VPTR_I4_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VPTR, BT_I4, BT_INT)
+#define BT_FN_I1_VPTR_I1_INT(NAME) FUNC_SIMPLE(BT_I1, NAME, BT_VPTR, BT_I1, BT_INT)
+#define BT_FN_INT(NAME) FUNC_SIMPLE(BT_INT, NAME)
+#define BT_FN_STRING_CONST_STRING_CONST_STRING(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_CONST_STRING, BT_CONST_STRING)
+#define BT_FN_PTR_CONST_PTR_SIZE_VAR(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_CONST_PTR, BT_SIZE, BT_VAR)
+#define BT_FN_INT_ULONGLONG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_ULONGLONG)
+#define BT_FN_INT_CONST_STRING_CONST_STRING_SIZE(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_CONST_STRING, BT_SIZE)
+#define BT_FN_INT_CONST_STRING_PTR_CONST_STRING_PTR_CONST_STRING(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_PTR_CONST_STRING, BT_PTR_CONST_STRING)
+#define BT_FN_STRING_STRING_CONST_STRING_SIZE(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_STRING, BT_CONST_STRING, BT_SIZE)
 #define BT_FN_VOID_PTR_SIZE(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_PTR, BT_SIZE)
-#define BT_FN_INT_CONST_STRING_PTR_CONST_STRING(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_PTR_CONST_STRING)
-#define BT_FN_DFLOAT64(NAME) FUNC_SIMPLE(BT_DFLOAT64, NAME)
-#define BT_FN_INT_UINTMAX(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_UINTMAX)
-#define BT_FN_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME)
-#define BT_FN_INT(NAME) FUNC_SIMPLE(BT_INT, NAME)
-#define BT_FN_FLOAT_FLOAT_FLOAT_INTPTR(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_FLOAT, BT_INTPTR)
-#define BT_FN_DOUBLE_DOUBLE_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_LONGDOUBLE)
-#define BT_FN_PTR_CONST_PTR_SIZE_VAR(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_CONST_PTR, BT_SIZE, BT_VAR)
-#define BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT_COMPLEX_FLOAT(NAME) FUNC_SIMPLE(BT_COMPLEX_FLOAT, NAME, BT_COMPLEX_FLOAT, BT_COMPLEX_FLOAT)
-#define BT_FN_LONGDOUBLE_COMPLEX_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_COMPLEX_LONGDOUBLE)
-#define BT_FN_STRING_CONST_STRING_CONST_STRING_INT(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_CONST_STRING, BT_CONST_STRING, BT_INT)
-#define BT_FN_LONGDOUBLE_LONGDOUBLE_LONG(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_LONG)
-#define BT_FN_COMPLEX_DOUBLE_DOUBLE(NAME) FUNC_SIMPLE(BT_COMPLEX_DOUBLE, NAME, BT_DOUBLE)
-#define BT_FN_VOID(NAME) FUNC_SIMPLE(BT_VOID, NAME)
-#define BT_FN_FLOAT_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT)
-#define BT_FN_INT_FILEPTR_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_FILEPTR, BT_CONST_STRING, BT_VALIST_ARG)
-#define BT_FN_VOID_FLOAT_FLOATPTR_FLOATPTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_FLOAT, BT_FLOATPTR, BT_FLOATPTR)
-#define BT_FN_INT_DFLOAT64(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_DFLOAT64)
-#define BT_FN_FLOAT_FLOAT_INTPTR(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_INTPTR)
-#define BT_FN_WINT_WINT(NAME) FUNC_SIMPLE(BT_WINT, NAME, BT_WINT)
-#define BT_FN_LONGLONG_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGLONG, NAME, BT_LONGDOUBLE)
-#define BT_FN_DOUBLE_DOUBLE_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_DOUBLE)
-#define BT_FN_DFLOAT64_CONST_STRING(NAME) FUNC_SIMPLE(BT_DFLOAT64, NAME, BT_CONST_STRING)
-#define BT_FN_DOUBLE_DOUBLE_INT(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_INT)
 #define BT_FN_INTMAX_INTMAX(NAME) FUNC_SIMPLE(BT_INTMAX, NAME, BT_INTMAX)
-#define BT_FN_INT_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_VAR)
-#define BT_FN_LONG_LONG_LONG(NAME) FUNC_SIMPLE(BT_LONG, NAME, BT_LONG, BT_LONG)
-#define BT_FN_DOUBLE_DOUBLE_LONG(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_LONG)
-#define BT_FN_LONG_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONG, NAME, BT_LONGDOUBLE)
-#define BT_FN_FLOAT_FLOAT_FLOAT_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_FLOAT, BT_FLOAT)
-#define BT_FN_VOID_VALIST_REF_VAR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VALIST_REF, BT_VAR)
-#define BT_FN_STRING_CONST_STRING(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_CONST_STRING)
+#define BT_FN_SIZE_CONST_PTR_SIZE_SIZE_FILEPTR(NAME) FUNC_SIMPLE(BT_SIZE, NAME, BT_CONST_PTR, BT_SIZE, BT_SIZE, BT_FILEPTR)
+#define BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR, BT_CONST_PTR, BT_SIZE, BT_SIZE)
 #define BT_FN_VOID_VALIST_REF_VALIST_ARG(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VALIST_REF, BT_VALIST_ARG)
 #define BT_FN_LONGDOUBLE_CONST_STRING(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_CONST_STRING)
+#define BT_FN_LONGLONG_FLOAT(NAME) FUNC_SIMPLE(BT_LONGLONG, NAME, BT_FLOAT)
+#define BT_FN_DFLOAT32(NAME) FUNC_SIMPLE(BT_DFLOAT32, NAME)
+#define BT_FN_INT_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_LONGDOUBLE)
+#define BT_FN_BOOL_VPTR_I2_I2(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_VPTR, BT_I2, BT_I2)
+#define BT_FN_FLOAT_FLOAT_FLOATPTR(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_FLOATPTR)
+#define BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_LONGDOUBLE, BT_LONGDOUBLE)
+#define BT_FN_VOID_PTR_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_PTR, BT_INT)
+#define BT_FN_LONG_LONG(NAME) FUNC_SIMPLE(BT_LONG, NAME, BT_LONG)
+#define BT_FN_INT_DOUBLE(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_DOUBLE)
+#define BT_FN_BOOL_VPTR_PTR_I16_BOOL_INT_INT(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_VPTR, BT_PTR, BT_I16, BT_BOOL, BT_INT, BT_INT)
+#define BT_FN_UINT(NAME) FUNC_SIMPLE(BT_UINT, NAME)
+#define BT_FN_DOUBLE_DOUBLE_INT(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_INT)
+#define BT_FN_VOID_LONGDOUBLE_LONGDOUBLEPTR_LONGDOUBLEPTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_LONGDOUBLE, BT_LONGDOUBLEPTR, BT_LONGDOUBLEPTR)
+#define BT_FN_INT_INT_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_INT, BT_CONST_STRING, BT_VAR)
+#define BT_FN_BOOL_INT_INT_INTPTR(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_INT, BT_INT, BT_INTPTR)
+#define BT_FN_DFLOAT32_DFLOAT32(NAME) FUNC_SIMPLE(BT_DFLOAT32, NAME, BT_DFLOAT32)
+#define BT_FN_VOID_VAR(NAME) FUNC_SIMPLE(BT_VOID, NAME)
+#define BT_FN_INT_CONST_STRING_FILEPTR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_FILEPTR)
+#define BT_FN_VOID_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_INT)
+#define BT_FN_DFLOAT128_CONST_STRING(NAME) FUNC_SIMPLE(BT_DFLOAT128, NAME, BT_CONST_STRING)
+#define BT_FN_BOOL_VPTR_I16_I16(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_VPTR, BT_I16, BT_I16)
+#define BT_FN_BOOL_LONG_LONG_LONGPTR(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_LONG, BT_LONG, BT_LONG, BT_PTR)
+#define BT_FN_INT_DFLOAT64(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_DFLOAT64)
+#define BT_FN_LONG_FLOAT(NAME) FUNC_SIMPLE(BT_LONG, NAME, BT_FLOAT)
+#define BT_FN_CONST_STRING(NAME) FUNC_SIMPLE(BT_CONST_STRING, NAME)
+#define BT_FN_SIZE_CONST_STRING_CONST_STRING(NAME) FUNC_SIMPLE(BT_SIZE, NAME, BT_CONST_STRING, BT_CONST_STRING)
+#define BT_FN_COMPLEX_FLOAT_FLOAT(NAME) FUNC_SIMPLE(BT_COMPLEX_FLOAT, NAME, BT_FLOAT)
+#define BT_FN_VOID_SIZE_VPTR_PTR_PTR_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_SIZE, BT_VPTR, BT_PTR, BT_PTR, BT_INT)
+#define BT_FN_STRING_CONST_STRING_CONST_STRING_INT(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_CONST_STRING, BT_CONST_STRING, BT_INT)
+#define BT_FN_INT_CONST_STRING_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_CONST_STRING, BT_VAR)
+#define BT_FN_LONGDOUBLE_LONGDOUBLE_INT(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_INT)
+#define BT_FN_BOOL_VPTR_I1_I1(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_VPTR, BT_I1, BT_I1)
+#define BT_FN_DOUBLE_DOUBLE_DOUBLEPTR(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_DOUBLEPTR)
+#define BT_FN_DOUBLE_DOUBLE_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_DOUBLE)
+#define BT_FN_LONGDOUBLE_LONGDOUBLE_LONG(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_LONG)
+#define BT_FN_I16_VPTR_I16_INT(NAME) FUNC_SIMPLE(BT_I16, NAME, BT_VPTR, BT_I16, BT_INT)
+#define BT_FN_INT_STRING_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_CONST_STRING, BT_VALIST_ARG)
+#define BT_FN_INT_STRING_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_CONST_STRING, BT_VAR)
+#define BT_FN_UINT64_UINT64(NAME) FUNC_SIMPLE(BT_UINT64, NAME, BT_UINT64)
+#define BT_FN_BOOL_VPTR_PTR_I2_BOOL_INT_INT(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_VPTR, BT_PTR, BT_I2, BT_BOOL, BT_INT, BT_INT)
+#define BT_FN_PTR_PTR_CONST_PTR_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR, BT_CONST_PTR, BT_SIZE)
+#define BT_FN_STRING_CONST_STRING_INT(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_CONST_STRING, BT_INT)
+#define BT_FN_FLOAT_FLOAT_LONG(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_LONG)
+#define BT_FN_FLOAT_CONST_STRING(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_CONST_STRING)
+#define BT_FN_FLOAT_FLOAT_INTPTR(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_INTPTR)
+#define BT_FN_INT_STRING_SIZE_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_SIZE, BT_CONST_STRING, BT_VALIST_ARG)
+#define BT_FN_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_COMPLEX_LONGDOUBLE, NAME, BT_COMPLEX_LONGDOUBLE, BT_COMPLEX_LONGDOUBLE)
+#define BT_FN_INT_LONGLONG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_LONGLONG)
+#define BT_FN_DOUBLE_DOUBLE_DOUBLE_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_DOUBLE, BT_DOUBLE)
+#define BT_FN_PTR_PTR(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR)
+#define BT_FN_I1_VPTR_I1_I1(NAME) FUNC_SIMPLE(BT_I1, NAME, BT_VPTR, BT_I1, BT_I1)
+#define BT_FN_LONGDOUBLE_COMPLEX_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_COMPLEX_LONGDOUBLE)
+#define BT_FN_FLOAT_FLOAT_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_LONGDOUBLE)
+#define BT_FN_DOUBLE_CONST_STRING(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_CONST_STRING)
+#define BT_FN_DFLOAT128(NAME) FUNC_SIMPLE(BT_DFLOAT128, NAME)
+#define BT_FN_I16_CONST_VPTR_INT(NAME) FUNC_SIMPLE(BT_I16, NAME, BT_CONST_VPTR, BT_INT)
+#define BT_FN_FLOAT_FLOAT_FLOAT_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_FLOAT, BT_FLOAT)
+#define BT_FN_INT_STRING_INT_SIZE_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_INT, BT_SIZE, BT_CONST_STRING, BT_VAR)
+#define BT_FN_SIZE_CONST_PTR_INT(NAME) FUNC_SIMPLE(BT_SIZE, NAME, BT_CONST_PTR, BT_INT)
+#define BT_FN_DOUBLE_DOUBLE_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_LONGDOUBLE)
+#define BT_FN_LONG_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONG, NAME, BT_LONGDOUBLE)
+#define BT_FN_BOOL_SIZE_CONST_VPTR(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_SIZE, BT_CONST_VPTR)
+#define BT_FN_I16_VPTR_I16(NAME) FUNC_SIMPLE(BT_I16, NAME, BT_VPTR, BT_I16)
+#define BT_FN_VOID_VPTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VPTR)
+#define BT_FN_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME)
+#define BT_FN_VOID_PTRMODE_PTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_PTRMODE_PTR)
+#define BT_FN_WINT_WINT(NAME) FUNC_SIMPLE(BT_WINT, NAME, BT_WINT)
+#define BT_FN_BOOL_VPTR_I8_I8(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_VPTR, BT_I8, BT_I8)
+#define BT_FN_LONGDOUBLE_LONGDOUBLE_INTPTR(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_INTPTR)
+#define BT_FN_DOUBLE_DOUBLE_INTPTR(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_INTPTR)
+#define BT_FN_FLOAT_COMPLEX_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_COMPLEX_FLOAT)
+#define BT_FN_BOOL_VPTR_PTR_I8_BOOL_INT_INT(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_VPTR, BT_PTR, BT_I8, BT_BOOL, BT_INT, BT_INT)
+#define BT_FN_I4_CONST_VPTR_INT(NAME) FUNC_SIMPLE(BT_I4, NAME, BT_CONST_VPTR, BT_INT)
+#define BT_FN_INT_WINT(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_WINT)
+#define BT_FN_VOID_DOUBLE_DOUBLEPTR_DOUBLEPTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_DOUBLE, BT_DOUBLEPTR, BT_DOUBLEPTR)
+#define BT_FN_I8_VPTR_I8_INT(NAME) FUNC_SIMPLE(BT_I8, NAME, BT_VPTR, BT_I8, BT_INT)
+#define BT_FN_VOID_PTR_WORD_WORD_PTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_PTR, BT_WORD, BT_WORD, BT_PTR)
+#define BT_FN_I4_VPTR_I4_I4(NAME) FUNC_SIMPLE(BT_I4, NAME, BT_VPTR, BT_I4, BT_I4)
+#define BT_FN_PTR_CONST_PTR_INT_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_CONST_PTR, BT_INT, BT_SIZE)
+#define BT_FN_INT_UINTMAX(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_UINTMAX)
+#define BT_FN_BOOL_ULONGLONG_ULONGLONG_ULONGLONGPTR(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_ULONGLONG, BT_ULONGLONG, BT_ULONGLONG, BT_PTR)
+#define BT_FN_LONGLONG_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGLONG, NAME, BT_LONGDOUBLE)
+#define BT_FN_FLOAT_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT)
+#define BT_FN_INT_INT_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_INT, BT_CONST_STRING, BT_VALIST_ARG)
+#define BT_FN_STRING_STRING_CONST_STRING_SIZE_SIZE(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_STRING, BT_CONST_STRING, BT_SIZE, BT_SIZE)
+#define BT_FN_INT_DFLOAT128(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_DFLOAT128)
+#define BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR_FN_VOID_VAR_PTR_SIZE)
+#define BT_FN_PTR_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_SIZE)
+#define BT_FN_DFLOAT32_CONST_STRING(NAME) FUNC_SIMPLE(BT_DFLOAT32, NAME, BT_CONST_STRING)
+#define BT_FN_LONG_LONG_LONG(NAME) FUNC_SIMPLE(BT_LONG, NAME, BT_LONG, BT_LONG)
+#define BT_FN_VOID_VPTR_I8_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VPTR, BT_I8, BT_INT)
+#define BT_FN_INT_STRING_SIZE_INT_SIZE_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_SIZE, BT_INT, BT_SIZE, BT_CONST_STRING, BT_VAR)
+#define BT_FN_BOOL_VAR(NAME) FUNC_SIMPLE(BT_BOOL, NAME)
+#define BT_FN_INT_FILEPTR_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_FILEPTR, BT_CONST_STRING, BT_VAR)
+#define BT_FN_COMPLEX_DOUBLE_DOUBLE(NAME) FUNC_SIMPLE(BT_COMPLEX_DOUBLE, NAME, BT_DOUBLE)
+#define BT_FN_INT_ULONG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_ULONG)
+#define BT_FN_STRING_CONST_STRING_SIZE(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_CONST_STRING, BT_SIZE)
+#define BT_FN_VOID(NAME) FUNC_SIMPLE(BT_VOID, NAME)
+#define BT_FN_INT_DFLOAT32(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_DFLOAT32)
+#define BT_FN_VOID_SIZE_CONST_VPTR_PTR_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_SIZE, BT_CONST_VPTR, BT_PTR, BT_INT)
+#define BT_FN_UNWINDWORD_PTR(NAME) FUNC_SIMPLE(BT_UNWINDWORD, NAME, BT_PTR)
+#define BT_FN_I1_CONST_VPTR_INT(NAME) FUNC_SIMPLE(BT_I1, NAME, BT_CONST_VPTR, BT_INT)
+#define BT_FN_INT_STRING_SIZE_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_SIZE, BT_CONST_STRING, BT_VAR)
+#define BT_FN_STRING_CONST_STRING(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_CONST_STRING)
+#define BT_FN_PTR_SIZE_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_SIZE, BT_SIZE)
+#define BT_FN_VOID_VPTR_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VPTR, BT_INT)
+#define BT_FN_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME)
+#define BT_FN_PTR_VAR(NAME) FUNC_SIMPLE(BT_PTR, NAME)
+#define BT_FN_I8_CONST_VPTR_INT(NAME) FUNC_SIMPLE(BT_I8, NAME, BT_CONST_VPTR, BT_INT)
+#define BT_FN_LONG_DOUBLE(NAME) FUNC_SIMPLE(BT_LONG, NAME, BT_DOUBLE)
+#define BT_FN_LONGLONG_DOUBLE(NAME) FUNC_SIMPLE(BT_LONGLONG, NAME, BT_DOUBLE)
+#define BT_FN_BOOL_VPTR_PTR_I4_BOOL_INT_INT(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_VPTR, BT_PTR, BT_I4, BT_BOOL, BT_INT, BT_INT)
+#define BT_FN_VOID_CONST_PTR_VAR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_CONST_PTR, BT_VAR)
+#define BT_FN_DOUBLE_DOUBLE_LONG(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_LONG)
+#define BT_FN_DOUBLE_DOUBLE_DOUBLE_INTPTR(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_DOUBLE, BT_INTPTR)
+#define BT_FN_LONGDOUBLE_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE)
+#define BT_FN_INT_PTR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_PTR)
 #define BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE_INTPTR(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_LONGDOUBLE, BT_INTPTR)
-#define BT_FN_PTR_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_SIZE)
-#define BT_FN_DOUBLE_DOUBLE_DOUBLE_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_DOUBLE, BT_DOUBLE)
+#define BT_FN_BOOL_VPTR_INT(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_VPTR, BT_INT)
+#define BT_FN_INT_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_VALIST_ARG)
+#define BT_FN_DOUBLE_COMPLEX_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_COMPLEX_DOUBLE)
+#define BT_FN_DOUBLE_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE)
+#define BT_FN_I2_VPTR_I2_INT(NAME) FUNC_SIMPLE(BT_I2, NAME, BT_VPTR, BT_I2, BT_INT)
+#define BT_FN_INT_INT_FILEPTR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_INT, BT_FILEPTR)
+#define BT_FN_DFLOAT64_DFLOAT64(NAME) FUNC_SIMPLE(BT_DFLOAT64, NAME, BT_DFLOAT64)
+#define BT_FN_I8_VPTR_I8(NAME) FUNC_SIMPLE(BT_I8, NAME, BT_VPTR, BT_I8)
+#define BT_FN_DOUBLE_INT_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_INT, BT_DOUBLE)
+#define BT_FN_I16_VPTR_I16_I16(NAME) FUNC_SIMPLE(BT_I16, NAME, BT_VPTR, BT_I16, BT_I16)
+#define BT_FN_VOID_VPTR_I16_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VPTR, BT_I16, BT_INT)
+#define BT_FN_VOID_VPTR_I1_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VPTR, BT_I1, BT_INT)
+#define BT_FN_DFLOAT64(NAME) FUNC_SIMPLE(BT_DFLOAT64, NAME)
+#define BT_FN_FLOAT_INT_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_INT, BT_FLOAT)
+#define BT_FN_I2_VPTR_I2_I2(NAME) FUNC_SIMPLE(BT_I2, NAME, BT_VPTR, BT_I2, BT_I2)
+#define BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT(NAME) FUNC_SIMPLE(BT_COMPLEX_FLOAT, NAME, BT_COMPLEX_FLOAT)
+#define BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_LONGDOUBLE)
+#define BT_FN_VOID_VALIST_REF_VAR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VALIST_REF, BT_VAR)
+#define BT_FN_UINT32_UINT32(NAME) FUNC_SIMPLE(BT_UINT32, NAME, BT_UINT32)
+#define BT_FN_FLOAT_FLOAT_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_FLOAT)
+#define BT_FN_INT_STRING_INT_SIZE_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_INT, BT_SIZE, BT_CONST_STRING, BT_VALIST_ARG)
+#define BT_FN_INT_CONST_PTR_CONST_PTR_SIZE(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_PTR, BT_CONST_PTR, BT_SIZE)
+#define BT_FN_PTR(NAME) FUNC_SIMPLE(BT_PTR, NAME)
+#define BT_FN_FLOAT_FLOAT_INT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_INT)
+#define BT_FN_INT_UINT(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_UINT)
+#define BT_FN_SIZE_CONST_STRING(NAME) FUNC_SIMPLE(BT_SIZE, NAME, BT_CONST_STRING)
+#define BT_FN_PTR_PTR_INT_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR, BT_INT, BT_SIZE)
+#define BT_FN_I2_VPTR_I2(NAME) FUNC_SIMPLE(BT_I2, NAME, BT_VPTR, BT_I2)
+#define BT_FN_UINT16_UINT16(NAME) FUNC_SIMPLE(BT_UINT16, NAME, BT_UINT16)
+#define BT_FN_INT_INTMAX(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_INTMAX)
+#define BT_FN_VOID_PTR_PTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_PTR, BT_PTR)
 #define BT_FN_STRING_STRING_CONST_STRING(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_STRING, BT_CONST_STRING)
-#define BT_FN_VOID_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_INT)
-#define BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_LONGDOUBLE)
-#define BT_FN_INT_ULONGLONG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_ULONGLONG)
-#define BT_FN_INT_FILEPTR_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_FILEPTR, BT_CONST_STRING, BT_VAR)
-#define BT_FN_LONGLONG_DOUBLE(NAME) FUNC_SIMPLE(BT_LONGLONG, NAME, BT_DOUBLE)
-#define BT_FN_INT_INT_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_INT, BT_CONST_STRING, BT_VAR)
-#define BT_FN_VOID_PTR_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_PTR, BT_INT)
-#define BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT(NAME) FUNC_SIMPLE(BT_COMPLEX_FLOAT, NAME, BT_COMPLEX_FLOAT)
-#define BT_FN_INT_WINT(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_WINT)
-#define BT_FN_PTR_PTR_INT_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR, BT_INT, BT_SIZE)
-#define BT_FN_STRING_CONST_STRING_INT(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_CONST_STRING, BT_INT)
+#define BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE_COMPLEX_DOUBLE(NAME) FUNC_SIMPLE(BT_COMPLEX_DOUBLE, NAME, BT_COMPLEX_DOUBLE, BT_COMPLEX_DOUBLE)
+#define BT_FN_I2_CONST_VPTR_INT(NAME) FUNC_SIMPLE(BT_I2, NAME, BT_CONST_VPTR, BT_INT)
+#define BT_FN_I1_VPTR_I1(NAME) FUNC_SIMPLE(BT_I1, NAME, BT_VPTR, BT_I1)
+#define BT_FN_LONGLONG_LONGLONG(NAME) FUNC_SIMPLE(BT_LONGLONG, NAME, BT_LONGLONG)
+#define BT_FN_PID(NAME) FUNC_SIMPLE(BT_PID, NAME)
+#define BT_FN_I4_VPTR_I4(NAME) FUNC_SIMPLE(BT_I4, NAME, BT_VPTR, BT_I4)
+#define BT_FN_I8_VPTR_I8_I8(NAME) FUNC_SIMPLE(BT_I8, NAME, BT_VPTR, BT_I8, BT_I8)
+#define BT_FN_VOID_PTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_PTR)
+#define BT_FN_VOID_VPTR_I2_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VPTR, BT_I2, BT_INT)
+#define BT_FN_VOID_SIZE_VPTR_PTR_INT(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_SIZE, BT_VPTR, BT_PTR, BT_INT)
+#define BT_FN_VOID_VALIST_REF(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_VALIST_REF)
+#define BT_FN_INT_PTRPTR_SIZE_SIZE(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_PTRPTR, BT_SIZE, BT_SIZE)
+#define BT_FN_INT_CONST_STRING_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_CONST_STRING, BT_VALIST_ARG)
+#define BT_FN_INT_CONST_STRING(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING)
+#define BT_FN_INT_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_VAR)
+#define BT_FN_DFLOAT64_CONST_STRING(NAME) FUNC_SIMPLE(BT_DFLOAT64, NAME, BT_CONST_STRING)
+#define BT_FN_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME)
+#define BT_FN_PTR_PTR_INT_SIZE_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR, BT_INT, BT_SIZE, BT_SIZE)
+#define BT_FN_INT_CONST_STRING_CONST_STRING(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_CONST_STRING)
+#define BT_FN_COMPLEX_LONGDOUBLE_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_COMPLEX_LONGDOUBLE, NAME, BT_LONGDOUBLE)
+#define BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLEPTR(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_LONGDOUBLEPTR)
+#define BT_FN_BOOL_SIZE_VPTR_PTR_PTR_INT_INT(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_SIZE, BT_VPTR, BT_PTR, BT_PTR, BT_INT, BT_INT)
+#define BT_FN_BOOL_UINT_UINT_UINTPTR(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_UINT, BT_UINT, BT_UINT, BT_PTR)
+#define BT_FN_BOOL_VPTR_I4_I4(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_VPTR, BT_I4, BT_I4)
+#define BT_FN_COMPLEX_FLOAT_COMPLEX_FLOAT_COMPLEX_FLOAT(NAME) FUNC_SIMPLE(BT_COMPLEX_FLOAT, NAME, BT_COMPLEX_FLOAT, BT_COMPLEX_FLOAT)
+#define BT_FN_FLOAT_FLOAT_FLOAT_INTPTR(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_FLOAT, BT_INTPTR)
+#define BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE(NAME) FUNC_SIMPLE(BT_COMPLEX_DOUBLE, NAME, BT_COMPLEX_DOUBLE)
+#define BT_FN_I4_VPTR_I4_INT(NAME) FUNC_SIMPLE(BT_I4, NAME, BT_VPTR, BT_I4, BT_INT)
+#define BT_FN_VOID_CONST_PTR_PTR_SIZE(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_CONST_PTR, BT_PTR, BT_SIZE)
+#define BT_FN_DFLOAT128_DFLOAT128(NAME) FUNC_SIMPLE(BT_DFLOAT128, NAME, BT_DFLOAT128)
+#define BT_FN_LONGDOUBLE_INT_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_INT, BT_LONGDOUBLE)
+#define BT_FN_INT_STRING_SIZE_INT_SIZE_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_SIZE, BT_INT, BT_SIZE, BT_CONST_STRING, BT_VALIST_ARG)
+#define BT_FN_INT_FILEPTR_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_FILEPTR, BT_CONST_STRING, BT_VALIST_ARG)
+#define BT_FN_INT_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME)
+#define BT_FN_INT_CONST_STRING_PTR_CONST_STRING(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_PTR_CONST_STRING)
+#define BT_FN_INT_INT(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_INT)
+#define BT_FN_VOID_FLOAT_FLOATPTR_FLOATPTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_FLOAT, BT_FLOATPTR, BT_FLOATPTR)
 #define BT_FN_INT_FLOAT(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_FLOAT)
-#define BT_FN_DOUBLE_CONST_STRING(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_CONST_STRING)
-#define BT_FN_LONG_FLOAT(NAME) FUNC_SIMPLE(BT_LONG, NAME, BT_FLOAT)
-#define BT_FN_PTR_SIZE_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_SIZE, BT_SIZE)
-#define BT_FN_STRING_STRING_CONST_STRING_SIZE(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_STRING, BT_CONST_STRING, BT_SIZE)
-#define BT_FN_LONGLONG_LONGLONG(NAME) FUNC_SIMPLE(BT_LONGLONG, NAME, BT_LONGLONG)
-#define BT_FN_PTR_PTR(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR)
-#define BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR, BT_CONST_PTR, BT_SIZE, BT_SIZE)
-#define BT_FN_FLOAT_FLOAT_LONG(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_LONG)
+#define BT_FN_INT_FILEPTR_INT_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_FILEPTR, BT_INT, BT_CONST_STRING, BT_VALIST_ARG)
+#define BT_FN_INT_FILEPTR_INT_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_FILEPTR, BT_INT, BT_CONST_STRING, BT_VAR)
+#define BT_FN_SSIZE_STRING_SIZE_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_SSIZE, NAME, BT_STRING, BT_SIZE, BT_CONST_STRING, BT_VAR)
+#define BT_FN_BOOL_LONGLONG_LONGLONG_LONGLONGPTR(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_LONGLONG, BT_LONGLONG, BT_LONGLONG, BT_PTR)
+#define BT_FN_PTR_PTR_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR, BT_SIZE)
+#define BT_FN_PTR_UINT(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_UINT)
 #define BT_FN_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_COMPLEX_LONGDOUBLE, NAME, BT_COMPLEX_LONGDOUBLE)
-#define BT_FN_PTR_PTR_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR, BT_SIZE)
-#define BT_FN_PTR_VAR(NAME) FUNC_SIMPLE(BT_PTR, NAME)
-#define BT_FN_SIZE_CONST_PTR_INT(NAME) FUNC_SIMPLE(BT_SIZE, NAME, BT_CONST_PTR, BT_INT)
-#define BT_FN_INT_CONST_STRING(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING)
-#define BT_FN_INT_STRING_SIZE_INT_SIZE_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_SIZE, BT_INT, BT_SIZE, BT_CONST_STRING, BT_VALIST_ARG)
-#define BT_FN_INT_STRING_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_CONST_STRING, BT_VALIST_ARG)
-#define BT_FN_DFLOAT32(NAME) FUNC_SIMPLE(BT_DFLOAT32, NAME)
-#define BT_FN_LONGDOUBLE_LONGDOUBLE_INTPTR(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_INTPTR)
-#define BT_FN_STRING_STRING_CONST_STRING_SIZE_SIZE(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_STRING, BT_CONST_STRING, BT_SIZE, BT_SIZE)
-#define BT_FN_PTR_UINT(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_UINT)
-#define BT_FN_INT_CONST_STRING_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_CONST_STRING, BT_VALIST_ARG)
-#define BT_FN_DFLOAT128_CONST_STRING(NAME) FUNC_SIMPLE(BT_DFLOAT128, NAME, BT_CONST_STRING)
-#define BT_FN_DOUBLE_DOUBLE_DOUBLEPTR(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_DOUBLEPTR)
-#define BT_FN_SSIZE_STRING_SIZE_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_SSIZE, NAME, BT_STRING, BT_SIZE, BT_CONST_STRING, BT_VAR)
-#define BT_FN_DFLOAT32_DFLOAT32(NAME) FUNC_SIMPLE(BT_DFLOAT32, NAME, BT_DFLOAT32)
-#define BT_FN_INT_PTR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_PTR)
-#define BT_FN_UINT32_UINT32(NAME) FUNC_SIMPLE(BT_UINT32, NAME, BT_UINT32)
-#define BT_FN_PTR_PTR_FN_VOID_VAR_PTR_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR_FN_VOID_VAR_PTR_SIZE)
-#define BT_FN_INT_DOUBLE(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_DOUBLE)
-#define BT_FN_INT_STRING_INT_SIZE_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_INT, BT_SIZE, BT_CONST_STRING, BT_VAR)
-#define BT_FN_INT_ULONG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_ULONG)
-#define BT_FN_DOUBLE_DOUBLE_INTPTR(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_INTPTR)
-#define BT_FN_UINT64_UINT64(NAME) FUNC_SIMPLE(BT_UINT64, NAME, BT_UINT64)
-#define BT_FN_STRING_CONST_STRING_CONST_STRING(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_CONST_STRING, BT_CONST_STRING)
-#define BT_FN_INT_INT_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_INT, BT_CONST_STRING, BT_VALIST_ARG)
-#define BT_FN_PTR_PTR_INT_SIZE_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR, BT_INT, BT_SIZE, BT_SIZE)
-#define BT_FN_DOUBLE_COMPLEX_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_COMPLEX_DOUBLE)
-#define BT_FN_VOID_CONST_PTR_VAR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_CONST_PTR, BT_VAR)
-#define BT_FN_INT_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME)
-#define BT_FN_INT_PTRPTR_SIZE_SIZE(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_PTRPTR, BT_SIZE, BT_SIZE)
-#define BT_FN_INT_CONST_STRING_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_CONST_STRING, BT_VAR)
-#define BT_FN_INT_DFLOAT32(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_DFLOAT32)
-#define BT_FN_DFLOAT64_DFLOAT64(NAME) FUNC_SIMPLE(BT_DFLOAT64, NAME, BT_DFLOAT64)
-#define BT_FN_VOID_CONST_PTR_PTR_SIZE(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_CONST_PTR, BT_PTR, BT_SIZE)
-#define BT_FN_UNWINDWORD_PTR(NAME) FUNC_SIMPLE(BT_UNWINDWORD, NAME, BT_PTR)
-#define BT_FN_FLOAT_FLOAT_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_FLOAT, BT_FLOAT)
-#define BT_FN_COMPLEX_FLOAT_FLOAT(NAME) FUNC_SIMPLE(BT_COMPLEX_FLOAT, NAME, BT_FLOAT)
-#define BT_FN_UINT(NAME) FUNC_SIMPLE(BT_UINT, NAME)
-#define BT_FN_DOUBLE_DOUBLE_DOUBLE_INTPTR(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_DOUBLE, BT_DOUBLE, BT_INTPTR)
-#define BT_FN_UINT16_UINT16(NAME) FUNC_SIMPLE(BT_UINT16, NAME, BT_UINT16)
-#define BT_FN_INT_STRING_INT_SIZE_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_INT, BT_SIZE, BT_CONST_STRING, BT_VALIST_ARG)
-#define BT_FN_LONGDOUBLE_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE)
-#define BT_FN_LONG_LONG(NAME) FUNC_SIMPLE(BT_LONG, NAME, BT_LONG)
-#define BT_FN_INT_STRING_SIZE_CONST_STRING_VALIST_ARG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_SIZE, BT_CONST_STRING, BT_VALIST_ARG)
-#define BT_FN_FLOAT_INT_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME, BT_INT, BT_FLOAT)
-#define BT_FN_PTR(NAME) FUNC_SIMPLE(BT_PTR, NAME)
-#define BT_FN_SIZE_CONST_PTR_SIZE_SIZE_FILEPTR(NAME) FUNC_SIMPLE(BT_SIZE, NAME, BT_CONST_PTR, BT_SIZE, BT_SIZE, BT_FILEPTR)
-#define BT_FN_VOID_DOUBLE_DOUBLEPTR_DOUBLEPTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_DOUBLE, BT_DOUBLEPTR, BT_DOUBLEPTR)
-#define BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE_COMPLEX_DOUBLE(NAME) FUNC_SIMPLE(BT_COMPLEX_DOUBLE, NAME, BT_COMPLEX_DOUBLE, BT_COMPLEX_DOUBLE)
-#define BT_FN_LONG_DOUBLE(NAME) FUNC_SIMPLE(BT_LONG, NAME, BT_DOUBLE)
-#define BT_FN_SIZE_CONST_STRING(NAME) FUNC_SIMPLE(BT_SIZE, NAME, BT_CONST_STRING)
-#define BT_FN_LONGLONG_FLOAT(NAME) FUNC_SIMPLE(BT_LONGLONG, NAME, BT_FLOAT)
-#define BT_FN_INT_CONST_STRING_CONST_STRING_SIZE(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_CONST_STRING, BT_SIZE)
-#define BT_FN_PTR_PTR_CONST_PTR_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_PTR, BT_CONST_PTR, BT_SIZE)
-#define BT_FN_DFLOAT128(NAME) FUNC_SIMPLE(BT_DFLOAT128, NAME)
-#define BT_FN_PID(NAME) FUNC_SIMPLE(BT_PID, NAME)
-#define BT_FN_INT_CONST_STRING_FILEPTR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_FILEPTR)
-#define BT_FN_INT_LONGLONG(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_LONGLONG)
-#define BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_LONGDOUBLE, BT_LONGDOUBLE)
-#define BT_FN_INT_INT_FILEPTR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_INT, BT_FILEPTR)
-#define BT_FN_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE_COMPLEX_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_COMPLEX_LONGDOUBLE, NAME, BT_COMPLEX_LONGDOUBLE, BT_COMPLEX_LONGDOUBLE)
-#define BT_FN_VOID_PTRMODE_PTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_PTRMODE_PTR)
-#define BT_FN_INT_STRING_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_STRING, BT_CONST_STRING, BT_VAR)
-#define BT_FN_COMPLEX_DOUBLE_COMPLEX_DOUBLE(NAME) FUNC_SIMPLE(BT_COMPLEX_DOUBLE, NAME, BT_COMPLEX_DOUBLE)
-#define BT_FN_DFLOAT32_CONST_STRING(NAME) FUNC_SIMPLE(BT_DFLOAT32, NAME, BT_CONST_STRING)
-#define BT_FN_INT_CONST_STRING_PTR_CONST_STRING_PTR_CONST_STRING(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_CONST_STRING, BT_PTR_CONST_STRING, BT_PTR_CONST_STRING)
-#define BT_FN_STRING_CONST_STRING_SIZE(NAME) FUNC_SIMPLE(BT_STRING, NAME, BT_CONST_STRING, BT_SIZE)
-#define BT_FN_INT_FILEPTR_INT_CONST_STRING_VAR(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_FILEPTR, BT_INT, BT_CONST_STRING, BT_VAR)
-#define BT_FN_DFLOAT128_DFLOAT128(NAME) FUNC_SIMPLE(BT_DFLOAT128, NAME, BT_DFLOAT128)
-#define BT_FN_DOUBLE_INT_DOUBLE(NAME) FUNC_SIMPLE(BT_DOUBLE, NAME, BT_INT, BT_DOUBLE)
-#define BT_FN_FLOAT(NAME) FUNC_SIMPLE(BT_FLOAT, NAME)
-#define BT_FN_LONGDOUBLE_INT_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_INT, BT_LONGDOUBLE)
-#define BT_FN_PTR_CONST_PTR_INT_SIZE(NAME) FUNC_SIMPLE(BT_PTR, NAME, BT_CONST_PTR, BT_INT, BT_SIZE)
-#define BT_FN_VOID_LONGDOUBLE_LONGDOUBLEPTR_LONGDOUBLEPTR(NAME) FUNC_SIMPLE(BT_VOID, NAME, BT_LONGDOUBLE, BT_LONGDOUBLEPTR, BT_LONGDOUBLEPTR)
-#define BT_FN_INT_INTMAX(NAME) FUNC_SIMPLE(BT_INT, NAME, BT_INTMAX)
-#define BT_FN_LONGDOUBLE(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME)
-#define BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLEPTR(NAME) FUNC_SIMPLE(BT_LONGDOUBLE, NAME, BT_LONGDOUBLE, BT_LONGDOUBLEPTR)
+#define BT_FN_BOOL_VPTR_PTR_I1_BOOL_INT_INT(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_VPTR, BT_PTR, BT_I1, BT_BOOL, BT_INT, BT_INT)
+#define BT_FN_BOOL_ULONG_ULONG_ULONGPTR(NAME) FUNC_SIMPLE(BT_BOOL, NAME, BT_ULONG, BT_ULONG, BT_ULONG, BT_PTR)
 
 #include "builtins.def"
Index: src/prelude/builtins.def
===================================================================
--- src/prelude/builtins.def	(revision dc99f38e2db7b4d28474d2e58f743e394a268368)
+++ src/prelude/builtins.def	(revision 0c82fec48a07c0a2b6d255c6384141d7fec74492)
@@ -1,5 +1,5 @@
 /* This file contains the definitions and documentation for the
    builtins used in the GNU compiler.
-   Copyright (C) 2000-2014 Free Software Foundation, Inc.
+   Copyright (C) 2000-2016 Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -63,4 +63,14 @@
 
    The builtins is registered only if COND is true.  */
+
+/* A macro for builtins where the
+   BUILT_IN_*_CHKP = BUILT_IN_* + BEGIN_CHKP_BUILTINS + 1
+   enums should be defined too.  */
+#ifndef DEF_BUILTIN_CHKP
+#define DEF_BUILTIN_CHKP(ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P,	\
+			 FALLBACK_P, NONANSI_P, ATTRS, IMPLICIT, COND)	\
+  DEF_BUILTIN(ENUM, NAME, CLASS, TYPE, LIBTYPE, BOTH_P, FALLBACK_P,	\
+	      NONANSI_P, ATTRS, IMPLICIT, COND)
+#endif
 
 /* A GCC builtin (like __builtin_saveregs) is provided by the
@@ -88,4 +98,8 @@
   DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
 	       true, true, false, ATTRS, true, true)
+#undef DEF_LIB_BUILTIN_CHKP
+#define DEF_LIB_BUILTIN_CHKP(ENUM, NAME, TYPE, ATTRS)	\
+  DEF_BUILTIN_CHKP (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE,	\
+		    TYPE, true, true, false, ATTRS, true, true)
 
 /* Like DEF_LIB_BUILTIN, except that the function is not one that is
@@ -97,4 +111,8 @@
   DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
 	       true, true, true, ATTRS, false, true)
+#undef DEF_EXT_LIB_BUILTIN_CHKP
+#define DEF_EXT_LIB_BUILTIN_CHKP(ENUM, NAME, TYPE, ATTRS)	\
+  DEF_BUILTIN_CHKP (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE,	\
+		    TYPE, true, true, true, ATTRS, false, true)
 
 /* Like DEF_LIB_BUILTIN, except that the function is only a part of
@@ -111,4 +129,11 @@
   DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
 	       true, true, !flag_isoc99, ATTRS, targetm.libc_has_function (function_c99_misc), true)
+
+/* Like DEF_LIB_BUILTIN, except that the function is only a part of
+   the standard in C11 or above.  */
+#undef DEF_C11_BUILTIN
+#define DEF_C11_BUILTIN(ENUM, NAME, TYPE, ATTRS)	\
+  DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,	\
+	       true, true, !flag_isoc11, ATTRS, targetm.libc_has_function (function_c11_misc), true)
 
 /* Like DEF_C99_BUILTIN, but for complex math functions.  */
@@ -140,11 +165,27 @@
 	       false, ATTR_LAST, false, false)
 
-/* Builtin used by the implementation of GNU OpenMP.  None of these are
-   actually implemented in the compiler; they're all in libgomp.  */
+/* Builtin used by the implementation of OpenACC and OpenMP.  Few of these are
+   actually implemented in the compiler; most are in libgomp.  */
+/* These builtins also need to be enabled in offloading compilers invoked from
+   mkoffload; for that purpose, we're checking the -foffload-abi flag here.  */
+#undef DEF_GOACC_BUILTIN
+#define DEF_GOACC_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
+  DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,    \
+	       false, true, true, ATTRS, false, \
+	       (flag_openacc \
+		|| flag_offload_abi != OFFLOAD_ABI_UNSET))
+#undef DEF_GOACC_BUILTIN_COMPILER
+#define DEF_GOACC_BUILTIN_COMPILER(ENUM, NAME, TYPE, ATTRS) \
+  DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,    \
+	       flag_openacc, true, true, ATTRS, false, true)
 #undef DEF_GOMP_BUILTIN
 #define DEF_GOMP_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
   DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE,    \
                false, true, true, ATTRS, false, \
-	       (flag_openmp || flag_tree_parallelize_loops))
+	       (flag_openacc \
+		|| flag_openmp \
+		|| flag_tree_parallelize_loops > 1 \
+		|| flag_cilkplus \
+		|| flag_offload_abi != OFFLOAD_ABI_UNSET))
 
 /* Builtin used by implementation of Cilk Plus.  Most of these are decomposed
@@ -170,5 +211,6 @@
 	       true, true, true, ATTRS, true, \
 	      (flag_sanitize & (SANITIZE_ADDRESS | SANITIZE_THREAD \
-				| SANITIZE_UNDEFINED)))
+				| SANITIZE_UNDEFINED | SANITIZE_NONDEFAULT) \
+	       || flag_sanitize_coverage))
 
 #undef DEF_CILKPLUS_BUILTIN
@@ -176,4 +218,10 @@
   DEF_BUILTIN (ENUM, NAME, BUILT_IN_NORMAL, BT_FN_INT_VAR, BT_LAST, \
   	       false, false, false, ATTRS, false, flag_cilkplus) 
+
+/* Builtin used by the implementation of Pointer Bounds Checker.  */
+#undef DEF_CHKP_BUILTIN
+#define DEF_CHKP_BUILTIN(ENUM, NAME, TYPE, ATTRS) \
+  DEF_BUILTIN_CHKP (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE,	\
+		    TYPE, true, true, false, ATTRS, true, true)
 
 /* Define an attribute list for math functions that are normally
@@ -224,4 +272,5 @@
 DEF_C99_BUILTIN        (BUILT_IN_ACOSHL, "acoshl", BT_FN_LONGDOUBLE_LONGDOUBLE, ATTR_MATHFN_FPROUNDING_ERRNO)
 DEF_C99_C90RES_BUILTIN (BUILT_IN_ACOSL, "acosl", BT_FN_LONGDOUBLE_LONGDOUBLE, ATTR_MATHFN_FPROUNDING_ERRNO)
+DEF_C11_BUILTIN        (BUILT_IN_ALIGNED_ALLOC, "aligned_alloc", BT_FN_PTR_SIZE_SIZE, ATTR_MALLOC_NOTHROW_LIST)
 DEF_LIB_BUILTIN        (BUILT_IN_ASIN, "asin", BT_FN_DOUBLE_DOUBLE, ATTR_MATHFN_FPROUNDING_ERRNO)
 DEF_C99_C90RES_BUILTIN (BUILT_IN_ASINF, "asinf", BT_FN_FLOAT_FLOAT, ATTR_MATHFN_FPROUNDING_ERRNO)
@@ -428,7 +477,7 @@
 DEF_C99_BUILTIN        (BUILT_IN_REMQUOF, "remquof", BT_FN_FLOAT_FLOAT_FLOAT_INTPTR, ATTR_MATHFN_FPROUNDING_STORE)
 DEF_C99_BUILTIN        (BUILT_IN_REMQUOL, "remquol", BT_FN_LONGDOUBLE_LONGDOUBLE_LONGDOUBLE_INTPTR, ATTR_MATHFN_FPROUNDING_STORE)
-DEF_C99_BUILTIN        (BUILT_IN_RINT, "rint", BT_FN_DOUBLE_DOUBLE, ATTR_MATHFN_FPROUNDING_ERRNO)
-DEF_C99_BUILTIN        (BUILT_IN_RINTF, "rintf", BT_FN_FLOAT_FLOAT, ATTR_MATHFN_FPROUNDING_ERRNO)
-DEF_C99_BUILTIN        (BUILT_IN_RINTL, "rintl", BT_FN_LONGDOUBLE_LONGDOUBLE, ATTR_MATHFN_FPROUNDING_ERRNO)
+DEF_C99_BUILTIN        (BUILT_IN_RINT, "rint", BT_FN_DOUBLE_DOUBLE, ATTR_MATHFN_FPROUNDING)
+DEF_C99_BUILTIN        (BUILT_IN_RINTF, "rintf", BT_FN_FLOAT_FLOAT, ATTR_MATHFN_FPROUNDING)
+DEF_C99_BUILTIN        (BUILT_IN_RINTL, "rintl", BT_FN_LONGDOUBLE_LONGDOUBLE, ATTR_MATHFN_FPROUNDING)
 DEF_C99_BUILTIN        (BUILT_IN_ROUND, "round", BT_FN_DOUBLE_DOUBLE, ATTR_CONST_NOTHROW_LEAF_LIST)
 DEF_C99_BUILTIN        (BUILT_IN_ROUNDF, "roundf", BT_FN_FLOAT_FLOAT, ATTR_CONST_NOTHROW_LEAF_LIST)
@@ -443,5 +492,5 @@
 DEF_C99_BUILTIN        (BUILT_IN_SCALBNF, "scalbnf", BT_FN_FLOAT_FLOAT_INT, ATTR_MATHFN_FPROUNDING_ERRNO)
 DEF_C99_BUILTIN        (BUILT_IN_SCALBNL, "scalbnl", BT_FN_LONGDOUBLE_LONGDOUBLE_INT, ATTR_MATHFN_FPROUNDING_ERRNO)
-DEF_EXT_LIB_BUILTIN    (BUILT_IN_SIGNBIT, "signbit", BT_FN_INT_DOUBLE, ATTR_CONST_NOTHROW_LEAF_LIST)
+DEF_EXT_LIB_BUILTIN    (BUILT_IN_SIGNBIT, "signbit", BT_FN_INT_VAR, ATTR_CONST_NOTHROW_TYPEGENERIC_LEAF)
 DEF_EXT_LIB_BUILTIN    (BUILT_IN_SIGNBITF, "signbitf", BT_FN_INT_FLOAT, ATTR_CONST_NOTHROW_LEAF_LIST)
 DEF_EXT_LIB_BUILTIN    (BUILT_IN_SIGNBITL, "signbitl", BT_FN_INT_LONGDOUBLE, ATTR_CONST_NOTHROW_LEAF_LIST)
@@ -569,20 +618,20 @@
 DEF_LIB_BUILTIN        (BUILT_IN_MEMCHR, "memchr", BT_FN_PTR_CONST_PTR_INT_SIZE, ATTR_PURE_NOTHROW_NONNULL_LEAF)
 DEF_LIB_BUILTIN        (BUILT_IN_MEMCMP, "memcmp", BT_FN_INT_CONST_PTR_CONST_PTR_SIZE, ATTR_PURE_NOTHROW_NONNULL_LEAF)
-DEF_LIB_BUILTIN        (BUILT_IN_MEMCPY, "memcpy", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF)
-DEF_LIB_BUILTIN        (BUILT_IN_MEMMOVE, "memmove", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF)
-DEF_EXT_LIB_BUILTIN    (BUILT_IN_MEMPCPY, "mempcpy", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
-DEF_LIB_BUILTIN        (BUILT_IN_MEMSET, "memset", BT_FN_PTR_PTR_INT_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF)
+DEF_LIB_BUILTIN_CHKP   (BUILT_IN_MEMCPY, "memcpy", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF)
+DEF_LIB_BUILTIN_CHKP   (BUILT_IN_MEMMOVE, "memmove", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF)
+DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_MEMPCPY, "mempcpy", BT_FN_PTR_PTR_CONST_PTR_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
+DEF_LIB_BUILTIN_CHKP   (BUILT_IN_MEMSET, "memset", BT_FN_PTR_PTR_INT_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF)
 DEF_EXT_LIB_BUILTIN    (BUILT_IN_RINDEX, "rindex", BT_FN_STRING_CONST_STRING_INT, ATTR_PURE_NOTHROW_NONNULL_LEAF)
-DEF_EXT_LIB_BUILTIN    (BUILT_IN_STPCPY, "stpcpy", BT_FN_STRING_STRING_CONST_STRING, ATTR_NOTHROW_NONNULL_LEAF)
+DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_STPCPY, "stpcpy", BT_FN_STRING_STRING_CONST_STRING, ATTR_NOTHROW_NONNULL_LEAF)
 DEF_EXT_LIB_BUILTIN    (BUILT_IN_STPNCPY, "stpncpy", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
 DEF_EXT_LIB_BUILTIN    (BUILT_IN_STRCASECMP, "strcasecmp", BT_FN_INT_CONST_STRING_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL_LEAF)
-DEF_LIB_BUILTIN        (BUILT_IN_STRCAT, "strcat", BT_FN_STRING_STRING_CONST_STRING, ATTR_NOTHROW_NONNULL_LEAF)
-DEF_LIB_BUILTIN        (BUILT_IN_STRCHR, "strchr", BT_FN_STRING_CONST_STRING_INT, ATTR_PURE_NOTHROW_NONNULL_LEAF)
+DEF_LIB_BUILTIN_CHKP   (BUILT_IN_STRCAT, "strcat", BT_FN_STRING_STRING_CONST_STRING, ATTR_NOTHROW_NONNULL_LEAF)
+DEF_LIB_BUILTIN_CHKP   (BUILT_IN_STRCHR, "strchr", BT_FN_STRING_CONST_STRING_INT, ATTR_PURE_NOTHROW_NONNULL_LEAF)
 DEF_LIB_BUILTIN        (BUILT_IN_STRCMP, "strcmp", BT_FN_INT_CONST_STRING_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL_LEAF)
-DEF_LIB_BUILTIN        (BUILT_IN_STRCPY, "strcpy", BT_FN_STRING_STRING_CONST_STRING, ATTR_RET1_NOTHROW_NONNULL_LEAF)
+DEF_LIB_BUILTIN_CHKP   (BUILT_IN_STRCPY, "strcpy", BT_FN_STRING_STRING_CONST_STRING, ATTR_RET1_NOTHROW_NONNULL_LEAF)
 DEF_LIB_BUILTIN        (BUILT_IN_STRCSPN, "strcspn", BT_FN_SIZE_CONST_STRING_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL_LEAF)
 DEF_EXT_LIB_BUILTIN    (BUILT_IN_STRDUP, "strdup", BT_FN_STRING_CONST_STRING, ATTR_MALLOC_NOTHROW_NONNULL_LEAF)
 DEF_EXT_LIB_BUILTIN    (BUILT_IN_STRNDUP, "strndup", BT_FN_STRING_CONST_STRING_SIZE, ATTR_MALLOC_NOTHROW_NONNULL_LEAF)
-DEF_LIB_BUILTIN        (BUILT_IN_STRLEN, "strlen", BT_FN_SIZE_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL_LEAF)
+DEF_LIB_BUILTIN_CHKP   (BUILT_IN_STRLEN, "strlen", BT_FN_SIZE_CONST_STRING, ATTR_PURE_NOTHROW_NONNULL_LEAF)
 DEF_EXT_LIB_BUILTIN    (BUILT_IN_STRNCASECMP, "strncasecmp", BT_FN_INT_CONST_STRING_CONST_STRING_SIZE, ATTR_PURE_NOTHROW_NONNULL_LEAF)
 DEF_LIB_BUILTIN        (BUILT_IN_STRNCAT, "strncat", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
@@ -658,6 +707,30 @@
 DEF_C94_BUILTIN        (BUILT_IN_TOWUPPER, "towupper", BT_FN_WINT_WINT, ATTR_PURE_NOTHROW_LEAF_LIST)
 
+/* Category: integer overflow checking builtins.  */
+DEF_GCC_BUILTIN        (BUILT_IN_ADD_OVERFLOW, "add_overflow", BT_FN_BOOL_VAR, ATTR_NOTHROW_TYPEGENERIC_LEAF)
+DEF_GCC_BUILTIN        (BUILT_IN_SUB_OVERFLOW, "sub_overflow", BT_FN_BOOL_VAR, ATTR_NOTHROW_TYPEGENERIC_LEAF)
+DEF_GCC_BUILTIN        (BUILT_IN_MUL_OVERFLOW, "mul_overflow", BT_FN_BOOL_VAR, ATTR_NOTHROW_TYPEGENERIC_LEAF)
+/* Clang compatibility.  */
+DEF_GCC_BUILTIN        (BUILT_IN_SADD_OVERFLOW, "sadd_overflow", BT_FN_BOOL_INT_INT_INTPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_SADDL_OVERFLOW, "saddl_overflow", BT_FN_BOOL_LONG_LONG_LONGPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_SADDLL_OVERFLOW, "saddll_overflow", BT_FN_BOOL_LONGLONG_LONGLONG_LONGLONGPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_SSUB_OVERFLOW, "ssub_overflow", BT_FN_BOOL_INT_INT_INTPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_SSUBL_OVERFLOW, "ssubl_overflow", BT_FN_BOOL_LONG_LONG_LONGPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_SSUBLL_OVERFLOW, "ssubll_overflow", BT_FN_BOOL_LONGLONG_LONGLONG_LONGLONGPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_SMUL_OVERFLOW, "smul_overflow", BT_FN_BOOL_INT_INT_INTPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_SMULL_OVERFLOW, "smull_overflow", BT_FN_BOOL_LONG_LONG_LONGPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_SMULLL_OVERFLOW, "smulll_overflow", BT_FN_BOOL_LONGLONG_LONGLONG_LONGLONGPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_UADD_OVERFLOW, "uadd_overflow", BT_FN_BOOL_UINT_UINT_UINTPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_UADDL_OVERFLOW, "uaddl_overflow", BT_FN_BOOL_ULONG_ULONG_ULONGPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_UADDLL_OVERFLOW, "uaddll_overflow", BT_FN_BOOL_ULONGLONG_ULONGLONG_ULONGLONGPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_USUB_OVERFLOW, "usub_overflow", BT_FN_BOOL_UINT_UINT_UINTPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_USUBL_OVERFLOW, "usubl_overflow", BT_FN_BOOL_ULONG_ULONG_ULONGPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_USUBLL_OVERFLOW, "usubll_overflow", BT_FN_BOOL_ULONGLONG_ULONGLONG_ULONGLONGPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_UMUL_OVERFLOW, "umul_overflow", BT_FN_BOOL_UINT_UINT_UINTPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_UMULL_OVERFLOW, "umull_overflow", BT_FN_BOOL_ULONG_ULONG_ULONGPTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GCC_BUILTIN        (BUILT_IN_UMULLL_OVERFLOW, "umulll_overflow", BT_FN_BOOL_ULONGLONG_ULONGLONG_ULONGLONGPTR, ATTR_NOTHROW_LEAF_LIST)
+
 /* Category: miscellaneous builtins.  */
-DEF_LIB_BUILTIN        (BUILT_IN_ABORT, "abort", BT_FN_VOID, ATTR_NORETURN_NOTHROW_LEAF_LIST)
+DEF_LIB_BUILTIN        (BUILT_IN_ABORT, "abort", BT_FN_VOID, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
 DEF_LIB_BUILTIN        (BUILT_IN_ABS, "abs", BT_FN_INT_INT, ATTR_CONST_NOTHROW_LEAF_LIST)
 DEF_GCC_BUILTIN        (BUILT_IN_AGGREGATE_INCOMING_ADDRESS, "aggregate_incoming_address", BT_FN_PTR_VAR, ATTR_LEAF_LIST)
@@ -794,12 +867,12 @@
 /* Object size checking builtins.  */
 DEF_GCC_BUILTIN	       (BUILT_IN_OBJECT_SIZE, "object_size", BT_FN_SIZE_CONST_PTR_INT, ATTR_PURE_NOTHROW_LEAF_LIST)
-DEF_EXT_LIB_BUILTIN    (BUILT_IN_MEMCPY_CHK, "__memcpy_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF)
-DEF_EXT_LIB_BUILTIN    (BUILT_IN_MEMMOVE_CHK, "__memmove_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF)
-DEF_EXT_LIB_BUILTIN    (BUILT_IN_MEMPCPY_CHK, "__mempcpy_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
-DEF_EXT_LIB_BUILTIN    (BUILT_IN_MEMSET_CHK, "__memset_chk", BT_FN_PTR_PTR_INT_SIZE_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
-DEF_EXT_LIB_BUILTIN    (BUILT_IN_STPCPY_CHK, "__stpcpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
+DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_MEMCPY_CHK, "__memcpy_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF)
+DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_MEMMOVE_CHK, "__memmove_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_RET1_NOTHROW_NONNULL_LEAF)
+DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_MEMPCPY_CHK, "__mempcpy_chk", BT_FN_PTR_PTR_CONST_PTR_SIZE_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
+DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_MEMSET_CHK, "__memset_chk", BT_FN_PTR_PTR_INT_SIZE_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
+DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_STPCPY_CHK, "__stpcpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
 DEF_EXT_LIB_BUILTIN    (BUILT_IN_STPNCPY_CHK, "__stpncpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
-DEF_EXT_LIB_BUILTIN    (BUILT_IN_STRCAT_CHK, "__strcat_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
-DEF_EXT_LIB_BUILTIN    (BUILT_IN_STRCPY_CHK, "__strcpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
+DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_STRCAT_CHK, "__strcat_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
+DEF_EXT_LIB_BUILTIN_CHKP (BUILT_IN_STRCPY_CHK, "__strcpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
 DEF_EXT_LIB_BUILTIN    (BUILT_IN_STRNCAT_CHK, "__strncat_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
 DEF_EXT_LIB_BUILTIN    (BUILT_IN_STRNCPY_CHK, "__strncpy_chk", BT_FN_STRING_STRING_CONST_STRING_SIZE_SIZE, ATTR_NOTHROW_NONNULL_LEAF)
@@ -854,9 +927,9 @@
 DEF_GCC_BUILTIN (BUILT_IN_LINE, "LINE", BT_FN_INT, ATTR_NOTHROW_LEAF_LIST)
 
-#if 0
 /* Synchronization Primitives.  */
 #include "sync-builtins.def"
 
-/* OpenMP builtins.  */
+#if 0
+/* Offloading and Multi Processing builtins.  */
 #include "omp-builtins.def"
 
@@ -872,3 +945,9 @@
 /* Cilk Plus builtins.  */
 #include "cilkplus.def"
+
+/* Pointer Bounds Checker builtins.  */
+#include "chkp-builtins.def"
 #endif
+
+#undef DEF_BUILTIN_CHKP
+#undef DEF_BUILTIN
Index: src/prelude/prototypes.awk
===================================================================
--- src/prelude/prototypes.awk	(revision dc99f38e2db7b4d28474d2e58f743e394a268368)
+++ src/prelude/prototypes.awk	(revision 0c82fec48a07c0a2b6d255c6384141d7fec74492)
@@ -17,54 +17,77 @@
 
 BEGIN {
-    FS = "("
+  FS = "[( )]"
     # order so string search is longest string
-    types[0]  = "UINTMAX";					vtypes[0]  = "unsigned long int"
-    types[1]  = "UINT16";					vtypes[1]  = "short int"
-    types[2]  = "UINT32";					vtypes[2]  = "int"
-    types[3]  = "UINT64";					vtypes[3]  = "long long int"
-    types[4]  = "UINT";						vtypes[4]  = "unsigned int"
-    types[5]  = "INTMAX";					vtypes[5]  = "long int"
-    types[6]  = "INTPTR";					vtypes[6]  = "int *"
-    types[7]  = "WINT";						vtypes[7]  = "unsigned int"
-    types[8]  = "INT";						vtypes[8]  = "int"
-    types[9]  = "ULONGLONG";				vtypes[9]  = "unsigned long long"
-    types[10] = "ULONG";					vtypes[10] = "unsigned long"
-    types[11] = "UNSIGNED";					vtypes[11] = "unsigned"
-    types[12] = "COMPLEX_LONGDOUBLE";		vtypes[12] = "_Complex long double"
-    types[13] = "COMPLEX_DOUBLE";			vtypes[13] = "_Complex double"
-    types[14] = "COMPLEX_FLOAT";			vtypes[14] = "_Complex float"
-    types[15] = "LONGDOUBLEPTR";			vtypes[15] = "long double *"
-    types[16] = "LONGDOUBLE";				vtypes[16] = "long double"
-    types[17] = "LONGLONG";					vtypes[17] = "long long"
-    types[18] = "LONG";						vtypes[18] = "long"
-    types[19] = "DFLOAT32";					vtypes[19] = "_Decimal32"
-    types[20] = "DFLOAT64";					vtypes[20] = "_Decimal64"
-    types[21] = "DFLOAT128";				vtypes[21] = "_Decimal128"
-    types[22] = "DOUBLEPTR";				vtypes[22] = "double *"
-    types[23] = "DOUBLE";					vtypes[23] = "double"
-    types[24] = "FLOATPTR";					vtypes[24] = "float *"
-    types[25] = "FLOAT";					vtypes[25] = "float"
-    types[26] = "CONST_PTR";				vtypes[26] = "const void *"
-    types[27] = "CONST_STRING";				vtypes[27] = "const char *"
-    types[28] = "PTR_FN_VOID_VAR_PTR_SIZE";	vtypes[28] = ""
-    types[29] = "PTR_CONST_STRING";			vtypes[29] = "char *const"
-    types[30] = "PTRMODE_PTR";				vtypes[30] = ""
-    types[31] = "PTRPTR";					vtypes[31] = "void **"
-    types[32] = "PTR";						vtypes[32] = "void *"
-    types[33] = "VOID";						vtypes[33] = "void"
-    types[34] = "STRING";					vtypes[34] = "char *"
-    types[35] = "FILEPTR";					vtypes[35] = "struct _IO_FILE *"
-    types[36] = "SIZE";						vtypes[36] = "unsigned long"
-    types[37] = "VAR";						vtypes[37] = "..."
-    types[38] = "VALIST_ARG";				vtypes[38] = "__builtin_va_list"
-    types[39] = "VALIST_REF";				vtypes[39] = "__builtin_va_list"
-    types[40] = "UNWINDWORD";				vtypes[40] = "void *"
-    types[41] = "WORD";						vtypes[41] = ""
-    types[42] = "SSIZE";					vtypes[42] = "long int"
-    types[43] = "PID";						vtypes[43] = "int"
-    N = 44
+    i=-1
+    types[i+=1] = "BOOL";						          vtypes[i] = "_Bool"
+    types[i+=1] = "UINTMAX";					        vtypes[i] = "unsigned long int"
+    types[i+=1] = "UINT16";					          vtypes[i] = "short int"
+    types[i+=1] = "UINT32";					          vtypes[i] = "int"
+    types[i+=1] = "UINT64";					          vtypes[i] = "long long int"
+    types[i+=1] = "UINT";						          vtypes[i] = "unsigned int"
+    types[i+=1] = "INTMAX";					          vtypes[i] = "long int"
+    types[i+=1] = "INTPTR";					          vtypes[i] = "int *"
+    types[i+=1] = "WINT";						          vtypes[i] = "unsigned int"
+    types[i+=1] = "INT";						          vtypes[i] = "int"
+    types[i+=1] = "ULONGLONG";				        vtypes[i] = "unsigned long long"
+    types[i+=1] = "ULONG";					          vtypes[i] = "unsigned long"
+    types[i+=1] = "UNSIGNED";					        vtypes[i] = "unsigned"
+    types[i+=1] = "COMPLEX_LONGDOUBLE";		    vtypes[i] = "_Complex long double"
+    types[i+=1] = "COMPLEX_DOUBLE";			      vtypes[i] = "_Complex double"
+    types[i+=1] = "COMPLEX_FLOAT";			      vtypes[i] = "_Complex float"
+    types[i+=1] = "LONGDOUBLEPTR";			      vtypes[i] = "long double *"
+    types[i+=1] = "LONGDOUBLE";				        vtypes[i] = "long double"
+    types[i+=1] = "LONGLONG";					        vtypes[i] = "long long"
+    types[i+=1] = "LONG";						          vtypes[i] = "long"
+    types[i+=1] = "DFLOAT32";					        vtypes[i] = "__Unsupported"
+    types[i+=1] = "DFLOAT64";					        vtypes[i] = "__Unsupported"
+    types[i+=1] = "DFLOAT128";				        vtypes[i] = "__Unsupported"
+    types[i+=1] = "DOUBLEPTR";			    	    vtypes[i] = "double *"
+    types[i+=1] = "DOUBLE";					          vtypes[i] = "double"
+    types[i+=1] = "FLOATPTR";					        vtypes[i] = "float *"
+    types[i+=1] = "FLOAT128X";						    vtypes[i] = "__Unsupported"
+    types[i+=1] = "FLOAT128";						      vtypes[i] = "__Unsupported"
+    types[i+=1] = "FLOAT64X";						      vtypes[i] = "__Unsupported"
+    types[i+=1] = "FLOAT64";						      vtypes[i] = "__Unsupported"
+    types[i+=1] = "FLOAT32X";						      vtypes[i] = "__Unsupported"
+    types[i+=1] = "FLOAT32";						      vtypes[i] = "__Unsupported"
+    types[i+=1] = "FLOAT16";						      vtypes[i] = "__Unsupported"
+    types[i+=1] = "FLOAT";					          vtypes[i] = "float"
+    types[i+=1] = "CONST_VPTR";					      vtypes[i] = "const volatile void *"
+    types[i+=1] = "CONST_PTR";				        vtypes[i] = "const void *"
+    types[i+=1] = "CONST_STRING";				      vtypes[i] = "const char *"
+    types[i+=1] = "CONST_TM_PTR";			        vtypes[i] = "const struct tm *"
+    types[i+=1] = "PTR_FN_VOID_VAR_PTR_SIZE";	vtypes[i] = ""
+    types[i+=1] = "PTR_CONST_STRING";			    vtypes[i] = "char *const"
+    types[i+=1] = "PTRMODE_PTR";				      vtypes[i] = ""
+    types[i+=1] = "PTRPTR";					          vtypes[i] = "void **"
+    types[i+=1] = "VPTR";					            vtypes[i] = "volatile void *"
+    types[i+=1] = "PTR";						          vtypes[i] = "void *"
+    types[i+=1] = "VOID";						          vtypes[i] = "void"
+    types[i+=1] = "STRING";					          vtypes[i] = "char *"
+    types[i+=1] = "FILEPTR";					        vtypes[i] = "struct _IO_FILE *"
+    types[i+=1] = "SIZE";						          vtypes[i] = "unsigned long"
+    types[i+=1] = "VAR";						          vtypes[i] = "..."
+    types[i+=1] = "VALIST_ARG";				        vtypes[i] = "__builtin_va_list"
+    types[i+=1] = "VALIST_REF";				        vtypes[i] = "__builtin_va_list"
+    types[i+=1] = "UNWINDWORD";				        vtypes[i] = "void *"
+    types[i+=1] = "WORD";						          vtypes[i] = ""
+    types[i+=1] = "SSIZE";					          vtypes[i] = "long int"
+    types[i+=1] = "PID";						          vtypes[i] = "int"
+    types[i+=1] = "I16";						          vtypes[i] = "__int128"
+    types[i+=1] = "I8";						            vtypes[i] = "long long int"
+    types[i+=1] = "I4";						            vtypes[i] = "int"
+    types[i+=1] = "I2";						            vtypes[i] = "short"
+    types[i+=1] = "I1";						            vtypes[i] = "char"
+    N = i + 1
 } # BEGIN
 
-/^BT_/ { prototypes[$1] = $1 }
+/BT_FN/ { 
+    for (i = 1; i <= NF; i++) {
+      if( match($i, "BT_FN") != 0 ) {
+        prototypes[$i] = $i
+      }
+    }
+  }
 
 END {
@@ -80,46 +103,47 @@
 
     for ( prototype in prototypes ) {
-		if ( index( "BT_LAST", prototype ) == 1 ) {
-			continue
-		} # if
+      # printf( "//\"%s\"\n", prototype )
+      if ( index( "BT_LAST", prototype ) == 1 ) {
+        continue
+      } # if
 
-		printf( "#define %s(NAME) FUNC_SIMPLE(", prototype )
+      printf( "#define %s(NAME) FUNC_SIMPLE(", prototype )
 
-		if ( sub( "BT_FN_", "", prototype ) == 0 ) {
-			printf( "\n********** BAD MACRO NAME \"%s\" **********\n", prototype )
-			exit 0
-		} # if
+      if ( sub( "BT_FN_", "", prototype ) == 0 ) {
+        printf( "\n********** BAD MACRO NAME \"%s\" **********\n", prototype )
+        exit 0
+      } # if
 
-		# generate function return type as macro
-		for ( t = 0; t < N; t += 1 ) {					# find longest match 
-			type = types[t];
-			if ( index( prototype, type ) == 1 ) {		# found match
-				printf( "BT_%s, NAME", type )
-				sub( type, "", prototype )
-				break;
-			} # if
-		} # for
+      # generate function return type as macro
+      for ( t = 0; t < N; t += 1 ) {					# find longest match 
+        type = types[t];
+        if ( index( prototype, type ) == 1 ) {		# found match
+          printf( "BT_%s, NAME", type )
+          sub( type, "", prototype )
+          break;
+        } # if
+      } # for
 
-		# generate function parameter types as macro
-		if ( index( prototype, "VAR" ) != 2 ) {			# C-style empty parameters ?
-			for ( p = 0; length( prototype ) > 0; p += 1 ) { # until all parameters types are removed
-				sub( "_", "", prototype)				# remove "_"
-				printf( ", ", type )
-				temp = prototype
-				for ( t = 0; t < N; t += 1 ) {			# find longest match
-					type = types[t];
-					if ( index( prototype, type ) == 1 ) { # found match
-						printf( "BT_%s", type )
-						sub( type, "", prototype )
-						break;
-					} # if
-				} # for
-				if ( temp == prototype ) {				# no match found for parameter in macro table
-					printf( "\n********** MISSING TYPE \"%s\" **********\n", prototype )
-					exit 0
-				} # if
-			} # for
-		} # if
-		printf( ")\n" )
+      # generate function parameter types as macro
+      if ( index( prototype, "VAR" ) != 2 ) {			# C-style empty parameters ?
+        for ( p = 0; length( prototype ) > 0; p += 1 ) { # until all parameters types are removed
+          sub( "_", "", prototype)				# remove "_"
+          printf( ", ", type )
+          temp = prototype
+          for ( t = 0; t < N; t += 1 ) {			# find longest match
+            type = types[t];
+            if ( index( prototype, type ) == 1 ) { # found match
+              printf( "BT_%s", type )
+              sub( type, "", prototype )
+              break;
+            } # if
+          } # for
+          if ( temp == prototype ) {				# no match found for parameter in macro table
+            printf( "\n********** MISSING TYPE \"%s\" **********\n", prototype )
+            exit 0
+          } # if
+        } # for
+      } # if
+      printf( ")\n" )
     } # for
 
Index: src/prelude/prototypes.sed
===================================================================
--- src/prelude/prototypes.sed	(revision dc99f38e2db7b4d28474d2e58f743e394a268368)
+++ src/prelude/prototypes.sed	(revision 0c82fec48a07c0a2b6d255c6384141d7fec74492)
@@ -1,6 +1,6 @@
-s/; /;\n/g  			#Make multi declaration lines into multiple lines
-/targetm/s/.*//
-/_Decimal/s/.*//
-s/void (const char \*)0();//	
-s/\"//g 			#Remove extraenous quotes in declarations
-s/\(__builtin_\) /\1/		#Remove extraenous spaces in declarations 
+s/; /;\n/g  				#Make multi declaration lines into multiple lines
+/targetm/s/.*//				#Remove targetm declarations
+/__Unsupported/s/.*//			#Remove Unsupported types declarations
+s/void (const char \*)0();//		#Remove void (const char \*)0();
+s/\"//g 					#Remove extraenous quotes in declarations
+/__builtin_/s/_ /_/g			#Remove extraenous spaces in declarations 
Index: src/prelude/sync-builtins.def
===================================================================
--- src/prelude/sync-builtins.def	(revision 0c82fec48a07c0a2b6d255c6384141d7fec74492)
+++ src/prelude/sync-builtins.def	(revision 0c82fec48a07c0a2b6d255c6384141d7fec74492)
@@ -0,0 +1,614 @@
+/* This file contains the definitions and documentation for the
+   synchronization builtins used in the GNU compiler.
+   Copyright (C) 2005-2016 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+/* Before including this file, you should define a macro:
+
+     DEF_SYNC_BUILTIN (ENUM, NAME, TYPE, ATTRS)
+
+   See builtins.def for details.  */
+
+/* Synchronization Primitives.  The "_N" version is the one that the user
+   is supposed to be using.  It's overloaded, and is resolved to one of the
+   "_1" through "_16" versions, plus some extra casts.  */
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_N, "__sync_fetch_and_add",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_1, "__sync_fetch_and_add_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_2, "__sync_fetch_and_add_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_4, "__sync_fetch_and_add_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_8, "__sync_fetch_and_add_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_ADD_16, "__sync_fetch_and_add_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_N, "__sync_fetch_and_sub",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_1, "__sync_fetch_and_sub_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_2, "__sync_fetch_and_sub_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_4, "__sync_fetch_and_sub_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_8, "__sync_fetch_and_sub_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_SUB_16, "__sync_fetch_and_sub_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_N, "__sync_fetch_and_or",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_1, "__sync_fetch_and_or_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_2, "__sync_fetch_and_or_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_4, "__sync_fetch_and_or_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_8, "__sync_fetch_and_or_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_OR_16, "__sync_fetch_and_or_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_N, "__sync_fetch_and_and",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_1, "__sync_fetch_and_and_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_2, "__sync_fetch_and_and_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_4, "__sync_fetch_and_and_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_8, "__sync_fetch_and_and_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_AND_16, "__sync_fetch_and_and_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_N, "__sync_fetch_and_xor",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_1, "__sync_fetch_and_xor_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_2, "__sync_fetch_and_xor_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_4, "__sync_fetch_and_xor_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_8, "__sync_fetch_and_xor_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_XOR_16, "__sync_fetch_and_xor_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_N, "__sync_fetch_and_nand",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_1, "__sync_fetch_and_nand_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_2, "__sync_fetch_and_nand_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_4, "__sync_fetch_and_nand_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_8, "__sync_fetch_and_nand_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_FETCH_AND_NAND_16, "__sync_fetch_and_nand_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_N, "__sync_add_and_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_1, "__sync_add_and_fetch_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_2, "__sync_add_and_fetch_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_4, "__sync_add_and_fetch_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_8, "__sync_add_and_fetch_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_ADD_AND_FETCH_16, "__sync_add_and_fetch_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_N, "__sync_sub_and_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_1, "__sync_sub_and_fetch_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_2, "__sync_sub_and_fetch_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_4, "__sync_sub_and_fetch_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_8, "__sync_sub_and_fetch_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SUB_AND_FETCH_16, "__sync_sub_and_fetch_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_N, "__sync_or_and_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_1, "__sync_or_and_fetch_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_2, "__sync_or_and_fetch_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_4, "__sync_or_and_fetch_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_8, "__sync_or_and_fetch_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_OR_AND_FETCH_16, "__sync_or_and_fetch_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_N, "__sync_and_and_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_1, "__sync_and_and_fetch_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_2, "__sync_and_and_fetch_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_4, "__sync_and_and_fetch_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_8, "__sync_and_and_fetch_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_AND_AND_FETCH_16, "__sync_and_and_fetch_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_N, "__sync_xor_and_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_1, "__sync_xor_and_fetch_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_2, "__sync_xor_and_fetch_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_4, "__sync_xor_and_fetch_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_8, "__sync_xor_and_fetch_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_XOR_AND_FETCH_16, "__sync_xor_and_fetch_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_N, "__sync_nand_and_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_1, "__sync_nand_and_fetch_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_2, "__sync_nand_and_fetch_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_4, "__sync_nand_and_fetch_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_8, "__sync_nand_and_fetch_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_NAND_AND_FETCH_16, "__sync_nand_and_fetch_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_N,
+		  "__sync_bool_compare_and_swap",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_1,
+		  "__sync_bool_compare_and_swap_1",
+		  BT_FN_BOOL_VPTR_I1_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_2,
+		  "__sync_bool_compare_and_swap_2",
+		  BT_FN_BOOL_VPTR_I2_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_4,
+		  "__sync_bool_compare_and_swap_4",
+		  BT_FN_BOOL_VPTR_I4_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_8,
+		  "__sync_bool_compare_and_swap_8",
+		  BT_FN_BOOL_VPTR_I8_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_16,
+		  "__sync_bool_compare_and_swap_16",
+		  BT_FN_BOOL_VPTR_I16_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_N,
+		  "__sync_val_compare_and_swap",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_1,
+		  "__sync_val_compare_and_swap_1",
+		  BT_FN_I1_VPTR_I1_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_2,
+		  "__sync_val_compare_and_swap_2",
+		  BT_FN_I2_VPTR_I2_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_4,
+		  "__sync_val_compare_and_swap_4",
+		  BT_FN_I4_VPTR_I4_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_8,
+		  "__sync_val_compare_and_swap_8",
+		  BT_FN_I8_VPTR_I8_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_16,
+		  "__sync_val_compare_and_swap_16",
+		  BT_FN_I16_VPTR_I16_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_N,
+		  "__sync_lock_test_and_set",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_1,
+		  "__sync_lock_test_and_set_1",
+		  BT_FN_I1_VPTR_I1, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_2,
+		  "__sync_lock_test_and_set_2",
+		  BT_FN_I2_VPTR_I2, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_4,
+		  "__sync_lock_test_and_set_4",
+		  BT_FN_I4_VPTR_I4, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_8,
+		  "__sync_lock_test_and_set_8",
+		  BT_FN_I8_VPTR_I8, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_TEST_AND_SET_16,
+		  "__sync_lock_test_and_set_16",
+		  BT_FN_I16_VPTR_I16, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_N, "__sync_lock_release",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_1, "__sync_lock_release_1",
+		  BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_2, "__sync_lock_release_2",
+		  BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_4, "__sync_lock_release_4",
+		  BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_8, "__sync_lock_release_8",
+		  BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_LOCK_RELEASE_16, "__sync_lock_release_16",
+		  BT_FN_VOID_VPTR, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_SYNC_SYNCHRONIZE, "__sync_synchronize",
+		  BT_FN_VOID, ATTR_NOTHROWCALL_LEAF_LIST)
+
+/* __sync* builtins for the C++ memory model.  */
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_TEST_AND_SET, "__atomic_test_and_set",
+		  BT_FN_BOOL_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_CLEAR, "__atomic_clear", BT_FN_VOID_VPTR_INT,
+		  ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE,
+		  "__atomic_exchange",
+		  BT_FN_VOID_SIZE_VPTR_PTR_PTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_N,
+		  "__atomic_exchange_n",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_1,
+		  "__atomic_exchange_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_2,
+		  "__atomic_exchange_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_4,
+		  "__atomic_exchange_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_8,
+		  "__atomic_exchange_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_EXCHANGE_16,
+		  "__atomic_exchange_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD,
+		  "__atomic_load",
+		  BT_FN_VOID_SIZE_CONST_VPTR_PTR_INT,
+		  ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_N,
+		  "__atomic_load_n",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_1,
+		  "__atomic_load_1",
+		  BT_FN_I1_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_2,
+		  "__atomic_load_2",
+		  BT_FN_I2_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_4,
+		  "__atomic_load_4",
+		  BT_FN_I4_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_8,
+		  "__atomic_load_8",
+		  BT_FN_I8_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_LOAD_16,
+		  "__atomic_load_16",
+		  BT_FN_I16_CONST_VPTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE,
+		  "__atomic_compare_exchange",
+		  BT_FN_BOOL_SIZE_VPTR_PTR_PTR_INT_INT,
+		  ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_N,
+		  "__atomic_compare_exchange_n",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_1,
+		  "__atomic_compare_exchange_1",
+		  BT_FN_BOOL_VPTR_PTR_I1_BOOL_INT_INT,
+		  ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_2,
+		  "__atomic_compare_exchange_2",
+		  BT_FN_BOOL_VPTR_PTR_I2_BOOL_INT_INT,
+		  ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_4,
+		  "__atomic_compare_exchange_4",
+		  BT_FN_BOOL_VPTR_PTR_I4_BOOL_INT_INT,
+		  ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_8,
+		  "__atomic_compare_exchange_8",
+		  BT_FN_BOOL_VPTR_PTR_I8_BOOL_INT_INT,
+		  ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_16,
+		  "__atomic_compare_exchange_16",
+		  BT_FN_BOOL_VPTR_PTR_I16_BOOL_INT_INT,
+		  ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE,
+		  "__atomic_store",
+		  BT_FN_VOID_SIZE_VPTR_PTR_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_N,
+		  "__atomic_store_n",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_1,
+		  "__atomic_store_1",
+		  BT_FN_VOID_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_2,
+		  "__atomic_store_2",
+		  BT_FN_VOID_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_4,
+		  "__atomic_store_4",
+		  BT_FN_VOID_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_8,
+		  "__atomic_store_8",
+		  BT_FN_VOID_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_STORE_16,
+		  "__atomic_store_16",
+		  BT_FN_VOID_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_N,
+		  "__atomic_add_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_1,
+		  "__atomic_add_fetch_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_2,
+		  "__atomic_add_fetch_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_4,
+		  "__atomic_add_fetch_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_8,
+		  "__atomic_add_fetch_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ADD_FETCH_16,
+		  "__atomic_add_fetch_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_N,
+		  "__atomic_sub_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_1,
+		  "__atomic_sub_fetch_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_2,
+		  "__atomic_sub_fetch_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_4,
+		  "__atomic_sub_fetch_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_8,
+		  "__atomic_sub_fetch_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SUB_FETCH_16,
+		  "__atomic_sub_fetch_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_N,
+		  "__atomic_and_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_1,
+		  "__atomic_and_fetch_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_2,
+		  "__atomic_and_fetch_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_4,
+		  "__atomic_and_fetch_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_8,
+		  "__atomic_and_fetch_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_AND_FETCH_16,
+		  "__atomic_and_fetch_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_N,
+		  "__atomic_nand_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_1,
+		  "__atomic_nand_fetch_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_2,
+		  "__atomic_nand_fetch_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_4,
+		  "__atomic_nand_fetch_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_8,
+		  "__atomic_nand_fetch_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_NAND_FETCH_16,
+		  "__atomic_nand_fetch_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_N,
+		  "__atomic_xor_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_1,
+		  "__atomic_xor_fetch_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_2,
+		  "__atomic_xor_fetch_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_4,
+		  "__atomic_xor_fetch_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_8,
+		  "__atomic_xor_fetch_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_XOR_FETCH_16,
+		  "__atomic_xor_fetch_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_N,
+		  "__atomic_or_fetch",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_1,
+		  "__atomic_or_fetch_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_2,
+		  "__atomic_or_fetch_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_4,
+		  "__atomic_or_fetch_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_8,
+		  "__atomic_or_fetch_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_OR_FETCH_16,
+		  "__atomic_or_fetch_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_N,
+		  "__atomic_fetch_add",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_1,
+		  "__atomic_fetch_add_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_2,
+		  "__atomic_fetch_add_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_4,
+		  "__atomic_fetch_add_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_8,
+		  "__atomic_fetch_add_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_ADD_16,
+		  "__atomic_fetch_add_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_N,
+		  "__atomic_fetch_sub",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_1,
+		  "__atomic_fetch_sub_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_2,
+		  "__atomic_fetch_sub_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_4,
+		  "__atomic_fetch_sub_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_8,
+		  "__atomic_fetch_sub_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_SUB_16,
+		  "__atomic_fetch_sub_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_N,
+		  "__atomic_fetch_and",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_1,
+		  "__atomic_fetch_and_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_2,
+		  "__atomic_fetch_and_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_4,
+		  "__atomic_fetch_and_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_8,
+		  "__atomic_fetch_and_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_AND_16,
+		  "__atomic_fetch_and_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_N,
+		  "__atomic_fetch_nand",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_1,
+		  "__atomic_fetch_nand_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_2,
+		  "__atomic_fetch_nand_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_4,
+		  "__atomic_fetch_nand_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_8,
+		  "__atomic_fetch_nand_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_NAND_16,
+		  "__atomic_fetch_nand_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_N,
+		  "__atomic_fetch_xor",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_1,
+		  "__atomic_fetch_xor_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_2,
+		  "__atomic_fetch_xor_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_4,
+		  "__atomic_fetch_xor_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_8,
+		  "__atomic_fetch_xor_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_XOR_16,
+		  "__atomic_fetch_xor_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_N,
+		  "__atomic_fetch_or",
+		  BT_FN_VOID_VAR, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_1,
+		  "__atomic_fetch_or_1",
+		  BT_FN_I1_VPTR_I1_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_2,
+		  "__atomic_fetch_or_2",
+		  BT_FN_I2_VPTR_I2_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_4,
+		  "__atomic_fetch_or_4",
+		  BT_FN_I4_VPTR_I4_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_8,
+		  "__atomic_fetch_or_8",
+		  BT_FN_I8_VPTR_I8_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FETCH_OR_16,
+		  "__atomic_fetch_or_16",
+		  BT_FN_I16_VPTR_I16_INT, ATTR_NOTHROWCALL_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE,
+		  "__atomic_always_lock_free",
+		  BT_FN_BOOL_SIZE_CONST_VPTR, ATTR_CONST_NOTHROW_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_IS_LOCK_FREE,
+		  "__atomic_is_lock_free",
+		  BT_FN_BOOL_SIZE_CONST_VPTR, ATTR_CONST_NOTHROW_LEAF_LIST)
+
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_THREAD_FENCE,
+		  "__atomic_thread_fence",
+		  BT_FN_VOID_INT, ATTR_NOTHROW_LEAF_LIST)
+
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_SIGNAL_FENCE,
+		  "__atomic_signal_fence",
+		  BT_FN_VOID_INT, ATTR_NOTHROW_LEAF_LIST)
+
+/* This one is actually a function in libatomic and not expected to be
+   inlined, declared here for convenience of targets generating calls
+   to it.  */
+DEF_SYNC_BUILTIN (BUILT_IN_ATOMIC_FERAISEEXCEPT,
+		  "__atomic_feraiseexcept",
+		  BT_FN_VOID_INT, ATTR_LEAF_LIST)
