diff options
author | Uros Bizjak <uros@kss-loka.si> | 2004-04-15 04:43:46 +0200 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2004-04-15 02:43:46 +0000 |
commit | 88b28a31c004852530ec02c42a5893c3090a394c (patch) | |
tree | a547f0ea372bc9cb69e8d7bac590390b63bae146 /gcc/optabs.h | |
parent | 2aa01719a5e9edfec61575b30364c9271592572a (diff) | |
download | gcc-88b28a31c004852530ec02c42a5893c3090a394c.zip gcc-88b28a31c004852530ec02c42a5893c3090a394c.tar.gz gcc-88b28a31c004852530ec02c42a5893c3090a394c.tar.bz2 |
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
Diffstat (limited to 'gcc/optabs.h')
-rw-r--r-- | gcc/optabs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/optabs.h b/gcc/optabs.h index 524cb67..16caa18 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -160,6 +160,9 @@ enum optab_index OTI_exp10, /* Base-2 Exponential */ OTI_exp2, + /* Radix-independent exponent */ + OTI_logb, + OTI_ilogb, /* Natural Logarithm */ OTI_log, /* Base-10 Logarithm */ @@ -272,6 +275,8 @@ extern GTY(()) optab optab_table[OTI_MAX]; #define exp_optab (optab_table[OTI_exp]) #define exp10_optab (optab_table[OTI_exp10]) #define exp2_optab (optab_table[OTI_exp2]) +#define logb_optab (optab_table[OTI_logb]) +#define ilogb_optab (optab_table[OTI_ilogb]) #define log_optab (optab_table[OTI_log]) #define log10_optab (optab_table[OTI_log10]) #define log2_optab (optab_table[OTI_log2]) |