Document gcov-io (PR gcov-profile/84735).
[official-gcc.git] / gcc / testsuite / gcc.dg / charset / asm3.c
blob842bd5cfcfa3e43a3a640b8a1ea7358e8716caf4
1 /* Test for complex asm statements. Make sure it compiles
2 then test for some of the asm statements not being translated. */
3 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } }
4 { dg-require-iconv "IBM1047" }
5 { dg-final { scan-assembler "std" } }
6 { dg-final { scan-assembler "cld" } }
7 { dg-final { scan-assembler "rep" } }
8 { dg-final { scan-assembler "movsb" } } */
9 #define size_t int
10 void *
11 memmove (void *__dest, __const void *__src, size_t __n)
13 register unsigned long int __d0, __d1, __d2;
14 if (__dest < __src)
15 __asm__ __volatile__
16 ("cld\n\t"
17 "rep\n\t"
18 "movsb"
19 : "=&c" (__d0), "=&S" (__d1), "=&D" (__d2)
20 : "0" (__n), "1" (__src), "2" (__dest)
21 : "memory");
22 else
23 __asm__ __volatile__
24 ("std\n\t"
25 "rep\n\t"
26 "movsb\n\t"
27 "cld"
28 : "=&c" (__d0), "=&S" (__d1), "=&D" (__d2)
29 : "0" (__n), "1" (__n - 1 + (const char *) __src),
30 "2" (__n - 1 + (char *) __dest)
31 : "memory");
32 return __dest;