1 /* { dg-do compile } */
2 /* { dg-require-effective-target ilp32 } */
3 /* { dg-options "-O" } */
5 typedef unsigned char u8;
6 struct __large_struct { unsigned long buf[100]; };
7 static inline __attribute__((always_inline)) unsigned long
8 __copy_from_user_inatomic(void *to, const void *from, unsigned long n)
10 unsigned long ret = 0;
11 asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n"
12 ".section .fixup,\"ax\"\n"
14 " xor""b"" %""b""1,%""b""1\n"
17 " .section __ex_table,\"a\"\n"
18 " " ".balign 4" " " "\n"
19 " " ".long" " " "1b" "," "3b" "\n"
21 : "=r" (ret), "=q"(*(u8 *)to)
22 : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret));
25 void romchecksum(const unsigned char *rom, unsigned char c)
29 !__copy_from_user_inatomic(&(c), ( typeof(c) *)(rom++), sizeof(c));)