1 /* SPDX-License-Identifier: GPL-2.0-only */
7 void *memcpy(void *dest
, const void *src
, size_t n
)
9 unsigned long d0
, d1
, d2
;
11 #if (ENV_SEPARATE_ROMSTAGE && CONFIG(ASAN_IN_ROMSTAGE)) || \
12 (ENV_RAMSTAGE && CONFIG(ASAN_IN_RAMSTAGE))
13 check_memory_region((unsigned long)src
, n
, false, _RET_IP_
);
14 check_memory_region((unsigned long)dest
, n
, true, _RET_IP_
);
22 : "=&c" (d0
), "=&D" (d1
), "=&S" (d2
)
23 : "0" (n
>> 3), "g" (n
& 7), "1" (dest
), "2" (src
)
31 : "=&c" (d0
), "=&D" (d1
), "=&S" (d2
)
32 : "0" (n
>> 2), "g" (n
& 3), "1" (dest
), "2" (src
)