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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [calleesave-sse.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-fno-omit-frame-pointer" } */
3
 
4
#define alloca __builtin_alloca
5
extern void abort (void);
6
 
7
__attribute__ ((noinline)) static double
8
bar (double a, double b, double c, double d, char *h)
9
{
10
  *h = 0;
11
  return a * b + b + c;
12
}
13
 
14
__attribute__ ((noinline)) static int
15
boo (double a, double b, double c, double d)
16
{
17
  return c * b + a + b;
18
}
19
 
20
__attribute__ ((noinline)) static double
21
foo (double a, double b, double c, double d)
22
{
23
 int aa = boo (b, c, d, a);
24
 return bar (a, b, c, d, (char *) alloca (aa))
25
        + bar (d, c, b, a, (char *) alloca (aa));
26
}
27
 
28
int main ()
29
{
30
  double a = 2.0, b = 3.0, c = 4.0, d = 5.0;
31
  double r1, r2;
32
  int aa;
33
 
34
  aa = boo (b, c, d, a);
35
  r1 = bar (a, b, c, d, (char *) alloca (aa))
36
       + bar (d, c, b, a, (char *) alloca (aa));
37
  r2 = foo (a, b, c, d);
38
 
39
  if (r1 != r2)
40
    abort ();
41
  return 0;
42
}
43
 

powered by: WebSVN 2.1.0

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