The vendor-defined XTHeadBb (predating the standard Zbb extension)
extension adds some bit-manipulation extensions with somewhat similar
semantics as some of the Zbb instructions.
It is supported by the C9xx cores (e.g., found in the wild in the
Allwinner D1) by Alibaba T-Head.
The current (as of this commit) public documentation for XTHeadBb is
available from:
https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.2.2/xthead-2023-01-30-2.2.2.pdf
Support for these instructions has already landed in GNU Binutils:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=8254c3d2c94ae5458095ea6c25446ba89134b9da
Depends on D143036
It looks like this line of code will cause compilation warning.
[1677/1717] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVISelLowering.cpp.o /tmp/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp:315:24: warning: braces around scalar initializer [-Wbraced-scalar-init] setOperationAction({ISD::CTLZ}, XLenVT, Legal); ^~~~~~~~~~~ 1 warning generated. [1717/1717] Creating library symlink lib/libclang-cpp.so [1542/1716] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVISelLowering.cpp.o /tmp/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp:315:24: warning: braces around scalar initializer [-Wbraced-scalar-init] setOperationAction({ISD::CTLZ}, XLenVT, Legal); ^~~~~~~~~~~ 1 warning generated. [1716/1716] Linking C executable bin/mlir-capi-execution-engine-test