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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [i386/] [pr39543-1.c] - Blame information for rev 691

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 691 jeremybenn
/* PR inline-asm/39543 */
2
/* { dg-do compile } */
3
/* { dg-options "-O3 -fomit-frame-pointer" } */
4
 
5
float __attribute__ ((aligned (16))) s0[128];
6
const float s1 = 0.707;
7
float s2[8] __attribute__ ((aligned (16)));
8
float s3[8] __attribute__ ((aligned (16)));
9
float s4[16] __attribute__ ((aligned (16)));
10
float s5[16] __attribute__ ((aligned (16)));
11
 
12
void
13
foo (int k, float *x, float *y, const float *d, const float *z)
14
{
15
  float *a, *b, *c, *e;
16
 
17
  a = x + 2 * k;
18
  b = a + 2 * k;
19
  c = b + 2 * k;
20
  e = y + 2 * k;
21
  __asm__ volatile (""
22
                    : "=m" (x[0]), "=m" (b[0]), "=m" (a[0]), "=m" (c[0])
23
                    : "m" (y[0]), "m" (y[k * 2]), "m" (x[0]), "m" (a[0])
24
                    : "memory");
25
  for (;;)
26
    {
27
      __asm__ volatile (""
28
                        :
29
                        : "m" (y[2]), "m" (d[2]), "m" (e[2]), "m" (z[2])
30
                        : "memory");
31
      if (!--k)
32
        break;
33
    }
34
  __asm__ volatile (""
35
                    : "=m" (x[2]), "=m" (x[10]), "=m" (x[6]), "=m" (x[14])
36
                    : "m" (y[2]), "m" (y[6]), "m" (x[2]), "m" (x[6]),
37
                      "m" (y[18]), "m" (s1)
38
                    : "memory");
39
}
40
 
41
void
42
bar (float *a)
43
{
44
  foo (4, a, a + 16, s2, s3);
45
  foo (8, a, a + 32, s4, s5);
46
}
47
 
48
void
49
baz (void)
50
{
51
  bar (s0);
52
}

powered by: WebSVN 2.1.0

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