[llvm] [RISCV] Zabha/Zacas implies Zaamo (PR #115694)

Jim Lin via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 18:20:18 PST 2024


tclin914 wrote:

Zabha and Zacas were supported from binutils 2.43 (the latest release) and there wasn't a binutils release between them.
In binutils 2.43, Zabha/Zacas imply A and A implies Zaamo and Zalrsc. So that we can say Zabha/Zacas also imply Zaamo.
Zabha/Zacas have been fixed to imply Zaamo instead of A by https://patchwork.sourceware.org/project/binutils/patch/20241008011035.3538-1-zengxiao@eswincomputing.com/  in master branch last month.

The experiment I made with binutils 2.43:
$ riscv64-unknown-elf-clang -march=rv64izabha main.c -S -o main.s
$ cat main.s
    ...
    .attribute      5, "rv64i2p1_zaamo1p0_zabha1p0"
    ...
$ riscv64-unknown-elf-as main.s -o main.o
$ riscv64-unknown-elf-readelf -A main.o
  ...
  Tag_RISCV_arch: "rv64i2p1_a2p1_zaamo1p0_zabha1p0_zalrsc1p0"






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


More information about the llvm-commits mailing list