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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [pr39543-2.c] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* PR inline-asm/39543 */
2
/* { dg-do compile } */
3
/* { dg-options "-O3" } */
4
/* { dg-skip-if "" { ilp32 && { ! nonpic } } { "*" } { "" } } */
5
 
6
float __attribute__ ((aligned (16))) s0[128];
7
const float s1 = 0.707;
8
float s2[8] __attribute__ ((aligned (16)));
9
float s3[8] __attribute__ ((aligned (16)));
10
float s4[16] __attribute__ ((aligned (16)));
11
float s5[16] __attribute__ ((aligned (16)));
12
 
13
void
14
foo (int k, float *x, float *y, const float *d, const float *z)
15
{
16
  float *a, *b, *c, *e;
17
 
18
  a = x + 2 * k;
19
  b = a + 2 * k;
20
  c = b + 2 * k;
21
  e = y + 2 * k;
22
  __asm__ volatile (""
23
                    : "=m" (x[0]), "=m" (b[0]), "=m" (a[0]), "=m" (c[0])
24
                    : "m" (y[0]), "m" (y[k * 2]), "m" (x[0]), "m" (a[0])
25
                    : "memory");
26
  for (;;)
27
    {
28
      __asm__ volatile (""
29
                        :
30
                        : "m" (y[2]), "m" (d[2]), "m" (e[2]), "m" (z[2])
31
                        : "memory");
32
      if (!--k)
33
        break;
34
    }
35
  __asm__ volatile (""
36
                    : "=m" (x[2]), "=m" (x[10]), "=m" (x[6]), "=m" (x[14])
37
                    : "m" (y[2]), "m" (y[6]), "m" (x[2]), "m" (x[6]), "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.