https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70140
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
I've just taken look at that and please confirm that I understand that
correctly:
1) we want to ideally a same function for expansion of memcpy and mempcpy,
where for later one we'll append calculation of return value (dest + n)?
2) I'm bit confused with 'GLIBC currently inlines mempcpy into memcpy'. Do is
mean that you basically do not want to emit any call to mempcpy and prefer
rather:
int my_mempcpy(void)
{
return __builtin_mempcpy (a, b, SIZE);
}
$ ./xgcc -B. /tmp/mem.c -O2 -S -DSIZE=100000 -o /dev/stdout
my_mempcpy:
.LFB1:
.cfi_startproc
subq $8, %rsp
.cfi_def_cfa_offset 16
movq b(%rip), %rsi
movq a(%rip), %rdi
movl $100000, %edx
call memcpy
addq $8, %rsp
.cfi_def_cfa_offset 8
addq $100000, %rax
ret
.cfi_endproc
?
Thanks