From 82d397c79441ac025ab58fb8a5163f45dbcf4523 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Mon, 16 Jun 2003 12:53:16 +0000 Subject: optabs.h (enum optab_index): Add new OTI_tan and OTI_atan. * optabs.h (enum optab_index): Add new OTI_tan and OTI_atan. (tan_optab, atan_optab): Define corresponding macros. * optabs.c (init_optabs): Initialize tan_optab and atan_optab. * genopinit.c (optabs): Implement tan_optab and atan_optab using tan?f2 and atan?f2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_TAN{,F,L} using tan_optab, and BUILT_IN_ATAN{,F,L} using atan_optab. Change the default value of errno_set to false. (expand_builtin): Expand BUILT_IN_TAN{,F,L} and BUILT_IN_ATAN{,F,L} using expand_builtin_mathfn. * config/i386/i386.md (atansf2, atandf2, atanxf2, atantf2): New expander patterns implemented using existing atan2?f3 patterns. * gcc.dg/i386-387-5.c: New test case. * gcc.dg/i386-387-6.c: New test case. * gcc.dg/builtins-23.c: New test case. From-SVN: r68013 --- gcc/optabs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/optabs.h') diff --git a/gcc/optabs.h b/gcc/optabs.h index 22e2422ccd1..0c04a9d1b49 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -149,6 +149,10 @@ enum optab_index OTI_trunc, OTI_round, OTI_nearbyint, + /* Tangent */ + OTI_tan, + /* Inverse tangent */ + OTI_atan, /* Compare insn; two operands. */ OTI_cmp, @@ -232,6 +236,8 @@ extern GTY(()) optab optab_table[OTI_MAX]; #define trunc_optab (optab_table[OTI_trunc]) #define round_optab (optab_table[OTI_round]) #define nearbyint_optab (optab_table[OTI_nearbyint]) +#define tan_optab (optab_table[OTI_tan]) +#define atan_optab (optab_table[OTI_atan]) #define cmp_optab (optab_table[OTI_cmp]) #define ucmp_optab (optab_table[OTI_ucmp]) -- cgit v1.2.1