Record revision number.
[official-gcc.git] / gcc / testsuite / gcc.dg / i386-asm-3.c
blob19bf1534521945474733e698c11fe5c789a71fef
1 /* PR inline-asm/6806 */
2 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
3 /* { dg-options "-O2" } */
5 extern void abort (void);
7 volatile int out = 1;
8 volatile int a = 2;
9 volatile int b = 4;
10 volatile int c = 8;
11 volatile int d = 16;
12 volatile int e = 32;
13 volatile int f = 64;
15 int
16 main ()
18 asm volatile ("xorl %%eax, %%eax \n\t"
19 "xorl %%esi, %%esi \n\t"
20 "addl %1, %0 \n\t"
21 "addl %2, %0 \n\t"
22 "addl %3, %0 \n\t"
23 "addl %4, %0 \n\t"
24 "addl %5, %0 \n\t"
25 "addl %6, %0"
26 : "+r" (out)
27 : "r" (a), "r" (b), "r" (c), "g" (d), "g" (e), "g" (f)
28 : "%eax", "%esi");
30 if (out != 127)
31 abort ();
33 return 0;