aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.h
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2007-02-20 14:33:51 +0100
committerUros Bizjak <uros@gcc.gnu.org>2007-02-20 14:33:51 +0100
commit0c0d910d23a3b8533fe11c98b10b19f5e79b446e (patch)
tree95fa0014104dcb6887115c27e24a726801ecd2a0 /gcc/optabs.h
parentd9f646e4b9df9983fdedd151af4065008ef3bd51 (diff)
downloadgcc-0c0d910d23a3b8533fe11c98b10b19f5e79b446e.zip
gcc-0c0d910d23a3b8533fe11c98b10b19f5e79b446e.tar.gz
gcc-0c0d910d23a3b8533fe11c98b10b19f5e79b446e.tar.bz2
optabs.h (enum optab_index): Add new OTI_scalb.
* 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. From-SVN: r122162
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 d3cfd74..0f8c796 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])