[PATCH 04/17] arm: Add aligned-memory aliases to eabi_compat
Ilias Apalodimas
ilias.apalodimas at linaro.org
Sun Mar 9 09:51:28 CET 2025
On Mon, 24 Feb 2025 at 07:56, Sam Edwards <cfsworks at gmail.com> wrote:
>
> These are sometimes used by LLVM's code-generator, when it can guarantee that
> the memory buffer being passed is aligned on a (4- or 8-byte) boundary. They
> can safely be aliased to the unaligned versions.
>
> Signed-off-by: Sam Edwards <CFSworks at gmail.com>
> ---
> arch/arm/lib/eabi_compat.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
> index e4190c049a3..e6cafcc5f2b 100644
> --- a/arch/arm/lib/eabi_compat.c
> +++ b/arch/arm/lib/eabi_compat.c
> @@ -33,12 +33,24 @@ void __aeabi_memcpy(void *dest, const void *src, size_t n)
> (void) memcpy(dest, src, n);
> }
>
> +void __aeabi_memcpy4(void *dest, const void *src, size_t n) __alias(__aeabi_memcpy);
> +
> +void __aeabi_memcpy8(void *dest, const void *src, size_t n) __alias(__aeabi_memcpy);
> +
> void __aeabi_memset(void *dest, size_t n, int c)
> {
> (void) memset(dest, c, n);
> }
>
> +void __aeabi_memset4(void *dest, size_t n, int c) __alias(__aeabi_memset);
> +
> +void __aeabi_memset8(void *dest, size_t n, int c) __alias(__aeabi_memset);
> +
> void __aeabi_memclr(void *dest, size_t n)
> {
> (void) memset(dest, 0, n);
> }
> +
> +void __aeabi_memclr4(void *dest, size_t n) __alias(__aeabi_memclr);
> +
> +void __aeabi_memclr8(void *dest, size_t n) __alias(__aeabi_memclr);
> --
> 2.45.2
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
More information about the U-Boot
mailing list