nuttx/libs/libc/machine
ganjing 931d5f50d4 libs/libc/risc-v: Add optimized strlcpy.
Add word-at-a-time strlcpy using DETECTNULL for both the copy phase
and the strlen tail when truncated.  The copy loop aligns src and
processes a register at a time, falling to bytewise for the last word
containing the terminator.  When truncated, the remaining src length
is measured with a second word-at-a-time loop.

strlcpy has 46 call sites in a typical kernel image (more than strcpy)
and is not covered by newlib OPTSPEED, making it a high-value target.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: ganjing <ganjing@xiaomi.com>
2026-08-12 10:23:47 +08:00
..
arm arm: memcpy: add NEON paths for aligned copies 2026-05-09 09:46:43 +08:00
arm64 include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
mips arch/mips: Add support for loadable ELF modules 2026-08-11 09:46:46 -03:00
renesas libc/machine/renesas: Move all source files out of gnu folder 2025-06-30 09:56:27 +08:00
risc-v libs/libc/risc-v: Add optimized strlcpy. 2026-08-12 10:23:47 +08:00
sim include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
sparc include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
tricore arch/tricore: Full implementation of setjmp and longjmp. 2026-05-22 00:38:02 +08:00
x86 include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
x86_64 include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
xtensa include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
arch_atomic.c sched/spin_lock: rename raw_spin_lock to spin_lock_notrace 2025-02-13 20:48:15 +08:00
arch_libc.c string:use builtin function to optimize libc function 2025-12-20 10:38:53 +08:00
CMakeLists.txt libc/machine/CMakeLists: should alaways build arch_atomic.c 2024-11-03 02:33:03 +08:00
Kconfig arch:use ARCH_64BIT to mark arch is support 64bit 2025-12-18 22:05:12 +08:00
Make.defs arch/mips: Add support for loadable ELF modules 2026-08-11 09:46:46 -03:00