[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / RISCV / option-rvc.s
blobe1762e7f2f16ec5d5fe02e9d4c72458d63a5bc84
1 # RUN: llvm-mc -triple riscv32 -show-encoding < %s \
2 # RUN: | FileCheck -check-prefixes=CHECK,CHECK-ALIAS %s
3 # RUN: llvm-mc -triple riscv32 -show-encoding \
4 # RUN: -riscv-no-aliases <%s | FileCheck -check-prefixes=CHECK,CHECK-INST %s
5 # RUN: llvm-mc -triple riscv32 -filetype=obj < %s \
6 # RUN: | llvm-objdump -triple riscv32 -mattr=+c -d - \
7 # RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-ALIAS %s
8 # RUN: llvm-mc -triple riscv32 -filetype=obj < %s \
9 # RUN: | llvm-objdump -triple riscv32 -mattr=+c -d -M no-aliases - \
10 # RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-INST %s
12 # RUN: llvm-mc -triple riscv64 -show-encoding < %s \
13 # RUN: | FileCheck -check-prefixes=CHECK-ALIAS %s
14 # RUN: llvm-mc -triple riscv64 -show-encoding \
15 # RUN: -riscv-no-aliases <%s | FileCheck -check-prefixes=CHECK-INST %s
16 # RUN: llvm-mc -triple riscv64 -filetype=obj < %s \
17 # RUN: | llvm-objdump -triple riscv64 -mattr=+c -d - \
18 # RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-ALIAS %s
19 # RUN: llvm-mc -triple riscv64 -filetype=obj < %s \
20 # RUN: | llvm-objdump -triple riscv64 -mattr=+c -d -M no-aliases - \
21 # RUN: | FileCheck -check-prefixes=CHECK-BYTES,CHECK-INST %s
23 # CHECK-BYTES: 13 85 05 00
24 # CHECK-ALIAS: mv a0, a1
25 # CHECK-INST: addi a0, a1, 0
26 # CHECK: # encoding: [0x13,0x85,0x05,0x00]
27 addi a0, a1, 0
29 # CHECK-BYTES: 13 04 c1 3f
30 # CHECK-ALIAS: addi s0, sp, 1020
31 # CHECK-INST: addi s0, sp, 1020
32 # CHECK: # encoding: [0x13,0x04,0xc1,0x3f]
33 addi s0, sp, 1020
36 # CHECK: .option rvc
37 .option rvc
38 # CHECK-BYTES: 2e 85
39 # CHECK-ALIAS: add a0, zero, a1
40 # CHECK-INST: c.mv a0, a1
41 # CHECK: # encoding: [0x2e,0x85]
42 addi a0, a1, 0
44 # CHECK-BYTES: e0 1f
45 # CHECK-ALIAS: addi s0, sp, 1020
46 # CHECK-INST: c.addi4spn s0, sp, 1020
47 # CHECK: # encoding: [0xe0,0x1f]
48 addi s0, sp, 1020
50 # CHECK: .option norvc
51 .option norvc
52 # CHECK-BYTES: 13 85 05 00
53 # CHECK-ALIAS: mv a0, a1
54 # CHECK-INST: addi a0, a1, 0
55 # CHECK: # encoding: [0x13,0x85,0x05,0x00]
56 addi a0, a1, 0
58 # CHECK-BYTES: 13 04 c1 3f
59 # CHECK-ALIAS: addi s0, sp, 1020
60 # CHECK-INST: addi s0, sp, 1020
61 # CHECK: # encoding: [0x13,0x04,0xc1,0x3f]
62 addi s0, sp, 1020
64 # CHECK: .option rvc
65 .option rvc
66 # CHECK-BYTES: 2e 85
67 # CHECK-ALIAS: add a0, zero, a1
68 # CHECK-INST: c.mv a0, a1
69 # CHECK: # encoding: [0x2e,0x85]
70 addi a0, a1, 0
72 # CHECK-BYTES: e0 1f
73 # CHECK-ALIAS: addi s0, sp, 1020
74 # CHECK-INST: c.addi4spn s0, sp, 1020
75 # CHECK: # encoding: [0xe0,0x1f]
76 addi s0, sp, 1020
78 # CHECK: .option norvc
79 .option norvc
80 # CHECK-BYTES: 13 85 05 00
81 # CHECK-ALIAS: mv a0, a1
82 # CHECK-INST: addi a0, a1, 0
83 # CHECK: # encoding: [0x13,0x85,0x05,0x00]
84 addi a0, a1, 0
86 # CHECK-BYTES: 13 04 c1 3f
87 # CHECK-ALIAS: addi s0, sp, 1020
88 # CHECK-INST: addi s0, sp, 1020
89 # CHECK: # encoding: [0x13,0x04,0xc1,0x3f]
90 addi s0, sp, 1020