Rename _bsr/_bsf to bsr/bsf

Now that these functions are behind _COSMO_SOURCE there's no reason for
having the ugly underscore anymore. To use these functions, you need to
pass -mcosmo to cosmocc.
This commit is contained in:
Justine Tunney 2024-03-04 17:33:26 -08:00
parent a6baba1b07
commit 8bfd56b59e
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
53 changed files with 110 additions and 93 deletions

View file

@ -18,12 +18,14 @@
#if 1
template <bool _P, typename _T, typename _U>
struct __cxx_choose_expr {
__cxx_choose_expr(_T _a, _U _b) : _value(_a) {}
__cxx_choose_expr(_T _a, _U _b) : _value(_a) {
}
const _T _value;
};
template <typename _T, typename _U>
struct __cxx_choose_expr<false, _T, _U> {
__cxx_choose_expr(_T _a, _U _b) : _value(_b) {}
__cxx_choose_expr(_T _a, _U _b) : _value(_b) {
}
const _U _value;
};
#define __builtin_choose_expr(X, A, B) \
@ -32,3 +34,8 @@ struct __cxx_choose_expr<false, _T, _U> {
#define __builtin_choose_expr(X, A, B) ((X) ? (A) : (B))
#endif
#endif
#ifdef __aarch64__
/* todo jart whyyyy */
#define _Float16 __fp16
#endif