[PATCH 11/20] alpha: add assembly mempcpy sharing the ev6 memcpy

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Aug 13 19:49:46 GMT 2026


Hi,

> Do we really need to essentially duplicate the memcpy code for this optimization?
> The alpha ABI cost us a bit more instruction for the function call (compare to
> aarch64 for instance), but it does cost a lot less i-cache.
>
> The aarch64 uses the generic mempcpy.c and it seems not be a problem.

It's not an optimization, in general it makes things worse (either slowing down
a shared implementation or wasting L1 cache space for separate implementations).

For this reason both GCC and LLVM optimize mempcpy into memcpy.
Hence optimizing a mempcpy is completely missing the point since it will never
be called. That's why the C version is fine.

Cheers,
Wilco


More information about the Libc-alpha mailing list