[PATCH] D23567: [RISCV 9/10] Add support for disassembly

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 14:23:38 PDT 2016


jyknight added inline comments.


> rv32i-valid.s:3
>  # RUN: llvm-mc %s -triple=riscv64 -show-encoding | FileCheck %s
> +# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
> +# RUN:     | llvm-objdump -d - | FileCheck -check-prefix=CHECK-DIS %s

Using the same file to test both directions seems like a nice method -- but strangely, almost unique amongst the tests for the backends.

I actually especially like the way it's done in test/MC/X86/mpx-encodings.s, where it uses the same CHECK: line for both the asm output of llvm-mc, and the output of llvm-objdump.

I'd suggest doing it that way, which would nicely resolve my comment in https://reviews.llvm.org/D23564 too.

https://reviews.llvm.org/D23567





More information about the llvm-commits mailing list