diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-10 22:36:22 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-10 22:36:22 +0000 |
commit | 750ef9f5f365fb0a5b4fb55b86c02b9f9390eac4 (patch) | |
tree | 48496cf34ecae86ed12d904899347666a9abbfb8 /gcc/optabs.h | |
parent | 2a4b7d44e3917eb3a6c5c545e840e6399858008e (diff) | |
download | gcc-750ef9f5f365fb0a5b4fb55b86c02b9f9390eac4.tar.gz |
2004-03-10 Uros Bizjak <uros@kss-loka.si>
* optabs.h (enum optab_index): Add new OTI_exp10 and OTI_exp2.
(exp10_optab, exp2_optab): Define corresponding macros.
* optabs.c (init_optabs): Initialize exp10_optab and exp2_optab.
* genopinit.c (optabs): Implement exp10_optab and exp2_optab
using exp10?f2 and exp2?f2 patterns.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXP10{,F,L}
using exp10_optab, and BUILT_IN_EXP2{,F,L} using exp2_optab.
(expand_builtin): Expand BUILT_IN_EXP10{,F,L} and BUILT_IN_EXP2{,F,L}
using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
* config/i386/i386.md (exp10sf2, exp10df2, exp10xf2, exp2sf2,
exp2df2, exp2xf2): New patterns to implement exp10, exp10f, exp10l,
exp2, exp2f and exp2l built-ins as inline x87 intrinsics.
* gcc.dg/builtins-34.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79279 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.h')
-rw-r--r-- | gcc/optabs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/optabs.h b/gcc/optabs.h index 496ba1a6fc8..765e169cb46 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -154,6 +154,10 @@ enum optab_index OTI_cos, /* Exponential */ OTI_exp, + /* Base-10 Exponential */ + OTI_exp10, + /* Base-2 Exponential */ + OTI_exp2, /* Natural Logarithm */ OTI_log, /* Base-10 Logarithm */ @@ -263,6 +267,8 @@ extern GTY(()) optab optab_table[OTI_MAX]; #define sin_optab (optab_table[OTI_sin]) #define cos_optab (optab_table[OTI_cos]) #define exp_optab (optab_table[OTI_exp]) +#define exp10_optab (optab_table[OTI_exp10]) +#define exp2_optab (optab_table[OTI_exp2]) #define log_optab (optab_table[OTI_log]) #define log10_optab (optab_table[OTI_log10]) #define log2_optab (optab_table[OTI_log2]) |