Skip to content

Commit d57de49

Browse files
committed
[RISCV] Support llvm-objdump -M no-aliases and -M numeric
Summary: Now that llvm-objdump allows target-specific options, we match the `no-aliases` and `numeric` options for RISC-V, as supported by GNU objdump. This is done by overriding the variables used for the command-line options, so that the command-line options are still supported. This patch updates all tests using `llvm-objdump -riscv-no-aliases` to use `llvm-objdump -M no-aliases`. Reviewers: luismarques, asb Reviewed By: luismarques, asb Subscribers: pzheng, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66139 llvm-svn: 371534
1 parent c0ceca5 commit d57de49

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+100
-80
lines changed

llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,24 @@ static cl::opt<bool>
4545
"ABI names (such as x2 instead of sp)"),
4646
cl::init(false), cl::Hidden);
4747

48+
// The command-line flags above are used by llvm-mc and llc. They can be used by
49+
// `llvm-objdump`, but we override their values here to handle options passed to
50+
// `llvm-objdump` with `-M` (which matches GNU objdump). There did not seem to
51+
// be an easier way to allow these options in all these tools, without doing it
52+
// this way.
53+
bool RISCVInstPrinter::applyTargetSpecificCLOption(StringRef Opt) {
54+
if (Opt == "no-aliases") {
55+
NoAliases = true;
56+
return true;
57+
}
58+
if (Opt == "numeric") {
59+
ArchRegNames = true;
60+
return true;
61+
}
62+
63+
return false;
64+
}
65+
4866
void RISCVInstPrinter::printInst(const MCInst *MI, raw_ostream &O,
4967
StringRef Annot, const MCSubtargetInfo &STI) {
5068
bool Res = false;

llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.h

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class RISCVInstPrinter : public MCInstPrinter {
2525
const MCRegisterInfo &MRI)
2626
: MCInstPrinter(MAI, MII, MRI) {}
2727

28+
bool applyTargetSpecificCLOption(StringRef Opt) override;
29+
2830
void printInst(const MCInst *MI, raw_ostream &O, StringRef Annot,
2931
const MCSubtargetInfo &STI) override;
3032
void printRegName(raw_ostream &O, unsigned RegNo) const override;

llvm/test/CodeGen/RISCV/compress-inline-asm.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: llc -mtriple=riscv32 -mattr=+c -filetype=obj < %s\
2-
; RUN: | llvm-objdump -triple=riscv32 -mattr=+c -d -riscv-no-aliases -\
2+
; RUN: | llvm-objdump -triple=riscv32 -mattr=+c -d -M no-aliases -\
33
; RUN: | FileCheck -check-prefix=CHECK %s
44

55
@ext = external global i32

llvm/test/CodeGen/RISCV/compress.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: llc -mtriple=riscv32 -mattr=+c -filetype=obj \
22
; RUN: -disable-block-placement < %s \
3-
; RUN: | llvm-objdump -d -triple=riscv32 -mattr=+c -riscv-no-aliases - \
3+
; RUN: | llvm-objdump -d -triple=riscv32 -mattr=+c -M no-aliases - \
44
; RUN: | FileCheck -check-prefix=RV32IC %s
55

66
; This acts as a sanity check for the codegen instruction compression path,

llvm/test/CodeGen/RISCV/option-norvc.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: llc -mtriple=riscv32 -mattr=+c -filetype=obj < %s\
2-
; RUN: | llvm-objdump -triple=riscv32 -mattr=+c -d -riscv-no-aliases -\
2+
; RUN: | llvm-objdump -triple=riscv32 -mattr=+c -d -M no-aliases -\
33
; RUN: | FileCheck -check-prefix=CHECK %s
44

55
; This test demonstrates that .option norvc has no effect on codegen when

llvm/test/CodeGen/RISCV/option-rvc.ll

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: llc -mtriple=riscv32 -filetype=obj < %s\
2-
; RUN: | llvm-objdump -triple=riscv32 -mattr=+c -d -riscv-no-aliases -\
2+
; RUN: | llvm-objdump -triple=riscv32 -mattr=+c -d -M no-aliases -\
33
; RUN: | FileCheck -check-prefix=CHECK %s
44

55
; This test demonstrates that .option norvc has no effect on codegen when

llvm/test/MC/RISCV/align.s

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22

33
# Relaxation enabled:
44
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+relax < %s \
5-
# RUN: | llvm-objdump -d -riscv-no-aliases - \
5+
# RUN: | llvm-objdump -d -M no-aliases - \
66
# RUN: | FileCheck -check-prefix=RELAX-INST %s
77
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+relax < %s \
88
# RUN: | llvm-readobj -r | FileCheck -check-prefix=RELAX-RELOC %s
99

1010
# Relaxation disabled:
1111
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=-relax < %s \
12-
# RUN: | llvm-objdump -d -riscv-no-aliases - \
12+
# RUN: | llvm-objdump -d -M no-aliases - \
1313
# RUN: | FileCheck -check-prefix=NORELAX-INST %s
1414
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=-relax < %s \
1515
# RUN: | llvm-readobj -r | FileCheck -check-prefix=NORELAX-RELOC %s
1616

1717
# Relaxation enabled with C extension:
1818
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,+relax < %s \
19-
# RUN: | llvm-objdump -d -riscv-no-aliases - \
19+
# RUN: | llvm-objdump -d -M no-aliases - \
2020
# RUN: | FileCheck -check-prefix=C-EXT-RELAX-INST %s
2121
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,+relax < %s \
2222
# RUN: | llvm-readobj -r | FileCheck -check-prefix=C-EXT-RELAX-RELOC %s
2323

2424
# Relaxation disabled with C extension:
2525
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,-relax < %s \
26-
# RUN: | llvm-objdump -d -riscv-no-aliases - \
26+
# RUN: | llvm-objdump -d -M no-aliases - \
2727
# RUN: | FileCheck -check-prefix=C-EXT-NORELAX-INST %s
2828
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,-relax < %s \
2929
# RUN: | llvm-readobj -r | FileCheck -check-prefix=C-EXT-NORELAX-RELOC %s

llvm/test/MC/RISCV/cnop.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c < %s \
2-
# RUN: | llvm-objdump -d -riscv-no-aliases - | FileCheck -check-prefix=CHECK-INST %s
2+
# RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefix=CHECK-INST %s
33

44
# alpha and main are 8 byte alignment
55
# but the alpha function's size is 6

llvm/test/MC/RISCV/compress-cjal.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# RUN: | llvm-objdump -triple riscv32 -mattr=+c -d - \
77
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-ALIAS %s
88
# RUN: llvm-mc -triple riscv32 -mattr=+c -filetype=obj < %s \
9-
# RUN: | llvm-objdump -triple riscv32 -mattr=+c -d -riscv-no-aliases - \
9+
# RUN: | llvm-objdump -triple riscv32 -mattr=+c -d -M no-aliases - \
1010
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-INST %s
1111

1212
# c.jal is an rv32 only instruction.

llvm/test/MC/RISCV/compress-rv32d.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# RUN: | llvm-objdump -triple riscv32 -mattr=+c,+d -d - \
77
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-ALIAS %s
88
# RUN: llvm-mc -triple riscv32 -mattr=+c,+d -filetype=obj < %s \
9-
# RUN: | llvm-objdump -triple riscv32 -mattr=+c,+d -d -riscv-no-aliases - \
9+
# RUN: | llvm-objdump -triple riscv32 -mattr=+c,+d -d -M no-aliases - \
1010
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-INST %s
1111

1212
# RUN: llvm-mc -triple riscv64 -mattr=+c,+d -show-encoding < %s \
@@ -17,7 +17,7 @@
1717
# RUN: | llvm-objdump -triple riscv64 -mattr=+c,+d -d - \
1818
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-ALIAS %s
1919
# RUN: llvm-mc -triple riscv64 -mattr=+c,+d -filetype=obj < %s \
20-
# RUN: | llvm-objdump -triple riscv64 -mattr=+c,+d -d -riscv-no-aliases - \
20+
# RUN: | llvm-objdump -triple riscv64 -mattr=+c,+d -d -M no-aliases - \
2121
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-INST %s
2222

2323
# Tests double precision floating point instructions available in rv32 and in rv64.

llvm/test/MC/RISCV/compress-rv32f.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# RUN: | llvm-objdump -triple riscv32 -mattr=+c,+f -d - \
77
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-ALIAS %s
88
# RUN: llvm-mc -triple riscv32 -mattr=+c,+f -filetype=obj < %s \
9-
# RUN: | llvm-objdump -triple riscv32 -mattr=+c,+f -d -riscv-no-aliases - \
9+
# RUN: | llvm-objdump -triple riscv32 -mattr=+c,+f -d -M no-aliases - \
1010
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-INST %s
1111

1212
# Instructions that are 32 bit only.

llvm/test/MC/RISCV/compress-rv32i.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# RUN: | llvm-objdump -triple riscv32 -mattr=+c -d - \
77
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-ALIAS %s
88
# RUN: llvm-mc -triple riscv32 -mattr=+c -filetype=obj < %s \
9-
# RUN: | llvm-objdump -triple riscv32 -mattr=+c -d -riscv-no-aliases - \
9+
# RUN: | llvm-objdump -triple riscv32 -mattr=+c -d -M no-aliases - \
1010
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-INST %s
1111

1212
# RUN: llvm-mc -triple riscv64 -mattr=+c -show-encoding < %s \
@@ -17,7 +17,7 @@
1717
# RUN: | llvm-objdump -triple riscv64 -mattr=+c -d - \
1818
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-ALIAS %s
1919
# RUN: llvm-mc -triple riscv64 -mattr=+c -filetype=obj < %s \
20-
# RUN: | llvm-objdump -triple riscv64 -mattr=+c -d -riscv-no-aliases - \
20+
# RUN: | llvm-objdump -triple riscv64 -mattr=+c -d -M no-aliases - \
2121
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-INST %s
2222

2323
# CHECK-BYTES: 2e 85

llvm/test/MC/RISCV/compress-rv64i.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# RUN: | llvm-objdump -triple riscv64 -mattr=+c -d - \
77
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-ALIAS %s
88
# RUN: llvm-mc -triple riscv64 -mattr=+c -filetype=obj < %s \
9-
# RUN: | llvm-objdump -triple riscv64 -mattr=+c -d -riscv-no-aliases - \
9+
# RUN: | llvm-objdump -triple riscv64 -mattr=+c -d -M no-aliases - \
1010
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-INST %s
1111

1212
# Tests compressed instructions available in rv64 and not in rv32.

llvm/test/MC/RISCV/csr-aliases.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+f < %s \
2-
# RUN: | llvm-objdump -d -mattr=+f -riscv-no-aliases - \
2+
# RUN: | llvm-objdump -d -mattr=+f -M no-aliases - \
33
# RUN: | FileCheck -check-prefix=CHECK-INST %s
44
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+f < %s \
55
# RUN: | llvm-objdump -d -mattr=+f - \
@@ -18,7 +18,7 @@
1818
# RUN: | FileCheck -check-prefix=CHECK-EXT-F-OFF %s
1919

2020
# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+f < %s \
21-
# RUN: | llvm-objdump -d -mattr=+f -riscv-no-aliases - \
21+
# RUN: | llvm-objdump -d -mattr=+f -M no-aliases - \
2222
# RUN: | FileCheck -check-prefix=CHECK-INST %s
2323
# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+f < %s \
2424
# RUN: | llvm-objdump -d -mattr=+f - \

llvm/test/MC/RISCV/fixups-compressed.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc %s -triple riscv32 -mattr=+c -show-encoding \
22
# RUN: | FileCheck -check-prefix=CHECK-FIXUP %s
33
# RUN: llvm-mc -triple riscv32 -filetype=obj -mattr=+c < %s \
4-
# RUN: | llvm-objdump -d -riscv-no-aliases - | FileCheck -check-prefix=CHECK-INSTR %s
4+
# RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefix=CHECK-INSTR %s
55
# RUN: llvm-mc -filetype=obj -mattr=+c -triple=riscv32 %s \
66
# RUN: | llvm-readobj -r | FileCheck %s -check-prefix=CHECK-REL
77

llvm/test/MC/RISCV/fixups.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc -triple riscv32 -riscv-no-aliases < %s -show-encoding \
22
# RUN: | FileCheck -check-prefix=CHECK-FIXUP %s
33
# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
4-
# RUN: | llvm-objdump -riscv-no-aliases -d - \
4+
# RUN: | llvm-objdump -M no-aliases -d - \
55
# RUN: | FileCheck -check-prefix=CHECK-INSTR %s
66
# RUN: llvm-mc -filetype=obj -triple=riscv32 %s \
77
# RUN: | llvm-readobj -r | FileCheck %s -check-prefix=CHECK-REL

llvm/test/MC/RISCV/numeric-reg-names-d.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc -triple riscv32 -mattr=+f,+d < %s -riscv-arch-reg-names \
22
# RUN: | FileCheck -check-prefix=CHECK-NUMERIC %s
33
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+f,+d < %s \
4-
# RUN: | llvm-objdump -mattr=+f,+d -d -riscv-arch-reg-names - \
4+
# RUN: | llvm-objdump -mattr=+f,+d -d -M numeric - \
55
# RUN: | FileCheck -check-prefix=CHECK-NUMERIC %s
66

77
# CHECK-NUMERIC: fsqrt.d f10, f0

llvm/test/MC/RISCV/numeric-reg-names-f.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc -triple riscv32 -mattr=+f < %s -riscv-arch-reg-names \
22
# RUN: | FileCheck -check-prefix=CHECK-NUMERIC %s
33
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+f < %s \
4-
# RUN: | llvm-objdump -mattr=+f -d -riscv-arch-reg-names - \
4+
# RUN: | llvm-objdump -mattr=+f -d -M numeric - \
55
# RUN: | FileCheck -check-prefix=CHECK-NUMERIC %s
66

77
# CHECK-NUMERIC: fsqrt.s f10, f0

llvm/test/MC/RISCV/numeric-reg-names.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc -triple riscv32 < %s -riscv-arch-reg-names \
22
# RUN: | FileCheck -check-prefix=CHECK-NUMERIC %s
33
# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
4-
# RUN: | llvm-objdump -d -riscv-arch-reg-names - \
4+
# RUN: | llvm-objdump -d -M numeric - \
55
# RUN: | FileCheck -check-prefix=CHECK-NUMERIC %s
66

77
# CHECK-NUMERIC: addi x10, x0, 1

llvm/test/MC/RISCV/option-mix.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# RUN: llvm-mc %s -triple=riscv32 | FileCheck -check-prefix=ASM %s
22
# RUN: llvm-mc %s -triple=riscv64 | FileCheck -check-prefix=ASM %s
33
# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
4-
# RUN: | llvm-objdump -d -riscv-no-aliases - | FileCheck -check-prefix=DISASM %s
4+
# RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefix=DISASM %s
55
# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
6-
# RUN: | llvm-objdump -d -riscv-no-aliases - | FileCheck -check-prefix=DISASM %s
6+
# RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefix=DISASM %s
77

88
# Checks change of options does not cause error: could not find corresponding %pcrel_hi
99
# when assembling pseudoinstruction and its extended form.

llvm/test/MC/RISCV/option-rvc.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# RUN: | llvm-objdump -triple riscv32 -mattr=+c -d - \
77
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-ALIAS %s
88
# RUN: llvm-mc -triple riscv32 -filetype=obj < %s \
9-
# RUN: | llvm-objdump -triple riscv32 -mattr=+c -d -riscv-no-aliases - \
9+
# RUN: | llvm-objdump -triple riscv32 -mattr=+c -d -M no-aliases - \
1010
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-INST %s
1111

1212
# RUN: llvm-mc -triple riscv64 -show-encoding < %s \
@@ -17,7 +17,7 @@
1717
# RUN: | llvm-objdump -triple riscv64 -mattr=+c -d - \
1818
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-ALIAS %s
1919
# RUN: llvm-mc -triple riscv64 -filetype=obj < %s \
20-
# RUN: | llvm-objdump -triple riscv64 -mattr=+c -d -riscv-no-aliases - \
20+
# RUN: | llvm-objdump -triple riscv64 -mattr=+c -d -M no-aliases - \
2121
# RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-INST %s
2222

2323
# CHECK-BYTES: 13 85 05 00

llvm/test/MC/RISCV/priv-valid.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -show-encoding \
44
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-INST %s
55
# RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
6-
# RUN: | llvm-objdump -riscv-no-aliases -d - \
6+
# RUN: | llvm-objdump -M no-aliases -d - \
77
# RUN: | FileCheck -check-prefix=CHECK-INST %s
88
# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
9-
# RUN: | llvm-objdump -riscv-no-aliases -d - \
9+
# RUN: | llvm-objdump -M no-aliases -d - \
1010
# RUN: | FileCheck -check-prefix=CHECK-INST %s
1111

1212
# CHECK-INST: uret

llvm/test/MC/RISCV/rv32-relaxation.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c < %s \
2-
# RUN: | llvm-objdump -d -riscv-no-aliases - | FileCheck -check-prefix=INSTR %s
2+
# RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefix=INSTR %s
33
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,+relax < %s \
4-
# RUN: | llvm-objdump -d -riscv-no-aliases - | FileCheck -check-prefix=RELAX-INSTR %s
4+
# RUN: | llvm-objdump -d -M no-aliases - | FileCheck -check-prefix=RELAX-INSTR %s
55
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,+relax < %s \
66
# RUN: | llvm-readobj -r | FileCheck -check-prefix=RELAX-RELOC %s
77

llvm/test/MC/RISCV/rv32a-valid.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# RUN: llvm-mc %s -triple=riscv64 -mattr=+a -riscv-no-aliases -show-encoding \
44
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
55
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+a < %s \
6-
# RUN: | llvm-objdump -mattr=+a -riscv-no-aliases -d -r - \
6+
# RUN: | llvm-objdump -mattr=+a -M no-aliases -d -r - \
77
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
88
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+a < %s \
9-
# RUN: | llvm-objdump -mattr=+a -riscv-no-aliases -d -r - \
9+
# RUN: | llvm-objdump -mattr=+a -M no-aliases -d -r - \
1010
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
1111

1212
# CHECK-ASM-AND-OBJ: lr.w t0, (t1)

llvm/test/MC/RISCV/rv32c-aliases-valid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc -triple=riscv32 -mattr=+c -riscv-no-aliases < %s \
22
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND,CHECK-INST %s
33
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c < %s \
4-
# RUN: | llvm-objdump -d -riscv-no-aliases - \
4+
# RUN: | llvm-objdump -d -M no-aliases - \
55
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND,CHECK-INST %s
66

77
# The following check prefixes are used in this test:

llvm/test/MC/RISCV/rv32c-only-valid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc %s -triple=riscv32 -mattr=+c -riscv-no-aliases -show-encoding \
22
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
33
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c < %s \
4-
# RUN: | llvm-objdump -mattr=+c -riscv-no-aliases -d -r - \
4+
# RUN: | llvm-objdump -mattr=+c -M no-aliases -d -r - \
55
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
66
#
77
# RUN: not llvm-mc -triple riscv32 \

llvm/test/MC/RISCV/rv32c-valid.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# RUN: llvm-mc %s -triple=riscv32 -mattr=+c -riscv-no-aliases -show-encoding \
22
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
33
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c < %s \
4-
# RUN: | llvm-objdump -mattr=+c -riscv-no-aliases -d -r - \
4+
# RUN: | llvm-objdump -mattr=+c -M no-aliases -d -r - \
55
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
66
# RUN: llvm-mc %s -triple=riscv64 -mattr=+c -riscv-no-aliases -show-encoding \
77
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
88
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+c < %s \
9-
# RUN: | llvm-objdump -mattr=+c -riscv-no-aliases -d -r - \
9+
# RUN: | llvm-objdump -mattr=+c -M no-aliases -d -r - \
1010
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
1111

1212
# TODO: more exhaustive testing of immediate encoding.

llvm/test/MC/RISCV/rv32d-valid.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# RUN: llvm-mc %s -triple=riscv32 -mattr=+d -riscv-no-aliases -show-encoding \
22
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
33
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+d < %s \
4-
# RUN: | llvm-objdump -mattr=+d -riscv-no-aliases -d -r - \
4+
# RUN: | llvm-objdump -mattr=+d -M no-aliases -d -r - \
55
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
66
# RUN: llvm-mc %s -triple=riscv64 -mattr=+d -riscv-no-aliases -show-encoding \
77
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
88
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+d < %s \
9-
# RUN: | llvm-objdump -mattr=+d -riscv-no-aliases -d -r - \
9+
# RUN: | llvm-objdump -mattr=+d -M no-aliases -d -r - \
1010
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
1111

1212
# Support for the 'D' extension implies support for 'F'

llvm/test/MC/RISCV/rv32dc-valid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc %s -triple=riscv32 -mattr=+c,+d -riscv-no-aliases -show-encoding \
22
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
33
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c,+d < %s \
4-
# RUN: | llvm-objdump -mattr=+c,+d -riscv-no-aliases -d -r - \
4+
# RUN: | llvm-objdump -mattr=+c,+d -M no-aliases -d -r - \
55
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
66
#
77
# RUN: not llvm-mc -triple riscv32 -mattr=+c \

llvm/test/MC/RISCV/rv32e-invalid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# RUN: not llvm-mc -triple riscv32 -mattr=+e < %s 2>&1 | FileCheck %s
22
# RUN: llvm-mc -filetype=obj -triple=riscv32 < %s \
3-
# RUN: | llvm-objdump -mattr=+e -riscv-no-aliases -d -r - \
3+
# RUN: | llvm-objdump -mattr=+e -M no-aliases -d -r - \
44
# RUN: | FileCheck -check-prefix=CHECK-DIS %s
55

66
# Perform a simple sanity check that registers x16-x31 (and the equivalent

llvm/test/MC/RISCV/rv32e-valid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -mattr=+e -show-encoding \
22
# RUN: | FileCheck -check-prefix=CHECK-ASM-AND-OBJ %s
33
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+e < %s \
4-
# RUN: | llvm-objdump -riscv-no-aliases -d -r - \
4+
# RUN: | llvm-objdump -M no-aliases -d -r - \
55
# RUN: | FileCheck -check-prefix=CHECK-ASM-AND-OBJ %s
66

77
# This file provides a basic sanity check for RV32E, checking that the expected

llvm/test/MC/RISCV/rv32f-valid.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# RUN: llvm-mc %s -triple=riscv64 -mattr=+f -riscv-no-aliases -show-encoding \
44
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
55
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+f < %s \
6-
# RUN: | llvm-objdump -mattr=+f -riscv-no-aliases -d -r - \
6+
# RUN: | llvm-objdump -mattr=+f -M no-aliases -d -r - \
77
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
88
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+f < %s \
9-
# RUN: | llvm-objdump -mattr=+f -riscv-no-aliases -d -r - \
9+
# RUN: | llvm-objdump -mattr=+f -M no-aliases -d -r - \
1010
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
1111

1212
# CHECK-ASM-AND-OBJ: flw ft0, 12(a0)

llvm/test/MC/RISCV/rv32fc-aliases-valid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc %s -triple=riscv32 -mattr=+c,+f -riscv-no-aliases \
22
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s
33
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,+f < %s \
4-
# RUN: | llvm-objdump -mattr=+c,+f -riscv-no-aliases -d - \
4+
# RUN: | llvm-objdump -mattr=+c,+f -M no-aliases -d - \
55
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s
66

77
# CHECK-EXPAND: c.flw fs0, 0(s1)

llvm/test/MC/RISCV/rv32fc-valid.s

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: llvm-mc %s -triple=riscv32 -mattr=+c,+f -riscv-no-aliases -show-encoding \
22
# RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
33
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c,+f < %s \
4-
# RUN: | llvm-objdump -mattr=+c,+f -riscv-no-aliases -d -r - \
4+
# RUN: | llvm-objdump -mattr=+c,+f -M no-aliases -d -r - \
55
# RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
66
#
77
# RUN: not llvm-mc -triple riscv32 -mattr=+c \

0 commit comments

Comments
 (0)