OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [387-9.c] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Verify that 387 fsincos instruction is generated.  */
2
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
3
/* { dg-require-effective-target ilp32 } */
4
/* { dg-options "-O -funsafe-math-optimizations -march=i686" } */
5
 
6
extern double sin (double);
7
extern double cos (double);
8
extern void sincos (double, double *, double *);
9
 
10
double f1(double x)
11
{
12
  double s, c;
13
  sincos (x, &s, &c);
14
  return s + c;
15
}
16
 
17
double f2(double x)
18
{
19
  double s, c, tmp;
20
  sincos (x, &s, &tmp);
21
  c = cos (x);
22
  return s + c;
23
}
24
 
25
double f3(double x)
26
{
27
  double s, c, tmp;
28
  sincos (x, &tmp, &c);
29
  s = sin (x);
30
  return s + c;
31
}
32
 
33
/* { dg-final { scan-assembler "fsincos" } } */
34
/* { dg-final { scan-assembler-not "fsin " } } */
35
/* { dg-final { scan-assembler-not "fcos" } } */
36
/* { dg-final { scan-assembler-not "call" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.