Attention is currently required from: Arthur Heymans.
Jérémy Compostella has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78646?usp=email )
Change subject: arch/x86/memcpy.c: Optimize code for 64bit ......................................................................
Patch Set 2:
(1 comment)
File src/arch/x86/memcpy.c:
https://review.coreboot.org/c/coreboot/+/78646/comment/b0e37991_82a5f6af : PS2, Line 30: : "=&c" (d0), "=&D" (d1), "=&S" (d2)
I noticed the copy of the remaining byte is missing. […]
BTW, the code in the kernel is: ``` static __always_inline void *__memcpy(void *to, const void *from, size_t n) { int d0, d1, d2; asm volatile("rep ; movsl\n\t" "movl %4,%%ecx\n\t" "andl $3,%%ecx\n\t" "jz 1f\n\t" "rep ; movsb\n\t" "1:" : "=&c" (d0), "=&D" (d1), "=&S" (d2) : "0" (n / 4), "g" (n), "1" ((long)to), "2" ((long)from) : "memory"); return to; } ``` And it does pass the test above.