[PATCH v12 06/31] string: Improve generic strchr

Richard Henderson richard.henderson@linaro.org
Sat Feb 4 02:58:18 GMT 2023


On 2/2/23 08:11, Adhemerval Zanella wrote:
> New algorithm now calls strchrnul.
> 
> Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc-linux-gnu,
> and powerpc64-linux-gnu by removing the arch-specific assembly
> implementation and disabling multi-arch (it covers both LE and BE
> for 64 and 32 bits).
> 
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

strchrnul needs libc_hidden_builtin_proto.  On riscv64:

    8:	00000097          	auipc	ra,0x0
			8: R_RISCV_CALL_PLT	__strchrnul
			8: R_RISCV_RELAX	*ABS*
    c:	000080e7          	jalr	ra # 8 <__GI_strchr+0x8>


r~


More information about the Libc-alpha mailing list