summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr20314-2.c
blob: 8185218c139d1954470bd61c8421d4cf7d951040 (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
38
39
40
41
42
43
44
45
46
47
/* PR inline-asm/20314 */
/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
/* { dg-do compile { target ia64-*-* powerpc*-*-* } } */

int a, b, c, d, e, f, g, h, i, j, k, l;

void
f1 (void)
{
  __asm__ volatile (""
		    : [a] "+r" (a), [b] "+r" (b), [c] "+r" (c), [d] "+r" (d),
		      [e] "+r" (e), [f] "+r" (f), [g] "+r" (g), [h] "+r" (h),
		      [i] "+r" (i), [j] "+r" (j), [k] "+r" (k), [l] "+r" (l));
}

void
f2 (void)
{
  __asm__ volatile (""
		    : [a] "+r,m" (a), [b] "+r,m" (b), [c] "+r,m" (c), [d] "+r,m" (d),
		      [e] "+r,m" (e), [f] "+r,m" (f), [g] "+r,m" (g), [h] "+r,m" (h),
		      [i] "+r,m" (i), [j] "+r,m" (j), [k] "+r,m" (k), [l] "+r,m" (l));
}

void
f3 (void)
{
  __asm__ volatile (""
		    : [a] "=r" (a), [b] "=r" (b), [c] "=r" (c), [d] "=r" (d),
		      [e] "=r" (e), [f] "=r" (f), [g] "=r" (g), [h] "=r" (h),
		      [i] "=r" (i), [j] "=r" (j), [k] "=r" (k), [l] "=r" (l)
		    : "[a]" (a), "[b]" (b), "[c]" (c), "[d]" (d),
		      "[e]" (e), "[f]" (f), "[g]" (g), "[h]" (h),
		      "[i]" (i), "[j]" (j), "[k]" (k), "[l]" (l));
}

void
f4 (void)
{
  __asm__ volatile (""
		    : [a] "=r,m" (a), [b] "=r,m" (b), [c] "=r,m" (c), [d] "=r,m" (d),
		      [e] "=r,m" (e), [f] "=r,m" (f), [g] "=r,m" (g), [h] "=r,m" (h),
		      [i] "=r,m" (i), [j] "=r,m" (j), [k] "=r,m" (k), [l] "=r,m" (l)
		    : "[a],m" (a), "[b],m" (b), "[c],m" (c), "[d],m" (d),
		      "[e],m" (e), "[f],m" (f), "[g],m" (g), "[h],m" (h),
		      "[i],m" (i), "[j],m" (j), "[k],m" (k), "[l],m" (l));
}