1 # RUN: llvm-mc -triple riscv32 -mattr=+xwchc -show-encoding < %s \
2 # RUN: | FileCheck -check-prefixes=CHECK,CHECK-ALIAS %s
3 # RUN: llvm-mc -triple riscv32 -mattr=+xwchc -show-encoding \
4 # RUN: -M no-aliases < %s | FileCheck -check-prefixes=CHECK,CHECK-INST %s
5 # RUN: llvm-mc -triple riscv32 -mattr=+xwchc -filetype=obj < %s \
6 # RUN: | llvm-objdump --triple=riscv32 --mattr=+xwchc --no-print-imm-hex -d - \
7 # RUN: | FileCheck -check-prefixes=CHECK-ALIAS %s
8 # RUN: llvm-mc -triple riscv32 -mattr=+xwchc -filetype=obj < %s \
9 # RUN: | llvm-objdump --triple=riscv32 --mattr=+xwchc --no-print-imm-hex -d -M no-aliases - \
10 # RUN: | FileCheck -check-prefixes=CHECK-INST %s
13 # CHECK-ALIAS: lbu s0, 5(s1)
14 # CHECK-INST: qk.c.lbu s0, 5(s1)
15 # CHECK: # encoding: [0xc0,0x30]
18 # CHECK-ALIAS: lbu s0, 31(a0)
19 # CHECK-INST: qk.c.lbu s0, 31(a0)
20 # CHECK: # encoding: [0x60,0x3d]
23 # CHECK-ALIAS: lbu s0, 0(s2)
24 # CHECK-INST: lbu s0, 0(s2)
25 # CHECK: # encoding: [0x03,0x44,0x09,0x00]
28 # CHECK-ALIAS: lbu s0, 32(s0)
29 # CHECK-INST: lbu s0, 32(s0)
30 # CHECK: # encoding: [0x03,0x44,0x04,0x02]
34 # CHECK-ALIAS: sb s0, 5(s1)
35 # CHECK-INST: qk.c.sb s0, 5(s1)
36 # CHECK: # encoding: [0xc0,0xb0]
39 # CHECK-ALIAS: sb s0, 31(a0)
40 # CHECK-INST: qk.c.sb s0, 31(a0)
41 # CHECK: # encoding: [0x60,0xbd]
44 # CHECK-ALIAS: sb s0, 0(s2)
45 # CHECK-INST: sb s0, 0(s2)
46 # CHECK: # encoding: [0x23,0x00,0x89,0x00]
49 # CHECK-ALIAS: sb s0, 32(s0)
50 # CHECK-INST: sb s0, 32(s0)
51 # CHECK: # encoding: [0x23,0x00,0x84,0x02]
55 # CHECK-ALIAS: lhu s0, 10(s1)
56 # CHECK-INST: qk.c.lhu s0, 10(s1)
57 # CHECK: # encoding: [0xa2,0x24]
60 # CHECK-ALIAS: lhu s0, 62(a0)
61 # CHECK-INST: qk.c.lhu s0, 62(a0)
62 # CHECK: # encoding: [0x62,0x3d]
65 # CHECK-ALIAS: lhu s0, 0(s2)
66 # CHECK-INST: lhu s0, 0(s2)
67 # CHECK: # encoding: [0x03,0x54,0x09,0x00]
70 # CHECK-ALIAS: lhu s0, 1(s0)
71 # CHECK-INST: lhu s0, 1(s0)
72 # CHECK: # encoding: [0x03,0x54,0x14,0x00]
75 # CHECK-ALIAS: lhu s0, 64(s0)
76 # CHECK-INST: lhu s0, 64(s0)
77 # CHECK: # encoding: [0x03,0x54,0x04,0x04]
81 # CHECK-ALIAS: sh s0, 10(s1)
82 # CHECK-INST: qk.c.sh s0, 10(s1)
83 # CHECK: # encoding: [0xa2,0xa4]
86 # CHECK-ALIAS: sh s0, 62(a0)
87 # CHECK-INST: qk.c.sh s0, 62(a0)
88 # CHECK: # encoding: [0x62,0xbd]
91 # CHECK-ALIAS: sh s0, 0(s2)
92 # CHECK-INST: sh s0, 0(s2)
93 # CHECK: # encoding: [0x23,0x10,0x89,0x00]
96 # CHECK-ALIAS: sh s0, 1(s0)
97 # CHECK-INST: sh s0, 1(s0)
98 # CHECK: # encoding: [0xa3,0x10,0x84,0x00]
101 # CHECK-ALIAS: sh s0, 64(s0)
102 # CHECK-INST: sh s0, 64(s0)
103 # CHECK: # encoding: [0x23,0x10,0x84,0x04]
107 # CHECK-ALIAS: lbu a2, 7(sp)
108 # CHECK-INST: qk.c.lbusp a2, 7(sp)
109 # CHECK: # encoding: [0x90,0x83]
112 # CHECK-ALIAS: lbu a2, 15(sp)
113 # CHECK-INST: qk.c.lbusp a2, 15(sp)
114 # CHECK: # encoding: [0x90,0x87]
117 # CHECK-ALIAS: lbu s2, 0(sp)
118 # CHECK-INST: lbu s2, 0(sp)
119 # CHECK: # encoding: [0x03,0x49,0x01,0x00]
122 # CHECK-ALIAS: lbu s0, 16(sp)
123 # CHECK-INST: lbu s0, 16(sp)
124 # CHECK: # encoding: [0x03,0x44,0x01,0x01]
128 # CHECK-ALIAS: sb a2, 7(sp)
129 # CHECK-INST: qk.c.sbsp a2, 7(sp)
130 # CHECK: # encoding: [0xd0,0x83]
133 # CHECK-ALIAS: sb a2, 15(sp)
134 # CHECK-INST: qk.c.sbsp a2, 15(sp)
135 # CHECK: # encoding: [0xd0,0x87]
138 # CHECK-ALIAS: sb s2, 0(sp)
139 # CHECK-INST: sb s2, 0(sp)
140 # CHECK: # encoding: [0x23,0x00,0x21,0x01]
143 # CHECK-ALIAS: sb s0, 16(sp)
144 # CHECK-INST: sb s0, 16(sp)
145 # CHECK: # encoding: [0x23,0x08,0x81,0x00]
149 # CHECK-ALIAS: lhu a2, 14(sp)
150 # CHECK-INST: qk.c.lhusp a2, 14(sp)
151 # CHECK: # encoding: [0x30,0x87]
154 # CHECK-ALIAS: lhu a2, 30(sp)
155 # CHECK-INST: qk.c.lhusp a2, 30(sp)
156 # CHECK: # encoding: [0xb0,0x87]
159 # CHECK-ALIAS: lhu s2, 0(sp)
160 # CHECK-INST: lhu s2, 0(sp)
161 # CHECK: # encoding: [0x03,0x59,0x01,0x00]
164 # CHECK-ALIAS: lhu s2, 1(sp)
165 # CHECK-INST: lhu s2, 1(sp)
166 # CHECK: # encoding: [0x03,0x59,0x11,0x00]
169 # CHECK-ALIAS: lhu s0, 32(sp)
170 # CHECK-INST: lhu s0, 32(sp)
171 # CHECK: # encoding: [0x03,0x54,0x01,0x02]
175 # CHECK-ALIAS: sh a2, 14(sp)
176 # CHECK-INST: qk.c.shsp a2, 14(sp)
177 # CHECK: # encoding: [0x70,0x87]
180 # CHECK-ALIAS: sh a2, 30(sp)
181 # CHECK-INST: qk.c.shsp a2, 30(sp)
182 # CHECK: # encoding: [0xf0,0x87]
185 # CHECK-ALIAS: sh s2, 0(sp)
186 # CHECK-INST: sh s2, 0(sp)
187 # CHECK: # encoding: [0x23,0x10,0x21,0x01]
190 # CHECK-ALIAS: sh s2, 1(sp)
191 # CHECK-INST: sh s2, 1(sp)
192 # CHECK: # encoding: [0xa3,0x10,0x21,0x01]
195 # CHECK-ALIAS: sh s0, 32(sp)
196 # CHECK-INST: sh s0, 32(sp)
197 # CHECK: # encoding: [0x23,0x10,0x81,0x02]