| author | |
| committer | |
| log | 0dbaa8d3ae8f2892b60751d5a3c528ddb3b4fc3b |
| tree | ae8d38fd92729bbe39078db398b640c240c903d3 |
| parent | f45aac49033c1660be21301843e4aa950924899d |
2 files changed, 24 insertions(+), 12 deletions(-)
lib/zig.h+12-6| ... | ... | @@ -61,6 +61,12 @@ typedef char bool; |
| 61 | 61 | #define zig_gnuc |
| 62 | 62 | #endif |
| 63 | 63 | |
| 64 | #if defined(zig_gnuc) && (defined(__i386__) || defined(__x86_64__)) | |
| 65 | #define zig_f128_has_miscompilations 1 | |
| 66 | #else | |
| 67 | #define zig_f128_has_miscompilations 0 | |
| 68 | #endif | |
| 69 | ||
| 64 | 70 | #if _MSC_VER |
| 65 | 71 | #define zig_const_arr |
| 66 | 72 | #define zig_callconv(c) __##c |
| ... | ... | @@ -3155,22 +3161,22 @@ typedef zig_u128 zig_f80; |
| 3155 | 3161 | #define zig_has_f128 1 |
| 3156 | 3162 | #define zig_libc_name_f128(name) name##q |
| 3157 | 3163 | #define zig_init_special_f128(sign, name, arg, repr) zig_make_special_f128(sign, name, arg, repr) |
| 3158 | #if FLT_MANT_DIG == 113 | |
| 3164 | #if !zig_f128_has_miscompilations && FLT_MANT_DIG == 113 | |
| 3159 | 3165 | typedef float zig_f128; |
| 3160 | 3166 | #define zig_make_f128(fp, repr) fp##f |
| 3161 | #elif DBL_MANT_DIG == 113 | |
| 3167 | #elif !zig_f128_has_miscompilations && DBL_MANT_DIG == 113 | |
| 3162 | 3168 | typedef double zig_f128; |
| 3163 | 3169 | #define zig_make_f128(fp, repr) fp |
| 3164 | #elif LDBL_MANT_DIG == 113 | |
| 3170 | #elif !zig_f128_has_miscompilations && LDBL_MANT_DIG == 113 | |
| 3165 | 3171 | typedef long double zig_f128; |
| 3166 | 3172 | #define zig_make_f128(fp, repr) fp##l |
| 3167 | #elif FLT128_MANT_DIG == 113 | |
| 3173 | #elif !zig_f128_has_miscompilations && FLT128_MANT_DIG == 113 | |
| 3168 | 3174 | typedef _Float128 zig_f128; |
| 3169 | 3175 | #define zig_make_f128(fp, repr) fp##f128 |
| 3170 | #elif FLT64X_MANT_DIG == 113 | |
| 3176 | #elif !zig_f128_has_miscompilations && FLT64X_MANT_DIG == 113 | |
| 3171 | 3177 | typedef _Float64x zig_f128; |
| 3172 | 3178 | #define zig_make_f128(fp, repr) fp##f64x |
| 3173 | #elif defined(__SIZEOF_FLOAT128__) | |
| 3179 | #elif !zig_f128_has_miscompilations && defined(__SIZEOF_FLOAT128__) | |
| 3174 | 3180 | typedef __float128 zig_f128; |
| 3175 | 3181 | #define zig_make_f128(fp, repr) fp##q |
| 3176 | 3182 | #undef zig_make_special_f128 |
stage1/zig.h+12-6| ... | ... | @@ -61,6 +61,12 @@ typedef char bool; |
| 61 | 61 | #define zig_gnuc |
| 62 | 62 | #endif |
| 63 | 63 | |
| 64 | #if defined(zig_gnuc) && (defined(__i386__) || defined(__x86_64__)) | |
| 65 | #define zig_f128_has_miscompilations 1 | |
| 66 | #else | |
| 67 | #define zig_f128_has_miscompilations 0 | |
| 68 | #endif | |
| 69 | ||
| 64 | 70 | #if _MSC_VER |
| 65 | 71 | #define zig_const_arr |
| 66 | 72 | #define zig_callconv(c) __##c |
| ... | ... | @@ -3155,22 +3161,22 @@ typedef zig_u128 zig_f80; |
| 3155 | 3161 | #define zig_has_f128 1 |
| 3156 | 3162 | #define zig_libc_name_f128(name) name##q |
| 3157 | 3163 | #define zig_init_special_f128(sign, name, arg, repr) zig_make_special_f128(sign, name, arg, repr) |
| 3158 | #if FLT_MANT_DIG == 113 | |
| 3164 | #if !zig_f128_has_miscompilations && FLT_MANT_DIG == 113 | |
| 3159 | 3165 | typedef float zig_f128; |
| 3160 | 3166 | #define zig_make_f128(fp, repr) fp##f |
| 3161 | #elif DBL_MANT_DIG == 113 | |
| 3167 | #elif !zig_f128_has_miscompilations && DBL_MANT_DIG == 113 | |
| 3162 | 3168 | typedef double zig_f128; |
| 3163 | 3169 | #define zig_make_f128(fp, repr) fp |
| 3164 | #elif LDBL_MANT_DIG == 113 | |
| 3170 | #elif !zig_f128_has_miscompilations && LDBL_MANT_DIG == 113 | |
| 3165 | 3171 | typedef long double zig_f128; |
| 3166 | 3172 | #define zig_make_f128(fp, repr) fp##l |
| 3167 | #elif FLT128_MANT_DIG == 113 | |
| 3173 | #elif !zig_f128_has_miscompilations && FLT128_MANT_DIG == 113 | |
| 3168 | 3174 | typedef _Float128 zig_f128; |
| 3169 | 3175 | #define zig_make_f128(fp, repr) fp##f128 |
| 3170 | #elif FLT64X_MANT_DIG == 113 | |
| 3176 | #elif !zig_f128_has_miscompilations && FLT64X_MANT_DIG == 113 | |
| 3171 | 3177 | typedef _Float64x zig_f128; |
| 3172 | 3178 | #define zig_make_f128(fp, repr) fp##f64x |
| 3173 | #elif defined(__SIZEOF_FLOAT128__) | |
| 3179 | #elif !zig_f128_has_miscompilations && defined(__SIZEOF_FLOAT128__) | |
| 3174 | 3180 | typedef __float128 zig_f128; |
| 3175 | 3181 | #define zig_make_f128(fp, repr) fp##q |
| 3176 | 3182 | #undef zig_make_special_f128 |