summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/asm-es-2.c
blob: d2b46913b744f76f049c08922aa771a19babd6c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* { dg-options "-O2" } */
void
f1 (int *p, int x)
{
  asm ("asm1 %0" : "=es" (p[x]));
}

void
f2 (int *p)
{
  while (1)
    {
      p += 4;
      asm ("asm2%U0 %0" : "=m<>" (*p));
    }
}

void
f3 (int *p)
{
  while (1)
    {
      p += 4;
      asm ("asm3%U0 %0" : "=es" (*p));
    }
}

void
f4 (int *p)
{
  asm ("asm4 %0" : "=es" (p[100]));
}

/* { dg-final { scan-assembler "asm1 %?r?3,%?r?4" } } */
/* { dg-final { scan-assembler "asm2u 16\\(%?r?3\\)" } } */
/* { dg-final { scan-assembler "asm3 0\\(%?r?3\\)" } } */
/* { dg-final { scan-assembler "asm4 400\\(%?r?3\\)" } } */