[PATCH] riscv: Fix alignment-ignorant memcpy implementation

Andreas Schwab schwab@linux-m68k.org
Mon Mar 4 18:24:43 GMT 2024


On Mär 04 2024, Adhemerval Zanella wrote:

> Also, there is no reason why the implementation can't be coded in C,
> since it uses only normal registers and the compiler is able to
> generate code as good as the assembly implementation.  I have not
> checked the performance, but the C implementation uses the same
> strategies, the generate code with gcc 13 seems straightforward, and
> the tail code also avoid byte-operations.

RISC-V is a strict-alignment target, and there is a non-zero chance that
the C compiler messes this up.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


More information about the Libc-alpha mailing list