diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-07 05:38:21 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-07 05:38:21 +0000 |
commit | f474cd93a740e70d615b025d4d43a46b88fd004d (patch) | |
tree | 471a2c68d2c2564dfb50adb742590b68eb2cd647 /gcc/testsuite/gcc.dg/builtins-33.c | |
parent | f3eb378c9d8ad1697c9c0ea776b82824b326cab9 (diff) | |
download | gcc-f474cd93a740e70d615b025d4d43a46b88fd004d.tar.gz |
* 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*.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81606 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/builtins-33.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-33.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/builtins-33.c b/gcc/testsuite/gcc.dg/builtins-33.c index 758978f0600..11393e30089 100644 --- a/gcc/testsuite/gcc.dg/builtins-33.c +++ b/gcc/testsuite/gcc.dg/builtins-33.c @@ -10,10 +10,13 @@ extern double log10(double); extern double log2(double); +extern double log1p(double); extern float log10f(float); extern float log2f(float); +extern float log1pf(float); extern long double log10l(long double); extern long double log2l(long double); +extern long double log1pl(long double); double test1(double x) @@ -26,6 +29,11 @@ double test2(double x) return log2(x); } +double test3(double x) +{ + return log1p(x); +} + float test1f(float x) { return log10f(x); @@ -36,6 +44,11 @@ float test2f(float x) return log2f(x); } +float test3f(float x) +{ + return log1pf(x); +} + long double test1l(long double x) { return log10l(x); @@ -46,3 +59,7 @@ long double test2l(long double x) return log2l(x); } +long double test3l(long double x) +{ + return log1pl(x); +} |