aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/i386-387-2.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-05-12 02:51:40 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-05-12 02:51:40 +0000
commit358997e28a2aada18905dc8824252583116ed7df (patch)
tree152c83a01df523308adb9ade7e3ecf52d5db6386 /gcc/testsuite/gcc.dg/i386-387-2.c
parent04f3680d863dd792eb98e3490daf5cf374555ed5 (diff)
downloadgcc-358997e28a2aada18905dc8824252583116ed7df.zip
gcc-358997e28a2aada18905dc8824252583116ed7df.tar.gz
gcc-358997e28a2aada18905dc8824252583116ed7df.tar.bz2
i386.md (logsf2, [...]): New patterns to implement log, logf and logl built-ins as inline x87 intrinsics.
* config/i386/i386.md (logsf2, logdf2, logxf2, logdf2): New patterns to implement log, logf and logl built-ins as inline x87 intrinsics. (UNSPEC_FYL2X): New unspec to represent x87's "fyl2x" instruction. (*fyl2x_sfxf3, *fyl2x_dfxf3, *fyl2x_xf3, *fyl2x_tfxf3): New insn patterns for x87's "fyl2x" instruction, used by log?f2 patterns. * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FYL2X like UNSPEC_FPATAN, i.e. replaces two stack operands with single result. * gcc.dg/i386-387-1.c: Update to also test log. * gcc.dg/i386-387-2.c: Likewise. From-SVN: r66709
Diffstat (limited to 'gcc/testsuite/gcc.dg/i386-387-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/i386-387-2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/i386-387-2.c b/gcc/testsuite/gcc.dg/i386-387-2.c
index c73cb92..3bebc75 100644
--- a/gcc/testsuite/gcc.dg/i386-387-2.c
+++ b/gcc/testsuite/gcc.dg/i386-387-2.c
@@ -5,8 +5,10 @@
/* { dg-final { scan-assembler "fcos" } } */
/* { dg-final { scan-assembler "fsqrt" } } */
/* { dg-final { scan-assembler "fpatan" } } */
+/* { dg-final { scan-assembler "fyl2x" } } */
double f1(double x) { return __builtin_sin(x); }
double f2(double x) { return __builtin_cos(x); }
double f3(double x) { return __builtin_sqrt(x); }
double f4(double x, double y) { return __builtin_atan2(x,y); }
+double f5(double x) { return __builtin_log(x); }