From b5e01d4bec0c3cb5e3881cd2f110316e1a51a27f Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Tue, 11 Feb 2003 19:34:11 +0000 Subject: optabs.h (enum optab_index): Add new OTI_pow and OTI_atan2. * optabs.h (enum optab_index): Add new OTI_pow and OTI_atan2. (pow_optab, atan2_optab): Define corresponding macros. * optabs.c (init_optabs): Initialize pow_optab and atan2_optab. * genopinit.c (optabs): Implement pow_optab and atan2_optab using pow?f3 and atan2?f3 patterns. * builtins.c (expand_errno_check): New function to update errno if necessary, split out from expand_builtin_mathfn. (expand_builtin_mathfn): Use expand_errno_check. (expand_builtin_mathfn_2): New function to handle expanding binary math functions, reusing the code in expand_errno_check. (expand_builtin): Handle the pow and atan2 math built-ins, BUILT_IN_{POW,POWF,POWL,ATAN2,ATAN2F,ATAN2L} via the new function expand_builtin_mathfn_2. * doc/md.texi: Document new pow?f3 and atan2?f3 patterns. From-SVN: r62708 --- gcc/optabs.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/optabs.h') diff --git a/gcc/optabs.h b/gcc/optabs.h index 5fda4da..e9f95fa 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -1,5 +1,5 @@ /* Definitions for code generation pass of GNU compiler. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GCC. @@ -108,6 +108,10 @@ enum optab_index OTI_umin, /* Unsigned maximum value */ OTI_umax, + /* Power */ + OTI_pow, + /* Arc tangent of y/x */ + OTI_atan2, /* Move instruction. */ OTI_mov, @@ -202,6 +206,8 @@ extern GTY(()) optab optab_table[OTI_MAX]; #define smax_optab (optab_table[OTI_smax]) #define umin_optab (optab_table[OTI_umin]) #define umax_optab (optab_table[OTI_umax]) +#define pow_optab (optab_table[OTI_pow]) +#define atan2_optab (optab_table[OTI_atan2]) #define mov_optab (optab_table[OTI_mov]) #define movstrict_optab (optab_table[OTI_movstrict]) -- cgit v1.1