diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-23 20:45:40 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-23 20:45:40 +0000 |
commit | a2246f842a13f81354a7d4469fc688e8e6bf35d5 (patch) | |
tree | 2d249c1630830eb3302bb11242b3adef2ac554a9 /gcc/builtins.def | |
parent | 59fbfc4a2c74134b697a308a92882c5826f1e1e9 (diff) | |
download | gcc-a2246f842a13f81354a7d4469fc688e8e6bf35d5.tar.gz |
* builtins.def: Defome atan, atanf, atanl, tan, tanf and tanl
builtin functions (and their __builtin_* variants).
* builtins.c (mathfn_built_in): Handle tan{,f,l} and atan{,f,l}.
(expand_builtin): Don't expand tan{,f,l} or atan{,f,l} when not
optimizing.
* doc/extend.texi: Document new tan and atan builtins, and
their float and long double variants.
* gcc.dg/builtins-1.c: Add tests for tan and atan.
* gcc.dg/builtins-4.c: Add test for fmod.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67137 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.def')
-rw-r--r-- | gcc/builtins.def | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/builtins.def b/gcc/builtins.def index a45641cf0ae..1a09d6fd26b 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -495,6 +495,16 @@ DEF_LIB_BUILTIN(BUILT_IN_LOG, : (flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST : ATTR_PURE_NOTHROW_LIST)) +DEF_LIB_BUILTIN(BUILT_IN_TAN, + "__builtin_tan", + BT_FN_DOUBLE_DOUBLE, + flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST + : ATTR_PURE_NOTHROW_LIST) +DEF_LIB_BUILTIN(BUILT_IN_ATAN, + "__builtin_atan", + BT_FN_DOUBLE_DOUBLE, + flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST + : ATTR_PURE_NOTHROW_LIST) DEF_LIB_BUILTIN(BUILT_IN_POW, "__builtin_pow", BT_FN_DOUBLE_DOUBLE_DOUBLE, @@ -547,6 +557,16 @@ DEF_C99_C90RES_BUILTIN(BUILT_IN_LOGF, : (flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST : ATTR_PURE_NOTHROW_LIST)) +DEF_C99_C90RES_BUILTIN(BUILT_IN_TANF, + "__builtin_tanf", + BT_FN_FLOAT_FLOAT, + flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST + : ATTR_PURE_NOTHROW_LIST) +DEF_C99_C90RES_BUILTIN(BUILT_IN_ATANF, + "__builtin_atanf", + BT_FN_FLOAT_FLOAT, + flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST + : ATTR_PURE_NOTHROW_LIST) DEF_C99_C90RES_BUILTIN(BUILT_IN_POWF, "__builtin_powf", BT_FN_FLOAT_FLOAT_FLOAT, @@ -599,6 +619,16 @@ DEF_C99_C90RES_BUILTIN(BUILT_IN_LOGL, : (flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST : ATTR_PURE_NOTHROW_LIST)) +DEF_C99_C90RES_BUILTIN(BUILT_IN_TANL, + "__builtin_tanl", + BT_FN_LONG_DOUBLE_LONG_DOUBLE, + flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST + : ATTR_PURE_NOTHROW_LIST) +DEF_C99_C90RES_BUILTIN(BUILT_IN_ATANL, + "__builtin_atanl", + BT_FN_LONG_DOUBLE_LONG_DOUBLE, + flag_unsafe_math_optimizations ? ATTR_CONST_NOTHROW_LIST + : ATTR_PURE_NOTHROW_LIST) DEF_C99_C90RES_BUILTIN(BUILT_IN_POWL, "__builtin_powl", BT_FN_LONG_DOUBLE_LONG_DOUBLE_LONG_DOUBLE, |