MCPcopy Create free account
hub / github.com/coreboot/coreboot / memcpy

Function memcpy

payloads/libpayload/arch/x86/string.c:80–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void *memcpy(void *dest, const void *src, size_t n)
81{
82 unsigned long d0, d1, d2;
83
84#if CONFIG(LP_ARCH_X86_64)
85 asm volatile(
86 "rep ; movsq\n\t"
87 "mov %4,%%rcx\n\t"
88 "rep ; movsb\n\t"
89 : "=&c" (d0), "=&D" (d1), "=&S" (d2)
90 : "0" (n >> 3), "g" (n & 7), "1" (dest), "2" (src)
91 : "memory"
92 );
93#else
94 asm volatile(
95 "rep ; movsl\n\t"
96 "movl %4,%%ecx\n\t"
97 "rep ; movsb\n\t"
98 : "=&c" (d0), "=&D" (d1), "=&S" (d2)
99 : "0" (n >> 2), "g" (n & 3), "1" (dest), "2" (src)
100 : "memory"
101 );
102#endif
103
104 return dest;
105}
106
107void *memmove(void *dest, const void *src, size_t n)
108{

Callers 15

memmoveFunction · 0.70
boot_device_readFunction · 0.70
SHA1TransformFunction · 0.50
SHA1UpdateFunction · 0.50
do_writeFunction · 0.50
dwc2_udc_initFunction · 0.50
setup_ep0Function · 0.50
chipidea_hw_initFunction · 0.50
start_setupFunction · 0.50
ata_read_unalignedFunction · 0.50
ahci_packet_read_cmdFunction · 0.50
ahci_prdbuf_initFunction · 0.50

Calls

no outgoing calls

Tested by 14

ulzmanFunction · 0.40
ulz4fnFunction · 0.40
cbfs_mcache_lookupFunction · 0.40
cbfs_lookupFunction · 0.40
boot_device_readFunction · 0.40
create_cbfsFunction · 0.40
setup_cbfs_testFunction · 0.40
ulzmanFunction · 0.40
ulz4fnFunction · 0.40
cbfs_lookupFunction · 0.40
boot_device_readFunction · 0.40