riscv: Add support for XTheadBb in string-fz[a,i].h
authorChristoph Müllner <christoph.muellner@vrull.eu>
Wed, 23 Aug 2023 05:46:28 +0000 (07:46 +0200)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 6 Sep 2023 12:27:43 +0000 (09:27 -0300)
commit3d6fcf1bd7f462d333c36a14efc0e03f2fdd3f9e
tree773c257487ce30d630043e9a30f1894c15f1f65b
parent3bf7bab88b0da01d4f5ef20afbbb45203185501e
riscv: Add support for XTheadBb in string-fz[a,i].h

XTheadBb has similar instructions like Zbb, which allow optimized
string processing:
* th.ff0: find-first zero is a CLZ instruction.
* th.tstnbz: Similar like orc.b, but with a bit-inverted result.

The instructions are documented here:
  https://github.com/T-head-Semi/thead-extension-spec/tree/master/xtheadbb

These instructions can be found in the T-Head C906 and the C910.

Tested with the string tests.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/riscv/string-fza.h
sysdeps/riscv/string-fzi.h