[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / RISCV / rv64a-valid.s
blobc660f1b517a3ee5451d9e465f6ccb86dc4c99fc7
1 # RUN: llvm-mc %s -triple=riscv64 -mattr=+a -riscv-no-aliases -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+a < %s \
4 # RUN: | llvm-objdump -mattr=+a -M no-aliases -d -r - \
5 # RUN: | FileCheck -check-prefixes=CHECK-OBJ,CHECK-ASM-AND-OBJ %s
7 # RUN: not llvm-mc -triple riscv32 -mattr=+a < %s 2>&1 \
8 # RUN: | FileCheck -check-prefix=CHECK-RV32 %s
10 # FIXME: error messages for rv32a are misleading
12 # CHECK-ASM-AND-OBJ: lr.d t0, (t1)
13 # CHECK-ASM: encoding: [0xaf,0x32,0x03,0x10]
14 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
15 lr.d t0, (t1)
16 # CHECK-ASM-AND-OBJ: lr.d.aq t1, (t2)
17 # CHECK-ASM: encoding: [0x2f,0xb3,0x03,0x14]
18 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
19 lr.d.aq t1, (t2)
20 # CHECK-ASM-AND-OBJ: lr.d.rl t2, (t3)
21 # CHECK-ASM: encoding: [0xaf,0x33,0x0e,0x12]
22 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
23 lr.d.rl t2, (t3)
24 # CHECK-ASM-AND-OBJ: lr.d.aqrl t3, (t4)
25 # CHECK-ASM: encoding: [0x2f,0xbe,0x0e,0x16]
26 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
27 lr.d.aqrl t3, (t4)
29 # CHECK-ASM-AND-OBJ: sc.d t6, t5, (t4)
30 # CHECK-ASM: encoding: [0xaf,0xbf,0xee,0x19]
31 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
32 sc.d t6, t5, (t4)
33 # CHECK-ASM-AND-OBJ: sc.d.aq t5, t4, (t3)
34 # CHECK-ASM: encoding: [0x2f,0x3f,0xde,0x1d]
35 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
36 sc.d.aq t5, t4, (t3)
37 # CHECK-ASM-AND-OBJ: sc.d.rl t4, t3, (t2)
38 # CHECK-ASM: encoding: [0xaf,0xbe,0xc3,0x1b]
39 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
40 sc.d.rl t4, t3, (t2)
41 # CHECK-ASM-AND-OBJ: sc.d.aqrl t3, t2, (t1)
42 # CHECK-ASM: encoding: [0x2f,0x3e,0x73,0x1e]
43 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
44 sc.d.aqrl t3, t2, (t1)
46 # CHECK-ASM-AND-OBJ: amoswap.d a4, ra, (s0)
47 # CHECK-ASM: encoding: [0x2f,0x37,0x14,0x08]
48 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
49 amoswap.d a4, ra, (s0)
50 # CHECK-ASM-AND-OBJ: amoadd.d a1, a2, (a3)
51 # CHECK-ASM: encoding: [0xaf,0xb5,0xc6,0x00]
52 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
53 amoadd.d a1, a2, (a3)
54 # CHECK-ASM-AND-OBJ: amoxor.d a2, a3, (a4)
55 # CHECK-ASM: encoding: [0x2f,0x36,0xd7,0x20]
56 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
57 amoxor.d a2, a3, (a4)
58 # CHECK-ASM-AND-OBJ: amoand.d a3, a4, (a5)
59 # CHECK-ASM: encoding: [0xaf,0xb6,0xe7,0x60]
60 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
61 amoand.d a3, a4, (a5)
62 # CHECK-ASM-AND-OBJ: amoor.d a4, a5, (a6)
63 # CHECK-ASM: encoding: [0x2f,0x37,0xf8,0x40]
64 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
65 amoor.d a4, a5, (a6)
66 # CHECK-ASM-AND-OBJ: amomin.d a5, a6, (a7)
67 # CHECK-ASM: encoding: [0xaf,0xb7,0x08,0x81]
68 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
69 amomin.d a5, a6, (a7)
70 # CHECK-ASM-AND-OBJ: amomax.d s7, s6, (s5)
71 # CHECK-ASM: encoding: [0xaf,0xbb,0x6a,0xa1]
72 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
73 amomax.d s7, s6, (s5)
74 # CHECK-ASM-AND-OBJ: amominu.d s6, s5, (s4)
75 # CHECK-ASM: encoding: [0x2f,0x3b,0x5a,0xc1]
76 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
77 amominu.d s6, s5, (s4)
78 # CHECK-ASM-AND-OBJ: amomaxu.d s5, s4, (s3)
79 # CHECK-ASM: encoding: [0xaf,0xba,0x49,0xe1]
80 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
81 amomaxu.d s5, s4, (s3)
84 # CHECK-ASM-AND-OBJ: amoswap.d.aq a4, ra, (s0)
85 # CHECK-ASM: encoding: [0x2f,0x37,0x14,0x0c]
86 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
87 amoswap.d.aq a4, ra, (s0)
88 # CHECK-ASM-AND-OBJ: amoadd.d.aq a1, a2, (a3)
89 # CHECK-ASM: encoding: [0xaf,0xb5,0xc6,0x04]
90 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
91 amoadd.d.aq a1, a2, (a3)
92 # CHECK-ASM-AND-OBJ: amoxor.d.aq a2, a3, (a4)
93 # CHECK-ASM: encoding: [0x2f,0x36,0xd7,0x24]
94 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
95 amoxor.d.aq a2, a3, (a4)
96 # CHECK-ASM-AND-OBJ: amoand.d.aq a3, a4, (a5)
97 # CHECK-ASM: encoding: [0xaf,0xb6,0xe7,0x64]
98 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
99 amoand.d.aq a3, a4, (a5)
100 # CHECK-ASM-AND-OBJ: amoor.d.aq a4, a5, (a6)
101 # CHECK-ASM: encoding: [0x2f,0x37,0xf8,0x44]
102 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
103 amoor.d.aq a4, a5, (a6)
104 # CHECK-ASM-AND-OBJ: amomin.d.aq a5, a6, (a7)
105 # CHECK-ASM: encoding: [0xaf,0xb7,0x08,0x85]
106 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
107 amomin.d.aq a5, a6, (a7)
108 # CHECK-ASM-AND-OBJ: amomax.d.aq s7, s6, (s5)
109 # CHECK-ASM: encoding: [0xaf,0xbb,0x6a,0xa5]
110 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
111 amomax.d.aq s7, s6, (s5)
112 # CHECK-ASM-AND-OBJ: amominu.d.aq s6, s5, (s4)
113 # CHECK-ASM: encoding: [0x2f,0x3b,0x5a,0xc5]
114 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
115 amominu.d.aq s6, s5, (s4)
116 # CHECK-ASM-AND-OBJ: amomaxu.d.aq s5, s4, (s3)
117 # CHECK-ASM: encoding: [0xaf,0xba,0x49,0xe5]
118 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
119 amomaxu.d.aq s5, s4, (s3)
121 # CHECK-ASM-AND-OBJ: amoswap.d.rl a4, ra, (s0)
122 # CHECK-ASM: encoding: [0x2f,0x37,0x14,0x0a]
123 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
124 amoswap.d.rl a4, ra, (s0)
125 # CHECK-ASM-AND-OBJ: amoadd.d.rl a1, a2, (a3)
126 # CHECK-ASM: encoding: [0xaf,0xb5,0xc6,0x02]
127 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
128 amoadd.d.rl a1, a2, (a3)
129 # CHECK-ASM-AND-OBJ: amoxor.d.rl a2, a3, (a4)
130 # CHECK-ASM: encoding: [0x2f,0x36,0xd7,0x22]
131 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
132 amoxor.d.rl a2, a3, (a4)
133 # CHECK-ASM-AND-OBJ: amoand.d.rl a3, a4, (a5)
134 # CHECK-ASM: encoding: [0xaf,0xb6,0xe7,0x62]
135 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
136 amoand.d.rl a3, a4, (a5)
137 # CHECK-ASM-AND-OBJ: amoor.d.rl a4, a5, (a6)
138 # CHECK-ASM: encoding: [0x2f,0x37,0xf8,0x42]
139 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
140 amoor.d.rl a4, a5, (a6)
141 # CHECK-ASM-AND-OBJ: amomin.d.rl a5, a6, (a7)
142 # CHECK-ASM: encoding: [0xaf,0xb7,0x08,0x83]
143 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
144 amomin.d.rl a5, a6, (a7)
145 # CHECK-ASM-AND-OBJ: amomax.d.rl s7, s6, (s5)
146 # CHECK-ASM: encoding: [0xaf,0xbb,0x6a,0xa3]
147 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
148 amomax.d.rl s7, s6, (s5)
149 # CHECK-ASM-AND-OBJ: amominu.d.rl s6, s5, (s4)
150 # CHECK-ASM: encoding: [0x2f,0x3b,0x5a,0xc3]
151 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
152 amominu.d.rl s6, s5, (s4)
153 # CHECK-ASM-AND-OBJ: amomaxu.d.rl s5, s4, (s3)
154 # CHECK-ASM: encoding: [0xaf,0xba,0x49,0xe3]
155 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
156 amomaxu.d.rl s5, s4, (s3)
158 # CHECK-ASM-AND-OBJ: amoswap.d.aqrl a4, ra, (s0)
159 # CHECK-ASM: encoding: [0x2f,0x37,0x14,0x0e]
160 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
161 amoswap.d.aqrl a4, ra, (s0)
162 # CHECK-ASM-AND-OBJ: amoadd.d.aqrl a1, a2, (a3)
163 # CHECK-ASM: encoding: [0xaf,0xb5,0xc6,0x06]
164 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
165 amoadd.d.aqrl a1, a2, (a3)
166 # CHECK-ASM-AND-OBJ: amoxor.d.aqrl a2, a3, (a4)
167 # CHECK-ASM: encoding: [0x2f,0x36,0xd7,0x26]
168 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
169 amoxor.d.aqrl a2, a3, (a4)
170 # CHECK-ASM-AND-OBJ: amoand.d.aqrl a3, a4, (a5)
171 # CHECK-ASM: encoding: [0xaf,0xb6,0xe7,0x66]
172 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
173 amoand.d.aqrl a3, a4, (a5)
174 # CHECK-ASM-AND-OBJ: amoor.d.aqrl a4, a5, (a6)
175 # CHECK-ASM: encoding: [0x2f,0x37,0xf8,0x46]
176 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
177 amoor.d.aqrl a4, a5, (a6)
178 # CHECK-ASM-AND-OBJ: amomin.d.aqrl a5, a6, (a7)
179 # CHECK-ASM: encoding: [0xaf,0xb7,0x08,0x87]
180 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
181 amomin.d.aqrl a5, a6, (a7)
182 # CHECK-ASM-AND-OBJ: amomax.d.aqrl s7, s6, (s5)
183 # CHECK-ASM: encoding: [0xaf,0xbb,0x6a,0xa7]
184 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
185 amomax.d.aqrl s7, s6, (s5)
186 # CHECK-ASM-AND-OBJ: amominu.d.aqrl s6, s5, (s4)
187 # CHECK-ASM: encoding: [0x2f,0x3b,0x5a,0xc7]
188 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
189 amominu.d.aqrl s6, s5, (s4)
190 # CHECK-ASM-AND-OBJ: amomaxu.d.aqrl s5, s4, (s3)
191 # CHECK-ASM: encoding: [0xaf,0xba,0x49,0xe7]
192 # CHECK-RV32: :[[@LINE+1]]:1: error: instruction use requires an option to be enabled
193 amomaxu.d.aqrl s5, s4, (s3)