[PATCH 6/6 v4] newlib: introduce --enable-newlib-hw-misaligned-access option

Corinna Vinschen vinschen@redhat.com
Mon Feb 10 12:11:35 GMT 2025


Hi Alexey,

On Jan 31 16:29, Alexey Lapshin wrote:
> Some hardware may perform better when copying unaligned
> word-sized memory compared to byte-by-byte copying.
> 
> In case not defined explicitly by --enable-newlib-hw-misaligned-access
> config option or variable $default_newlib_hw_misaligned_access in
> configure.host file the compiler check will be performed to detect if
> __riscv_misaligned_fast or __riscv_misaligned_slow is defined.
> 
> This commit introduces autodetection for RISC-V. Additionally, checking
> for __ARM_FEATURE_UNALIGNED could be checked for ARM architecture.
> However, this was not implemented in the commit, as changes in
> newlib/libc/machine/[arm|aarch64] need to be performed.
> ---
>  newlib/README                      |  7 ++++++
>  newlib/configure.ac                | 34 ++++++++++++++++++++++++++++++
>  newlib/configure.host              |  6 ++++++
>  newlib/libc/machine/riscv/memcpy.c |  4 ++++
>  newlib/libc/machine/riscv/strcmp.S |  5 ++++-
>  newlib/libc/machine/riscv/strcpy.c |  2 ++
>  newlib/libc/string/local.h         | 11 +++++++++-
>  7 files changed, 67 insertions(+), 2 deletions(-)

This patch doesn't apply cleanly to configure.ac.  Can you check, please?


Thanks,
Corinna



More information about the Newlib mailing list