[PATCH] D138352: [RISCV] Support .variant_cc directive for the assembler.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 2 10:10:22 PST 2022


MaskRay added inline comments.


================
Comment at: llvm/test/MC/RISCV/directive-variant_cc.s:2
+// RUN: llvm-mc -triple riscv64 -filetype obj -o - %s | llvm-readobj --symbols - | FileCheck %s
+// RUN: not llvm-mc -triple riscv64 -filetype asm -defsym=ERR=1 -o - %s 2>&1 | FileCheck %s --check-prefix=ERR
+
----------------
MaskRay wrote:
> kito-cheng wrote:
> > Could you add objdump check like AArch64's test: https://github.com/llvm/llvm-project/blob/main/llvm/test/MC/AArch64/directive-variant_pcs.s#L33
> We need local/global definitions as the aarch64 test does.
See directive-variant_pcs.s tests. I think `local, def1, def2, alias_def1, undef` are all useful.

We can do somewhat better by leveraging `--defsym=ERR=1` (as you already did).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138352/new/

https://reviews.llvm.org/D138352



More information about the llvm-commits mailing list