No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.target / i386 / clobbers.c
blobbe48ed7e277ff7ca4ea1463d91a8b557ee2144f3
1 /* Test asm clobbers on x86. */
3 /* { dg-do run { target i?86-*-* x86_64-*-* } } */
4 /* { dg-skip-if "" { ilp32 } { "-fpic" "-fPIC" } { "" } } */
6 extern void abort (void);
8 int main ()
10 int i;
11 __asm__ ("movl $1,%0\n\txorl %%eax,%%eax" : "=r" (i) : : "eax");
12 if (i != 1)
13 abort ();
14 __asm__ ("movl $1,%0\n\txorl %%ebx,%%ebx" : "=r" (i) : : "ebx");
15 if (i != 1)
16 abort ();
17 __asm__ ("movl $1,%0\n\txorl %%ecx,%%ecx" : "=r" (i) : : "ecx");
18 if (i != 1)
19 abort ();
20 __asm__ ("movl $1,%0\n\txorl %%edx,%%edx" : "=r" (i) : : "edx");
21 if (i != 1)
22 abort ();
23 __asm__ ("movl $1,%0\n\txorl %%esi,%%esi" : "=r" (i) : : "esi");
24 if (i != 1)
25 abort ();
26 __asm__ ("movl $1,%0\n\txorl %%edi,%%edi" : "=r" (i) : : "edi");
27 if (i != 1)
28 abort ();
29 return 0;