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

Peter Bergner bergner@tenstorrent.com
Sat Sep 20 15:59:00 GMT 2025


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>

Peter



More information about the Libc-alpha mailing list