[cfe-commits] r82126 - /cfe/trunk/include/clang/Basic/Builtins.def
Daniel Dunbar
daniel at zuster.org
Wed Sep 16 22:45:52 PDT 2009
Author: ddunbar
Date: Thu Sep 17 00:45:52 2009
New Revision: 82126
URL: http://llvm.org/viewvc/llvm-project?rev=82126&view=rev
Log:
Add a bunch of math builtins, #include <cmath> passes now.
Modified:
cfe/trunk/include/clang/Basic/Builtins.def
Modified: cfe/trunk/include/clang/Basic/Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Builtins.def?rev=82126&r1=82125&r2=82126&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Builtins.def (original)
+++ cfe/trunk/include/clang/Basic/Builtins.def Thu Sep 17 00:45:52 2009
@@ -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")
More information about the cfe-commits
mailing list