PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realignin...
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / asm-3.c
blob206f8c2b25c10ffd4baac53daf02b232d61fd156
1 /* PR inline-asm/6806 */
2 /* { dg-do run } */
3 /* { dg-skip-if "" { ia32 && { ! nonpic } } } */
4 /* { dg-options "-O2" } */
6 extern void abort (void);
8 volatile int out = 1;
9 volatile int a = 2;
10 volatile int b = 4;
11 volatile int c = 8;
12 volatile int d = 16;
13 volatile int e = 32;
14 volatile int f = 64;
16 int
17 main ()
19 asm volatile ("xorl %%eax, %%eax \n\t"
20 "xorl %%esi, %%esi \n\t"
21 "addl %1, %0 \n\t"
22 "addl %2, %0 \n\t"
23 "addl %3, %0 \n\t"
24 "addl %4, %0 \n\t"
25 "addl %5, %0 \n\t"
26 "addl %6, %0"
27 : "+r" (out)
28 : "r" (a), "r" (b), "r" (c), "g" (d), "g" (e), "g" (f)
29 : "%eax", "%esi");
31 if (out != 127)
32 abort ();
34 return 0;