From c94a75af08ce77997d7566d5fcca097ca177a97f Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sat, 12 Feb 2005 12:34:24 +0100 Subject: optabs.h (enum optab_index): Add new OTI_ldexp. * optabs.h (enum optab_index): Add new OTI_ldexp. (ldexp_optab): Define corresponding macro. * optabs.c (init_optabs): Initialize ldexp_optab. * genopinit.c (optabs): Implement ldexp_optab using ldexp?f3 patterns. * builtins.c (expand_builtin_mathfn_2): Handle BUILT_IN_LDEXP{,F,L} using ldexp_optab. (expand_builtin): Expand BUILT_IN_LDEXP{,F,L} using expand_builtin_mathfn_2 if flag_unsafe_math_optimizations is set. * config/i386/i386.md (ldexpsf3, ldexpdf3, ldexpxf3): New expanders to implement ldexpf, ldexp and ldexpl built-ins as inline x87 intrinsics. testsuite: * gcc.dg/builtins-34.c: Also check ldexp*. From-SVN: r94931 --- gcc/optabs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/optabs.h') diff --git a/gcc/optabs.h b/gcc/optabs.h index 621136b..e0a7985 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -171,6 +171,8 @@ enum optab_index OTI_exp2, /* Exponential - 1*/ OTI_expm1, + /* Load exponent of a floating point number */ + OTI_ldexp, /* Radix-independent exponent */ OTI_logb, OTI_ilogb, @@ -302,6 +304,7 @@ extern GTY(()) optab optab_table[OTI_MAX]; #define exp10_optab (optab_table[OTI_exp10]) #define exp2_optab (optab_table[OTI_exp2]) #define expm1_optab (optab_table[OTI_expm1]) +#define ldexp_optab (optab_table[OTI_ldexp]) #define logb_optab (optab_table[OTI_logb]) #define ilogb_optab (optab_table[OTI_ilogb]) #define log_optab (optab_table[OTI_log]) -- cgit v1.1