diff options
author | Uros Bizjak <uros@kss-loka.si> | 2004-03-10 23:36:22 +0100 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2004-03-10 22:36:22 +0000 |
commit | a251102ea16801ffecedfd591603dbaf90a42337 (patch) | |
tree | 48496cf34ecae86ed12d904899347666a9abbfb8 /gcc/builtins.c | |
parent | 5199e2c6f14c3707ebc484f23bbc845af973f243 (diff) | |
download | gcc-a251102ea16801ffecedfd591603dbaf90a42337.zip gcc-a251102ea16801ffecedfd591603dbaf90a42337.tar.gz gcc-a251102ea16801ffecedfd591603dbaf90a42337.tar.bz2 |
optabs.h (enum optab_index): Add new OTI_exp10 and OTI_exp2.
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.
From-SVN: r79279
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 1eeedd2..daf06e8 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -1629,6 +1629,14 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget) case BUILT_IN_EXPF: case BUILT_IN_EXPL: errno_set = true; builtin_optab = exp_optab; break; + case BUILT_IN_EXP10: + case BUILT_IN_EXP10F: + case BUILT_IN_EXP10L: + errno_set = true; builtin_optab = exp10_optab; break; + case BUILT_IN_EXP2: + case BUILT_IN_EXP2F: + case BUILT_IN_EXP2L: + errno_set = true; builtin_optab = exp2_optab; break; case BUILT_IN_LOG: case BUILT_IN_LOGF: case BUILT_IN_LOGL: @@ -5107,6 +5115,12 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_EXP: case BUILT_IN_EXPF: case BUILT_IN_EXPL: + case BUILT_IN_EXP10: + case BUILT_IN_EXP10F: + case BUILT_IN_EXP10L: + case BUILT_IN_EXP2: + case BUILT_IN_EXP2F: + case BUILT_IN_EXP2L: case BUILT_IN_LOG: case BUILT_IN_LOGF: case BUILT_IN_LOGL: |