summaryrefslogtreecommitdiff
path: root/gcc/optabs.h
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-20 13:33:51 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-20 13:33:51 +0000
commit73a954a137a4ad3aff3c816a4a401887669ab5f7 (patch)
tree95fa0014104dcb6887115c27e24a726801ecd2a0 /gcc/optabs.h
parent19636773804cc810ffb5dec03069184ff71404bc (diff)
downloadgcc-73a954a137a4ad3aff3c816a4a401887669ab5f7.tar.gz
* optabs.h (enum optab_index): Add new OTI_scalb.
(scalb_optab): Define corresponding macro. * optabs.c (init_optabs): Initialize scalb_optab. * genopinit.c (optabs): Implement scalb_optab using scalb?f3 patterns. * builtins.c (expand_builtin_mathfn_2, expand_builtin): Handle BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L} and BUILT_IN_SCALBLN{,F,L}. (expand_builtin): Expand BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L} and BUILT_IN_SCALBLN{,F,L} using expand_builtin_mathfn_2 if flag_unsafe_math_optimizations is set. * config/i386/i386.md (scalbxf3, scalb<mode>3): New expanders to implement scalbf, scalb and scalbl built-ins as inline x87 intrinsics. testsuite/ChangeLog * gcc.dg/builtins-34.c: Add scalb/scalbn/scalbln cases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122162 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.h')
-rw-r--r--gcc/optabs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/optabs.h b/gcc/optabs.h
index d3cfd742136..0f8c7966809 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -179,6 +179,8 @@ enum optab_index
OTI_expm1,
/* Load exponent of a floating point number */
OTI_ldexp,
+ /* Multiply floating-point number by integral power of radix */
+ OTI_scalb,
/* Radix-independent exponent */
OTI_logb,
OTI_ilogb,
@@ -357,6 +359,7 @@ extern GTY(()) optab optab_table[OTI_MAX];
#define exp2_optab (optab_table[OTI_exp2])
#define expm1_optab (optab_table[OTI_expm1])
#define ldexp_optab (optab_table[OTI_ldexp])
+#define scalb_optab (optab_table[OTI_scalb])
#define logb_optab (optab_table[OTI_logb])
#define ilogb_optab (optab_table[OTI_ilogb])
#define log_optab (optab_table[OTI_log])