From: Roger Sayle Date: Sat, 31 May 2003 02:44:34 +0000 (+0000) Subject: com.c (ffecom_init_0): Define built-in functions for tan and atan. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d57f4eadb38d52767d34661cc8249486bc2adec4;p=gcc.git com.c (ffecom_init_0): Define built-in functions for tan and atan. * com.c (ffecom_init_0): Define built-in functions for tan and atan. * com-rt.def: Use then to implement g77's tan and atan intrinsics. From-SVN: r67260 --- diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 4a36cca1b53..d99773e4d2e 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,8 @@ +2003-05-30 Roger Sayle + + * com.c (ffecom_init_0): Define built-in functions for tan and atan. + * com-rt.def: Use then to implement g77's tan and atan intrinsics. + 2003-05-22 Bud Davis * com.c (ffecom_sym_transform_): Error out on unallocatable diff --git a/gcc/f/com-rt.def b/gcc/f/com-rt.def index 2ddc0fb4ff3..185aef52d05 100644 --- a/gcc/f/com-rt.def +++ b/gcc/f/com-rt.def @@ -259,7 +259,7 @@ DEFGFRT (FFECOM_gfrtDIMAG, "d_imag", FFECOM_rttypeDOUBLE_, "&e", FALSE, FALSE, F DEFGFRT (FFECOM_gfrtL_ACOS, "acos", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) DEFGFRT (FFECOM_gfrtL_ASIN, "asin", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_ATAN, "atan", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) +DEFGFRT (FFECOM_gfrtL_ATAN, "__builtin_atan", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) DEFGFRT (FFECOM_gfrtL_ATAN2, "__builtin_atan2", FFECOM_rttypeDOUBLE_, "dd", FALSE, FALSE, TRUE) DEFGFRT (FFECOM_gfrtL_COS, "__builtin_cos", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) DEFGFRT (FFECOM_gfrtL_COSH, "cosh", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) @@ -274,7 +274,7 @@ DEFGFRT (FFECOM_gfrtL_POW, "__builtin_pow", FFECOM_rttypeDOUBLE_, "dd", FALSE, F DEFGFRT (FFECOM_gfrtL_SIN, "__builtin_sin", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) DEFGFRT (FFECOM_gfrtL_SINH, "sinh", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) DEFGFRT (FFECOM_gfrtL_SQRT, "__builtin_sqrt", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) -DEFGFRT (FFECOM_gfrtL_TAN, "tan", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) +DEFGFRT (FFECOM_gfrtL_TAN, "__builtin_tan", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) DEFGFRT (FFECOM_gfrtL_TANH, "tanh", FFECOM_rttypeDOUBLE_, "d", FALSE, FALSE, TRUE) DEFGFRT (FFECOM_gfrtPOW_CI, "pow_ci", FFECOM_rttypeCOMPLEX_F2C_, "&c&i", FALSE, TRUE, FALSE) diff --git a/gcc/f/com.c b/gcc/f/com.c index 964e74ddff3..39640e2f05d 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -11753,6 +11753,13 @@ ffecom_init_0 () ffecom_tree_blockdata_type = build_function_type (void_type_node, NULL_TREE); + builtin_function ("__builtin_atanf", float_ftype_float, + BUILT_IN_ATANF, BUILT_IN_NORMAL, "atanf", NULL_TREE); + builtin_function ("__builtin_atan", double_ftype_double, + BUILT_IN_ATAN, BUILT_IN_NORMAL, "atan", NULL_TREE); + builtin_function ("__builtin_atanl", ldouble_ftype_ldouble, + BUILT_IN_ATANL, BUILT_IN_NORMAL, "atanl", NULL_TREE); + builtin_function ("__builtin_atan2f", float_ftype_float_float, BUILT_IN_ATAN2F, BUILT_IN_NORMAL, "atan2f", NULL_TREE); builtin_function ("__builtin_atan2", double_ftype_double_double, @@ -11816,6 +11823,13 @@ ffecom_init_0 () builtin_function ("__builtin_sqrtl", ldouble_ftype_ldouble, BUILT_IN_SQRTL, BUILT_IN_NORMAL, "sqrtl", NULL_TREE); + builtin_function ("__builtin_tanf", float_ftype_float, + BUILT_IN_TANF, BUILT_IN_NORMAL, "tanf", NULL_TREE); + builtin_function ("__builtin_tan", double_ftype_double, + BUILT_IN_TAN, BUILT_IN_NORMAL, "tan", NULL_TREE); + builtin_function ("__builtin_tanl", ldouble_ftype_ldouble, + BUILT_IN_TANL, BUILT_IN_NORMAL, "tanl", NULL_TREE); + pedantic_lvalues = FALSE; ffecom_f2c_make_type_ (&ffecom_f2c_integer_type_node,