[PATCH] D146114: [RISCV] Allow llvm-objdump to disassemble objects with unrecognised versions of known extensions

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 11:06:50 PDT 2023

MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

The `unknown_ext_version.s` case is common (for GCC uses) and will get improved.

It seems that `llvm-objdump -d noncanonicalized_arch.o` can ideally report a warning and continue dumping. The case is rare and less important.

Comment at: llvm/test/tools/llvm-objdump/ELF/RISCV/riscv-attributes.s:19
 #--- noncanonicalized_arch.s
-# NONCANON: vsetvli a3, a2, e8, m8, tu, mu
+# NONCANON: arch string must begin with valid base ISA
 vsetvli a3, a2, e8, m8, tu, mu
Use `FileCheck -DFILE=noncanonicalized_arch.o`

Add `error: ` to check that this is an error.

Add `NONCANON-NOT: {{.}}` to assert that there is no dumping after the error message.

  rG LLVM Github Monorepo



More information about the llvm-commits mailing list