]> gcc.gnu.org Git - gcc.git/commit
optabs.h (enum optab_index): Add new OTI_logb and OTI_ilogb.
authorUros Bizjak <uros@kss-loka.si>
Thu, 15 Apr 2004 02:43:46 +0000 (04:43 +0200)
committerRoger Sayle <sayle@gcc.gnu.org>
Thu, 15 Apr 2004 02:43:46 +0000 (02:43 +0000)
commit88b28a31c004852530ec02c42a5893c3090a394c
treea547f0ea372bc9cb69e8d7bac590390b63bae146
parent2aa01719a5e9edfec61575b30364c9271592572a
optabs.h (enum optab_index): Add new OTI_logb and OTI_ilogb.

2004-04-14  Uros Bizjak  <uros@kss-loka.si>

* optabs.h (enum optab_index): Add new OTI_logb and OTI_ilogb.
(logb_optab, ilogb_optab): Define corresponding macros.
* optabs.c (init_optabs): Initialize logb_optab and ilogb_optab.
* genopinit.c (optabs): Implement logb_optab and ilogb_optab
using logb?f2 and ilogb?i2 patterns.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOGB{,F,L}
using logb_optab, and BUILT_IN_ILOGB{,F,L} using ilogb_optab.
(expand_builtin): Expand BUILT_IN_LOGB{,F,L} and BUILT_IN_ILOGB{,F,L}
using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.

* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_XTRACT_FRACT
and UNSPEC_XTRACT_EXP.

* config/i386/i386.md (*fxtractdf3, *fxtractsf3, *fxtractxf3): New
patterns to implement fxtract x87 instruction.
(logbdf2, logbsf2, logbxf2, ilogbsi2): New expanders to implement
logb, logbf, logbl, ilogb, ilogbf and ilogbl built-ins as inline x87
intrinsics.
(UNSPEC_XTRACT_FRACT, UNSPEC_XTRACT_EXP): New unspecs to represent
x87's fxtract insn.

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

From-SVN: r80709
gcc/ChangeLog
gcc/builtins.c
gcc/config/i386/i386.md
gcc/genopinit.c
gcc/optabs.c
gcc/optabs.h
gcc/reg-stack.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-38.c [new file with mode: 0644]
This page took 0.059198 seconds and 5 git commands to generate.