[llvm] [RISCV] Support zext.h mnemonic with Zbkb. (PR #96821)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 03:42:50 PDT 2024


dtcxzyw wrote:

FYI, GNU binutils as doesn't emit pack/packw for zext.h when zbkb is available:
```
dtcxzyw at dtcxzyw:~/WorkSpace/Projects/compilers/LLVM/llvm-build$ cat xxx.S
zext.h t0, t1
dtcxzyw at dtcxzyw:~/WorkSpace/Projects/compilers/LLVM/llvm-build$ riscv64-linux-gnu-gcc -march=rv64gc_zbkb xxx.S -c
dtcxzyw at dtcxzyw:~/WorkSpace/Projects/compilers/LLVM/llvm-build$ riscv64-linux-gnu-objdump xxx.o -S

xxx.o:     file format elf64-littleriscv


Disassembly of section .text:

0000000000000000 <.text>:
   0:   03031293                slli    t0,t1,0x30
   4:   0302d293                srli    t0,t0,0x30
```


https://github.com/llvm/llvm-project/pull/96821


More information about the llvm-commits mailing list