aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.h
diff options
context:
space:
mode:
authorUros Bizjak <uros@kss-loka.si>2004-05-07 07:38:21 +0200
committerUros Bizjak <uros@gcc.gnu.org>2004-05-07 07:38:21 +0200
commitc2fcfa4ff8921c33ee899529ac170da8a1628c7c (patch)
tree471a2c68d2c2564dfb50adb742590b68eb2cd647 /gcc/optabs.h
parent61af3d861bbc083c5eede0039a1a2d780b7a3124 (diff)
downloadgcc-c2fcfa4ff8921c33ee899529ac170da8a1628c7c.zip
gcc-c2fcfa4ff8921c33ee899529ac170da8a1628c7c.tar.gz
gcc-c2fcfa4ff8921c33ee899529ac170da8a1628c7c.tar.bz2
optabs.h (enum optab_index): Add new OTI_log1p.
* optabs.h (enum optab_index): Add new OTI_log1p. (log1p_optab): Define corresponding macro. * optabs.c (init_optabs): Initialize log1p_optab. * genopinit.c (optabs): Implement log1p_optab using log1p?f2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOG1P{,F,L} using log1p_optab. (expand_builtin): Expand BUILT_IN_LOG1P{,F,L} using expand_builtin_mathfn if flag_unsafe_math_optimizations is set. * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FYL2XP1. * config/i386/i386.c (ix86_emit_i387_log1p): New function. * config/i386/i386-protos.h (ix86_emit_i387_log1p): Prototype here. * config/i386/i386.md (UNSPEC_FYL2XP1): New unspec to represent x87's fyl2xp1 instruction. (*fyl2x_xf3): Rename insn definition to fyl2x_xf3. (fyl2xp1_xf3): New pattern to implement fyl2xp1 x87 instruction. (log1psf2, log1pdf2, log1pxf2): New expanders to implement log1pf, log1p and log1pl built-ins as inline x87 intrinsics. * testsuite/gcc.dg/builtins-33.c: Also check log1p*. From-SVN: r81606
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 84d8957..6fc6c17 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -178,6 +178,8 @@ enum optab_index
OTI_log10,
/* Base-2 Logarithm */
OTI_log2,
+ /* logarithm of 1 plus argument */
+ OTI_log1p,
/* Rounding functions */
OTI_floor,
OTI_ceil,
@@ -294,6 +296,7 @@ extern GTY(()) optab optab_table[OTI_MAX];
#define log_optab (optab_table[OTI_log])
#define log10_optab (optab_table[OTI_log10])
#define log2_optab (optab_table[OTI_log2])
+#define log1p_optab (optab_table[OTI_log1p])
#define floor_optab (optab_table[OTI_floor])
#define ceil_optab (optab_table[OTI_ceil])
#define btrunc_optab (optab_table[OTI_trunc])