OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [20001102-1.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do run { target sparc*-*-* } } */
2
/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
3
 
4
extern void abort (void);
5
extern void exit (int);
6
 
7
int foo(double a, int b, int c, double *d, int h)
8
{
9
  int f, g;
10
  double e;
11
 
12
l:
13
  f = (int) a;
14
  a -= (double) f;
15
  if (b == 1)
16
    {
17
      g = c;
18
      f += g;
19
      c -= g;
20
    }
21
  if (b == 2)
22
    {
23
      f++;
24
      h = c;
25
      goto l;
26
    }
27
 
28
  asm volatile ("" : : :
29
                "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
30
                "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
31
                "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
32
                "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31");
33
 
34
  return f & 7;
35
}
36
 
37
int main()
38
{
39
  if (foo(0.1, 1, 3, 0, 1) != 3)
40
    abort ();
41
  exit (0);
42
}

powered by: WebSVN 2.1.0

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