github.com/gotranspile/cxgo@v0.3.7/gcc.go (about) 1 package cxgo 2 3 import "github.com/gotranspile/cxgo/libs" 4 5 const gccPredefine = ` 6 #include <` + libs.BuiltinH + `> 7 8 #define __asm asm 9 #define __attribute(x) 10 #define __attribute__(x) 11 #define __builtin___memcpy_chk(x, y, z, t) __BUILTIN___MEMCPY_CHK() 12 #define __builtin___memset_chk(x, y, z, ...) __BUILTIN___MEMSET_CHK() 13 #define __builtin_alloca(x) __BUILTIN_ALLOCA() 14 #define __builtin_classify_type(x) __BUILTIN_CLASSIFY_TYPE() 15 #define __builtin_constant_p(exp) __BUILTIN_CONSTANT_P() 16 #define __builtin_isgreater(x, y) __BUILTIN_ISGREATER() 17 #define __builtin_isless(x, y) __BUILTIN_ISLESS() 18 #define __builtin_isunordered(x, y) __BUILTIN_ISUNORDERED() 19 #define __builtin_longjmp(x, y) __BUILTIN_LONGJMP() 20 #define __builtin_mempcpy(x, y, z) __BUILTIN_MEMPCPY() 21 #define __builtin_mul_overflow(a, b, c) __BUILTIN_MUL_OVERFLOW() 22 #define __builtin_signbit(x) __BUILTIN_SIGNBIT() 23 #define __complex _Complex 24 #define __complex__ _Complex 25 #define __const 26 #define __extension__ 27 #define __imag__ 28 #define __inline inline 29 #define __real(x) __REAL() 30 #define __real__ 31 #define __restrict 32 #define __sync_val_compare_and_swap(x, y, z, ...) __SYNC_VAL_COMPARE_AND_SWAP() 33 #define __typeof typeof 34 #define __volatile volatile 35 %[1]v __builtin_object_size (void*, int); 36 %[1]v __builtin_strlen(char*); 37 %[1]v __builtin_strspn(char*, char*); 38 _Bool __BUILTIN_MUL_OVERFLOW(); 39 char* __builtin___stpcpy_chk(char*, char*, %[1]v); 40 char* __builtin_stpcpy(char*, char*); 41 char* __builtin_strchr(char*, int); 42 char* __builtin_strdup(char*); 43 char* __builtin_strncpy(char*, char*, %[1]v); 44 //double _Complex __builtin_cpow(double _Complex, _Complex double); 45 double __REAL(); 46 double __builtin_copysign(double, double); 47 double __builtin_copysignl(long double, long double); 48 double __builtin_inff(); 49 double __builtin_modf(double, double*); 50 double __builtin_modfl(long double, long double*); 51 double __builtin_nanf(char *); 52 //float _Complex __builtin_conjf(float _Complex); 53 float __builtin_ceilf(float); 54 float __builtin_copysignf(float, float); 55 float __builtin_modff(float, float*); 56 int __BUILTIN_CLASSIFY_TYPE(); 57 int __BUILTIN_CONSTANT_P(); 58 int __BUILTIN_ISGREATER(); 59 int __BUILTIN_ISLESS(); 60 int __BUILTIN_ISUNORDERED(); 61 int __BUILTIN_SIGNBIT(); 62 int __builtin___snprintf_chk (char*, %[1]v, int, %[1]v, char*, ...); 63 int __builtin___sprintf_chk (char*, int, %[1]v, char*, ...); 64 int __builtin___vsnprintf_chk (char*, %[1]v, int, %[1]v, char*, void*); 65 int __builtin___vsprintf_chk (char*, int, %[1]v, char*, void*); 66 int __builtin_abs(int); 67 int __builtin_clrsb(int); 68 int __builtin_clrsbl(long); 69 int __builtin_clrsbll(long long); 70 int __builtin_clz(unsigned int); 71 int __builtin_clzl(unsigned long); 72 int __builtin_clzll(unsigned long long); 73 int __builtin_constant_p (exp); 74 int __builtin_ctz(unsigned int x); 75 int __builtin_ctzl(unsigned long); 76 int __builtin_ctzll(unsigned long long); 77 int __builtin_ffs(int); 78 int __builtin_ffsl(long); 79 int __builtin_ffsll(long long); 80 int __builtin_isinf(double); 81 int __builtin_isinff(float); 82 int __builtin_isinfl(long double); 83 int __builtin_memcmp(void*, void*, %[1]v); 84 int __builtin_parity (unsigned); 85 int __builtin_parityl(unsigned long); 86 int __builtin_parityll (unsigned long long); 87 int __builtin_popcount (unsigned int x); 88 int __builtin_popcountl (unsigned long); 89 int __builtin_popcountll (unsigned long long); 90 int __builtin_puts(char*); 91 int __builtin_setjmp(void*); 92 int __builtin_strcmp(char*, char*); 93 int __builtin_strncmp(char*, char*, %[1]v); 94 long long strlen (char*); 95 unsigned __builtin_bswap32 (unsigned x); 96 unsigned long long __builtin_bswap64 (unsigned long long x); 97 unsigned short __builtin_bswap16 (unsigned short x); 98 void __BUILTIN_LONGJMP(); 99 void __SYNC_VAL_COMPARE_AND_SWAP(); 100 void __builtin_bcopy(void*, void*, %[1]v); 101 void __builtin_bzero(void*, %[1]v); 102 void __builtin_prefetch (void*, ...); 103 void __builtin_stack_restore(void*); 104 void __builtin_unwind_init(); 105 void* __BUILTIN_ALLOCA(); 106 void* __BUILTIN_MEMPCPY(); 107 void* __BUILTIN___MEMCPY_CHK(); 108 void* __BUILTIN___MEMSET_CHK(); 109 void* __builtin_alloca(int); 110 void* __builtin_apply (void (*)(), void*, %[1]v); 111 void* __builtin_apply_args(); 112 void* __builtin_extract_return_addr(void *); 113 void* __builtin_frame_address(unsigned int); 114 void* __builtin_return_address (unsigned int); 115 void* __builtin_stack_save(); 116 `