optabs.h (enum optab_index): Add new OTI_log10 and OTI_log2.
authorUros Bizjak <uros@kss-loka.si>
Wed, 11 Feb 2004 23:39:41 +0000 (00:39 +0100)
committerRoger Sayle <sayle@gcc.gnu.org>
Wed, 11 Feb 2004 23:39:41 +0000 (23:39 +0000)
commit3b8e0c9129b0ed3fe2e4aa5bc466df5348e2d5fd
tree159c66f75d67ab22ee9d79a474ed9f6f66eab4ba
parenta6abdce327180878f4753126647b351026b2dcd0
optabs.h (enum optab_index): Add new OTI_log10 and OTI_log2.

2004-02-11  Uros Bizjak  <uros@kss-loka.si>

* optabs.h (enum optab_index): Add new OTI_log10 and OTI_log2.
(log10_optab, log2_optab): Define corresponding macros.
* optabs.c (init_optabs): Initialize log10_optab and log2_optab.
* genopinit.c (optabs): Implement log10_optab and log2_optab
using log10?f2 and log2?f2 patterns.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOG10{,F,L}
using log10_optab, and BUILT_IN_LOG2{,F,L} using log2_optab.
(expand_builtin): Expand BUILT_IN_LOG10{,F,L} and BUILT_IN_LOG2{,F,L}
using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.

* config/i386/i386.md (log10sf2, log10df2, log10xf2, log2sf2,
log2df2, log2xf2): New patterns to implement log10, log10f, log10l,
log2, log2f and log2l built-ins as inline x87 intrinsics.

* gcc.dg/builtins-33.c: New test.

From-SVN: r77675
gcc/ChangeLog
gcc/builtins.c
gcc/config/i386/i386.md
gcc/genopinit.c
gcc/optabs.c
gcc/optabs.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-33.c [new file with mode: 0644]