glibc/sysdeps/unix/sysv/linux/riscv/Makefile
Evan Green 587a1290a1
riscv: Add and use alignment-ignorant memcpy
For CPU implementations that can perform unaligned accesses with little
or no performance penalty, create a memcpy implementation that does not
bother aligning buffers. It will use a block of integer registers, a
single integer register, and fall back to bytewise copy for the
remainder.

Signed-off-by: Evan Green <evan@rivosinc.com>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-03-01 07:15:01 -08:00

36 lines
846 B
Makefile

ifeq ($(subdir),misc)
sysdep_headers += \
sys/cachectl.h \
sys/hwprobe.h \
# sysdep_headers
sysdep_routines += \
flush-icache \
hwprobe \
# sysdep_routines
endif
ifeq ($(subdir),stdlib)
gen-as-const-headers += ucontext_i.sym
endif
ifeq ($(subdir),string)
sysdep_routines += \
memcpy \
memcpy-generic \
memcpy_noalignment \
# sysdep_routines
endif
abi-variants := ilp32 ilp32d lp64 lp64d
ifeq (,$(filter $(default-abi),$(abi-variants)))
$(error Unknown ABI $(default-abi), must be one of $(abi-variants))
endif
abi-ilp32-condition := __WORDSIZE == 32 && defined __riscv_float_abi_soft
abi-ilp32d-condition := __WORDSIZE == 32 && defined __riscv_float_abi_double
abi-lp64-condition := __WORDSIZE == 64 && defined __riscv_float_abi_soft
abi-lp64d-condition := __WORDSIZE == 64 && defined __riscv_float_abi_double