| ... | @@ -1786,25 +1786,37 @@ typedef zig_i128 zig_f128; | ... | @@ -1786,25 +1786,37 @@ typedef zig_i128 zig_f128; |
| 1786 | #define zig_as_special_f128(sign, name, arg, repr) repr | 1786 | #define zig_as_special_f128(sign, name, arg, repr) repr |
| 1787 | #endif | 1787 | #endif |
| 1788 | | 1788 | |
| | 1789 | #define zig_has_c_longdouble 1 |
| | 1790 | #define zig_libc_name_c_longdouble(name) name##l |
| | 1791 | #define zig_as_special_c_longdouble(sign, name, arg, repr) sign __builtin_##name##l(arg) |
| | 1792 | #if !_MSC_VER // TODO: Is there a better way to detect this is just double? |
| | 1793 | typedef long double zig_c_longdouble; |
| | 1794 | #define zig_as_c_longdouble(fp, repr) fp##l |
| | 1795 | #else |
| | 1796 | #undef zig_has_c_longdouble |
| | 1797 | #define zig_has_c_longdouble 0 |
| | 1798 | #define zig_repr_c_longdouble i128 |
| | 1799 | #define zig_bitSizeOf_c_longdouble 128 |
| | 1800 | typedef zig_i128 zig_c_longdouble; |
| | 1801 | #define zig_as_c_longdouble(fp, repr) repr |
| | 1802 | #undef zig_as_special_c_longdouble |
| | 1803 | #define zig_as_special_c_longdouble(sign, name, arg, repr) repr |
| | 1804 | #endif |
| | 1805 | |
| 1789 | #define zig_cast_f16 (zig_f16) | 1806 | #define zig_cast_f16 (zig_f16) |
| 1790 | #define zig_cast_f32 (zig_f32) | 1807 | #define zig_cast_f32 (zig_f32) |
| 1791 | #define zig_cast_f64 (zig_f64) | 1808 | #define zig_cast_f64 (zig_f64) |
| 1792 | #define zig_cast_c_longdouble (zig_c_longdouble) | | |
| 1793 | | 1809 | |
| 1794 | #if _MSC_VER && !zig_has_f128 | 1810 | #if _MSC_VER && !zig_has_f128 |
| 1795 | #define zig_cast_f80 | 1811 | #define zig_cast_f80 |
| | 1812 | #define zig_cast_c_longdouble |
| 1796 | #define zig_cast_f128 | 1813 | #define zig_cast_f128 |
| 1797 | #else | 1814 | #else |
| 1798 | #define zig_cast_f80 (zig_f80) | 1815 | #define zig_cast_f80 (zig_f80) |
| | 1816 | #define zig_cast_c_longdouble (zig_c_longdouble) |
| 1799 | #define zig_cast_f128 (zig_f128) | 1817 | #define zig_cast_f128 (zig_f128) |
| 1800 | #endif | 1818 | #endif |
| 1801 | | 1819 | |
| 1802 | #define zig_has_c_longdouble 1 | | |
| 1803 | typedef long double zig_c_longdouble; | | |
| 1804 | #define zig_as_c_longdouble(fp, repr) fp##l | | |
| 1805 | #define zig_libc_name_c_longdouble(name) name##l | | |
| 1806 | #define zig_as_special_c_longdouble(sign, name, arg, repr) sign __builtin_##name##l(arg) | | |
| 1807 | | | |
| 1808 | #define zig_convert_builtin(ResType, operation, ArgType, version) \ | 1820 | #define zig_convert_builtin(ResType, operation, ArgType, version) \ |
| 1809 | zig_extern zig_##ResType zig_expand_concat(zig_expand_concat(zig_expand_concat(__##operation, \ | 1821 | zig_extern zig_##ResType zig_expand_concat(zig_expand_concat(zig_expand_concat(__##operation, \ |
| 1810 | zig_compiler_rt_abbrev_##ArgType), zig_compiler_rt_abbrev_##ResType), version)(zig_##ArgType); | 1822 | zig_compiler_rt_abbrev_##ArgType), zig_compiler_rt_abbrev_##ResType), version)(zig_##ArgType); |