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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [387-9.c] - Blame information for rev 724

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

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