[PATCH v2 1/1] riscv: Add Zbkb optimized repeat_bytes helper

Peter Bergner bergner@tenstorrent.com
Fri Oct 31 00:59:17 GMT 2025


On 9/20/25 8:59 AM, Peter Bergner wrote:
> On 9/18/25 7:42 PM, Pincheng Wang wrote:
>> Introduce a RISC-V specific string-misc.h to provide an optimized
>> repeat_bytes implementation when the Zbkb extension is available.
>> The new version uses packh/packw/pack instruction count and avoiding
>> high latency instructions. This helper is used by several mem and string
>> functions, and falls back to the generic implementation when Zbkb is not
>> present.
> 
> LGTM.
> 
> Reviewed-by: Peter Bergner <bergner@tenstorrent.com>

This has been reviewed and approved.  Is there any reason you haven't
pushed this upstream yet?  Or do you need help with that?

Peter




More information about the Libc-alpha mailing list