forked from OSchip/llvm-project
Add a bunch of math builtins, #include <cmath> passes now.
llvm-svn: 82126
This commit is contained in:
parent
f96da57adb
commit
33f811e920
|
@ -62,10 +62,10 @@
|
|||
// f -> this is a libc/libm function without the '__builtin_' prefix. It can
|
||||
// be followed by ':headername:' to state which header this function
|
||||
// comes from.
|
||||
// p:N: -> this is a printf-like function whose Nth argument is the format
|
||||
// p:N: -> this is a printf-like function whose Nth argument is the format
|
||||
// string.
|
||||
// P:N: -> similar to the p:N: attribute, but the function is like vprintf
|
||||
// in that it accepts its arguments as a va_list rather than
|
||||
// in that it accepts its arguments as a va_list rather than
|
||||
// through an ellipsis
|
||||
// e -> const, but only when -fmath-errno=0
|
||||
// FIXME: gcc has nonnull
|
||||
|
@ -75,28 +75,94 @@
|
|||
#endif
|
||||
|
||||
// Standard libc/libm functions:
|
||||
BUILTIN(__builtin_atan2 , "ddd" , "nc")
|
||||
BUILTIN(__builtin_atan2f, "fff" , "nc")
|
||||
BUILTIN(__builtin_atan2l, "LdLdLd", "nc")
|
||||
BUILTIN(__builtin_abs , "ii" , "ncF")
|
||||
BUILTIN(__builtin_copysign, "ddd", "ncF")
|
||||
BUILTIN(__builtin_copysignf, "fff", "ncF")
|
||||
BUILTIN(__builtin_copysignl, "LdLdLd", "ncF")
|
||||
BUILTIN(__builtin_fabs , "dd" , "ncF")
|
||||
BUILTIN(__builtin_fabsf, "ff" , "ncF")
|
||||
BUILTIN(__builtin_fabsl, "LdLd", "ncF")
|
||||
BUILTIN(__builtin_fmod , "ddd" , "nc")
|
||||
BUILTIN(__builtin_fmodf, "fff" , "nc")
|
||||
BUILTIN(__builtin_fmodl, "LdLdLd", "nc")
|
||||
BUILTIN(__builtin_frexp , "ddi*" , "nc")
|
||||
BUILTIN(__builtin_frexpf, "ffi*" , "nc")
|
||||
BUILTIN(__builtin_frexpl, "LdLdi*", "nc")
|
||||
BUILTIN(__builtin_huge_val, "d", "nc")
|
||||
BUILTIN(__builtin_huge_valf, "f", "nc")
|
||||
BUILTIN(__builtin_huge_vall, "Ld", "nc")
|
||||
BUILTIN(__builtin_inf , "d" , "nc")
|
||||
BUILTIN(__builtin_inff , "f" , "nc")
|
||||
BUILTIN(__builtin_infl , "Ld" , "nc")
|
||||
BUILTIN(__builtin_ldexp , "ddi" , "nc")
|
||||
BUILTIN(__builtin_ldexpf, "ffi" , "nc")
|
||||
BUILTIN(__builtin_ldexpl, "LdLdi", "nc")
|
||||
BUILTIN(__builtin_modf , "ddd*" , "nc")
|
||||
BUILTIN(__builtin_modff, "fff*" , "nc")
|
||||
BUILTIN(__builtin_modfl, "LdLdLd*", "nc")
|
||||
BUILTIN(__builtin_nan, "dcC*" , "ncF")
|
||||
BUILTIN(__builtin_nanf, "fcC*" , "ncF")
|
||||
BUILTIN(__builtin_nanl, "LdcC*", "ncF")
|
||||
BUILTIN(__builtin_nans, "dcC*" , "ncF")
|
||||
BUILTIN(__builtin_nansf, "fcC*" , "ncF")
|
||||
BUILTIN(__builtin_nansl, "LdcC*", "ncF")
|
||||
BUILTIN(__builtin_abs , "ii" , "ncF")
|
||||
BUILTIN(__builtin_fabs , "dd" , "ncF")
|
||||
BUILTIN(__builtin_fabsf, "ff" , "ncF")
|
||||
BUILTIN(__builtin_fabsl, "LdLd", "ncF")
|
||||
BUILTIN(__builtin_copysign, "ddd", "ncF")
|
||||
BUILTIN(__builtin_copysignf, "fff", "ncF")
|
||||
BUILTIN(__builtin_copysignl, "LdLdLd", "ncF")
|
||||
BUILTIN(__builtin_powi , "ddi" , "nc")
|
||||
BUILTIN(__builtin_powif, "ffi" , "nc")
|
||||
BUILTIN(__builtin_powil, "LdLdi", "nc")
|
||||
BUILTIN(__builtin_pow , "ddd" , "nc")
|
||||
BUILTIN(__builtin_powf, "fff" , "nc")
|
||||
BUILTIN(__builtin_powl, "LdLdLd", "nc")
|
||||
|
||||
// Standard unary libc/libm functions with double/float/long double variants:
|
||||
BUILTIN(__builtin_acos , "dd" , "nc")
|
||||
BUILTIN(__builtin_acosf, "ff" , "nc")
|
||||
BUILTIN(__builtin_acosl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_asin , "dd" , "nc")
|
||||
BUILTIN(__builtin_asinf, "ff" , "nc")
|
||||
BUILTIN(__builtin_asinl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_atan , "dd" , "nc")
|
||||
BUILTIN(__builtin_atanf, "ff" , "nc")
|
||||
BUILTIN(__builtin_atanl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_ceil , "dd" , "nc")
|
||||
BUILTIN(__builtin_ceilf, "ff" , "nc")
|
||||
BUILTIN(__builtin_ceill, "LdLd", "nc")
|
||||
BUILTIN(__builtin_cos , "dd" , "nc")
|
||||
BUILTIN(__builtin_cosf, "ff" , "nc")
|
||||
BUILTIN(__builtin_cosh , "dd" , "nc")
|
||||
BUILTIN(__builtin_coshf, "ff" , "nc")
|
||||
BUILTIN(__builtin_coshl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_cosl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_exp , "dd" , "nc")
|
||||
BUILTIN(__builtin_expf, "ff" , "nc")
|
||||
BUILTIN(__builtin_expl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_floor , "dd" , "nc")
|
||||
BUILTIN(__builtin_floorf, "ff" , "nc")
|
||||
BUILTIN(__builtin_floorl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_log , "dd" , "nc")
|
||||
BUILTIN(__builtin_log10 , "dd" , "nc")
|
||||
BUILTIN(__builtin_log10f, "ff" , "nc")
|
||||
BUILTIN(__builtin_log10l, "LdLd", "nc")
|
||||
BUILTIN(__builtin_logf, "ff" , "nc")
|
||||
BUILTIN(__builtin_logl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_sin , "dd" , "nc")
|
||||
BUILTIN(__builtin_sinf, "ff" , "nc")
|
||||
BUILTIN(__builtin_sinh , "dd" , "nc")
|
||||
BUILTIN(__builtin_sinhf, "ff" , "nc")
|
||||
BUILTIN(__builtin_sinhl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_sinl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_sqrt , "dd" , "nc")
|
||||
BUILTIN(__builtin_sqrtf, "ff" , "nc")
|
||||
BUILTIN(__builtin_sqrtl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_tan , "dd" , "nc")
|
||||
BUILTIN(__builtin_tanf, "ff" , "nc")
|
||||
BUILTIN(__builtin_tanh , "dd" , "nc")
|
||||
BUILTIN(__builtin_tanhf, "ff" , "nc")
|
||||
BUILTIN(__builtin_tanhl, "LdLd", "nc")
|
||||
BUILTIN(__builtin_tanl, "LdLd", "nc")
|
||||
|
||||
|
||||
// FP Comparisons.
|
||||
BUILTIN(__builtin_isgreater , "i.", "nc")
|
||||
|
|
Loading…
Reference in New Issue