OLD | NEW |
1 ; Tests assembly of ldrex and strex instructions | 1 ; Tests assembly of ldrex and strex instructions |
2 | 2 |
3 ; REQUIRES: allow_dump | 3 ; REQUIRES: allow_dump |
4 | 4 |
5 ; Compile using standalone assembler. | 5 ; Compile using standalone assembler. |
6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ | 6 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ |
7 ; RUN: | FileCheck %s --check-prefix=ASM | 7 ; RUN: | FileCheck %s --check-prefix=ASM |
8 | 8 |
9 ; Show bytes in assembled standalone code. | 9 ; Show bytes in assembled standalone code. |
10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | 10 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ |
(...skipping 25 matching lines...) Expand all Loading... |
36 ; IASM-NEXT:.LtestI8Form$entry: | 36 ; IASM-NEXT:.LtestI8Form$entry: |
37 | 37 |
38 ; ASM-NEXT: sub sp, sp, #28 | 38 ; ASM-NEXT: sub sp, sp, #28 |
39 ; DIS-NEXT: 0: e24dd01c | 39 ; DIS-NEXT: 0: e24dd01c |
40 ; IASM-NEXT: .byte 0x1c | 40 ; IASM-NEXT: .byte 0x1c |
41 ; IASM-NEXT: .byte 0xd0 | 41 ; IASM-NEXT: .byte 0xd0 |
42 ; IASM-NEXT: .byte 0x4d | 42 ; IASM-NEXT: .byte 0x4d |
43 ; IASM-NEXT: .byte 0xe2 | 43 ; IASM-NEXT: .byte 0xe2 |
44 | 44 |
45 ; ASM-NEXT: str r0, [sp, #24] | 45 ; ASM-NEXT: str r0, [sp, #24] |
46 ; ASM-NEXT: # [sp, #24] = def.pseudo | 46 ; ASM-NEXT: # [sp, #24] = def.pseudo |
47 ; DIS-NEXT: 4: e58d0018 | 47 ; DIS-NEXT: 4: e58d0018 |
48 ; IASM-NEXT: .byte 0x18 | 48 ; IASM-NEXT: .byte 0x18 |
49 ; IASM-NEXT: .byte 0x0 | 49 ; IASM-NEXT: .byte 0x0 |
50 ; IASM-NEXT: .byte 0x8d | 50 ; IASM-NEXT: .byte 0x8d |
51 ; IASM-NEXT: .byte 0xe5 | 51 ; IASM-NEXT: .byte 0xe5 |
52 | 52 |
53 ; ASM-NEXT: str r1, [sp, #20] | 53 ; ASM-NEXT: str r1, [sp, #20] |
54 ; ASM-NEXT: # [sp, #20] = def.pseudo | 54 ; ASM-NEXT: # [sp, #20] = def.pseudo |
55 ; DIS-NEXT: 8: e58d1014 | 55 ; DIS-NEXT: 8: e58d1014 |
56 ; IASM-NEXT: .byte 0x14 | 56 ; IASM-NEXT: .byte 0x14 |
57 ; IASM-NEXT: .byte 0x10 | 57 ; IASM-NEXT: .byte 0x10 |
58 ; IASM-NEXT: .byte 0x8d | 58 ; IASM-NEXT: .byte 0x8d |
59 ; IASM-NEXT: .byte 0xe5 | 59 ; IASM-NEXT: .byte 0xe5 |
60 | 60 |
61 %ptr.asptr = inttoptr i32 %ptr to i8* | 61 %ptr.asptr = inttoptr i32 %ptr to i8* |
62 %a.arg_trunc = trunc i32 %a to i8 | 62 %a.arg_trunc = trunc i32 %a to i8 |
63 | 63 |
64 ; ASM-NEXT: ldr r0, [sp, #20] | 64 ; ASM-NEXT: ldr r0, [sp, #20] |
65 ; DIS-NEXT: c: e59d0014 | 65 ; DIS-NEXT: c: e59d0014 |
66 ; IASM-NEXT: .byte 0x14 | 66 ; IASM-NEXT: .byte 0x14 |
67 ; IASM-NEXT: .byte 0x0 | 67 ; IASM-NEXT: .byte 0x0 |
68 ; IASM-NEXT: .byte 0x9d | 68 ; IASM-NEXT: .byte 0x9d |
69 ; IASM-NEXT: .byte 0xe5 | 69 ; IASM-NEXT: .byte 0xe5 |
70 | 70 |
71 ; ASM-NEXT: strb r0, [sp, #16] | 71 ; ASM-NEXT: strb r0, [sp, #16] |
72 ; DIS-NEXT: 10: e5cd0010 | 72 ; DIS-NEXT: 10: e5cd0010 |
73 ; ASM-NEXT: # [sp, #16] = def.pseudo | 73 ; ASM-NEXT: # [sp, #16] = def.pseudo |
74 ; IASM-NEXT: .byte 0x10 | 74 ; IASM-NEXT: .byte 0x10 |
75 ; IASM-NEXT: .byte 0x0 | 75 ; IASM-NEXT: .byte 0x0 |
76 ; IASM-NEXT: .byte 0xcd | 76 ; IASM-NEXT: .byte 0xcd |
77 ; IASM-NEXT: .byte 0xe5 | 77 ; IASM-NEXT: .byte 0xe5 |
78 | 78 |
79 %v = call i8 @llvm.nacl.atomic.rmw.i8(i32 1, i8* %ptr.asptr, | 79 %v = call i8 @llvm.nacl.atomic.rmw.i8(i32 1, i8* %ptr.asptr, |
80 i8 %a.arg_trunc, i32 6) | 80 i8 %a.arg_trunc, i32 6) |
81 | 81 |
82 ; ASM-NEXT: ldrb r0, [sp, #16] | 82 ; ASM-NEXT: ldrb r0, [sp, #16] |
83 ; DIS-NEXT: 14: e5dd0010 | 83 ; DIS-NEXT: 14: e5dd0010 |
84 ; IASM-NEXT: .byte 0x10 | 84 ; IASM-NEXT: .byte 0x10 |
85 ; IASM-NEXT: .byte 0x0 | 85 ; IASM-NEXT: .byte 0x0 |
86 ; IASM-NEXT: .byte 0xdd | 86 ; IASM-NEXT: .byte 0xdd |
87 ; IASM-NEXT: .byte 0xe5 | 87 ; IASM-NEXT: .byte 0xe5 |
88 | 88 |
89 ; ASM-NEXT: strb r0, [sp, #4] | 89 ; ASM-NEXT: strb r0, [sp, #4] |
90 ; ASM-NEXT: # [sp, #4] = def.pseudo | 90 ; ASM-NEXT: # [sp, #4] = def.pseudo |
91 ; DIS-NEXT: 18: e5cd0004 | 91 ; DIS-NEXT: 18: e5cd0004 |
92 ; IASM-NEXT: .byte 0x4 | 92 ; IASM-NEXT: .byte 0x4 |
93 ; IASM-NEXT: .byte 0x0 | 93 ; IASM-NEXT: .byte 0x0 |
94 ; IASM-NEXT: .byte 0xcd | 94 ; IASM-NEXT: .byte 0xcd |
95 ; IASM-NEXT: .byte 0xe5 | 95 ; IASM-NEXT: .byte 0xe5 |
96 | 96 |
97 ; ASM-NEXT: ldr r0, [sp, #24] | 97 ; ASM-NEXT: ldr r0, [sp, #24] |
98 ; DIS-NEXT: 1c: e59d0018 | 98 ; DIS-NEXT: 1c: e59d0018 |
99 ; IASM-NEXT: .byte 0x18 | 99 ; IASM-NEXT: .byte 0x18 |
100 ; IASM-NEXT: .byte 0x0 | 100 ; IASM-NEXT: .byte 0x0 |
101 ; IASM-NEXT: .byte 0x9d | 101 ; IASM-NEXT: .byte 0x9d |
102 ; IASM-NEXT: .byte 0xe5 | 102 ; IASM-NEXT: .byte 0xe5 |
103 | 103 |
104 ; ASM-NEXT: str r0, [sp] | 104 ; ASM-NEXT: str r0, [sp] |
105 ; ASM-NEXT: # [sp] = def.pseudo | 105 ; ASM-NEXT: # [sp] = def.pseudo |
106 ; DIS-NEXT: 20: e58d0000 | 106 ; DIS-NEXT: 20: e58d0000 |
107 ; IASM-NEXT: .byte 0x0 | 107 ; IASM-NEXT: .byte 0x0 |
108 ; IASM-NEXT: .byte 0x0 | 108 ; IASM-NEXT: .byte 0x0 |
109 ; IASM-NEXT: .byte 0x8d | 109 ; IASM-NEXT: .byte 0x8d |
110 ; IASM-NEXT: .byte 0xe5 | 110 ; IASM-NEXT: .byte 0xe5 |
111 | 111 |
112 ; ASM-NEXT: dmb sy | 112 ; ASM-NEXT: dmb sy |
113 ; DIS-NEXT: 24: f57ff05f | 113 ; DIS-NEXT: 24: f57ff05f |
114 ; IASM-NEXT: .byte 0x5f | 114 ; IASM-NEXT: .byte 0x5f |
115 ; IASM-NEXT: .byte 0xf0 | 115 ; IASM-NEXT: .byte 0xf0 |
(...skipping 26 matching lines...) Expand all Loading... |
142 | 142 |
143 ; ***** Example of ldrexb ***** | 143 ; ***** Example of ldrexb ***** |
144 ; ASM-NEXT: ldrexb r2, [r0] | 144 ; ASM-NEXT: ldrexb r2, [r0] |
145 ; DIS-NEXT: 34: e1d02f9f | 145 ; DIS-NEXT: 34: e1d02f9f |
146 ; IASM-NEXT: .byte 0x9f | 146 ; IASM-NEXT: .byte 0x9f |
147 ; IASM-NEXT: .byte 0x2f | 147 ; IASM-NEXT: .byte 0x2f |
148 ; IASM-NEXT: .byte 0xd0 | 148 ; IASM-NEXT: .byte 0xd0 |
149 ; IASM-NEXT: .byte 0xe1 | 149 ; IASM-NEXT: .byte 0xe1 |
150 | 150 |
151 ; ASM-NEXT: add r1, r2, r1 | 151 ; ASM-NEXT: add r1, r2, r1 |
152 ; ASM-NEXT: # r3 = def.pseudo | 152 ; ASM-NEXT: # r3 = def.pseudo |
153 ; DIS-NEXT: 38: e0821001 | 153 ; DIS-NEXT: 38: e0821001 |
154 ; IASM-NEXT: .byte 0x1 | 154 ; IASM-NEXT: .byte 0x1 |
155 ; IASM-NEXT: .byte 0x10 | 155 ; IASM-NEXT: .byte 0x10 |
156 ; IASM-NEXT: .byte 0x82 | 156 ; IASM-NEXT: .byte 0x82 |
157 ; IASM-NEXT: .byte 0xe0 | 157 ; IASM-NEXT: .byte 0xe0 |
158 | 158 |
159 ; ***** Example of strexb ***** | 159 ; ***** Example of strexb ***** |
160 ; ASM-NEXT: strexb r3, r1, [r0] | 160 ; ASM-NEXT: strexb r3, r1, [r0] |
161 ; DIS-NEXT: 3c: e1c03f91 | 161 ; DIS-NEXT: 3c: e1c03f91 |
162 ; IASM-NEXT: .byte 0x91 | 162 ; IASM-NEXT: .byte 0x91 |
(...skipping 15 matching lines...) Expand all Loading... |
178 ; IASM-NEXT:.LtestI16Form$entry: | 178 ; IASM-NEXT:.LtestI16Form$entry: |
179 | 179 |
180 ; ASM-NEXT: sub sp, sp, #28 | 180 ; ASM-NEXT: sub sp, sp, #28 |
181 ; DIS-NEXT: 70: e24dd01c | 181 ; DIS-NEXT: 70: e24dd01c |
182 ; IASM-NEXT: .byte 0x1c | 182 ; IASM-NEXT: .byte 0x1c |
183 ; IASM-NEXT: .byte 0xd0 | 183 ; IASM-NEXT: .byte 0xd0 |
184 ; IASM-NEXT: .byte 0x4d | 184 ; IASM-NEXT: .byte 0x4d |
185 ; IASM-NEXT: .byte 0xe2 | 185 ; IASM-NEXT: .byte 0xe2 |
186 | 186 |
187 ; ASM-NEXT: str r0, [sp, #24] | 187 ; ASM-NEXT: str r0, [sp, #24] |
188 ; ASM-NEXT: # [sp, #24] = def.pseudo | 188 ; ASM-NEXT: # [sp, #24] = def.pseudo |
189 ; DIS-NEXT: 74: e58d0018 | 189 ; DIS-NEXT: 74: e58d0018 |
190 ; IASM-NEXT: .byte 0x18 | 190 ; IASM-NEXT: .byte 0x18 |
191 ; IASM-NEXT: .byte 0x0 | 191 ; IASM-NEXT: .byte 0x0 |
192 ; IASM-NEXT: .byte 0x8d | 192 ; IASM-NEXT: .byte 0x8d |
193 ; IASM-NEXT: .byte 0xe5 | 193 ; IASM-NEXT: .byte 0xe5 |
194 | 194 |
195 ; ASM-NEXT: str r1, [sp, #20] | 195 ; ASM-NEXT: str r1, [sp, #20] |
196 ; ASM-NEXT: # [sp, #20] = def.pseudo | 196 ; ASM-NEXT: # [sp, #20] = def.pseudo |
197 ; DIS-NEXT: 78: e58d1014 | 197 ; DIS-NEXT: 78: e58d1014 |
198 ; IASM-NEXT: .byte 0x14 | 198 ; IASM-NEXT: .byte 0x14 |
199 ; IASM-NEXT: .byte 0x10 | 199 ; IASM-NEXT: .byte 0x10 |
200 ; IASM-NEXT: .byte 0x8d | 200 ; IASM-NEXT: .byte 0x8d |
201 ; IASM-NEXT: .byte 0xe5 | 201 ; IASM-NEXT: .byte 0xe5 |
202 | 202 |
203 %ptr.asptr = inttoptr i32 %ptr to i16* | 203 %ptr.asptr = inttoptr i32 %ptr to i16* |
204 %a.arg_trunc = trunc i32 %a to i16 | 204 %a.arg_trunc = trunc i32 %a to i16 |
205 | 205 |
206 ; ASM-NEXT: ldr r0, [sp, #20] | 206 ; ASM-NEXT: ldr r0, [sp, #20] |
207 ; DIS-NEXT: 7c: e59d0014 | 207 ; DIS-NEXT: 7c: e59d0014 |
208 ; IASM-NEXT: .byte 0x14 | 208 ; IASM-NEXT: .byte 0x14 |
209 ; IASM-NEXT: .byte 0x0 | 209 ; IASM-NEXT: .byte 0x0 |
210 ; IASM-NEXT: .byte 0x9d | 210 ; IASM-NEXT: .byte 0x9d |
211 ; IASM-NEXT: .byte 0xe5 | 211 ; IASM-NEXT: .byte 0xe5 |
212 | 212 |
213 ; ASM-NEXT: strh r0, [sp, #16] | 213 ; ASM-NEXT: strh r0, [sp, #16] |
214 ; ASM-NEXT: # [sp, #16] = def.pseudo | 214 ; ASM-NEXT: # [sp, #16] = def.pseudo |
215 ; DIS-NEXT: 80: e1cd01b0 | 215 ; DIS-NEXT: 80: e1cd01b0 |
216 ; IASM-NEXT: .byte 0xb0 | 216 ; IASM-NEXT: .byte 0xb0 |
217 ; IASM-NEXT: .byte 0x1 | 217 ; IASM-NEXT: .byte 0x1 |
218 ; IASM-NEXT: .byte 0xcd | 218 ; IASM-NEXT: .byte 0xcd |
219 ; IASM-NEXT: .byte 0xe1 | 219 ; IASM-NEXT: .byte 0xe1 |
220 | 220 |
221 %v = call i16 @llvm.nacl.atomic.rmw.i16(i32 1, i16* %ptr.asptr, | 221 %v = call i16 @llvm.nacl.atomic.rmw.i16(i32 1, i16* %ptr.asptr, |
222 i16 %a.arg_trunc, i32 6) | 222 i16 %a.arg_trunc, i32 6) |
223 | 223 |
224 ; ASM-NEXT: ldrh r0, [sp, #16] | 224 ; ASM-NEXT: ldrh r0, [sp, #16] |
225 ; DIS-NEXT: 84: e1dd01b0 | 225 ; DIS-NEXT: 84: e1dd01b0 |
226 ; IASM-NEXT: .byte 0xb0 | 226 ; IASM-NEXT: .byte 0xb0 |
227 ; IASM-NEXT: .byte 0x1 | 227 ; IASM-NEXT: .byte 0x1 |
228 ; IASM-NEXT: .byte 0xdd | 228 ; IASM-NEXT: .byte 0xdd |
229 ; IASM-NEXT: .byte 0xe1 | 229 ; IASM-NEXT: .byte 0xe1 |
230 | 230 |
231 ; ASM-NEXT: strh r0, [sp, #4] | 231 ; ASM-NEXT: strh r0, [sp, #4] |
232 ; ASM-NEXT: # [sp, #4] = def.pseudo | 232 ; ASM-NEXT: # [sp, #4] = def.pseudo |
233 ; DIS-NEXT: 88: e1cd00b4 | 233 ; DIS-NEXT: 88: e1cd00b4 |
234 ; IASM-NEXT: .byte 0xb4 | 234 ; IASM-NEXT: .byte 0xb4 |
235 ; IASM-NEXT: .byte 0x0 | 235 ; IASM-NEXT: .byte 0x0 |
236 ; IASM-NEXT: .byte 0xcd | 236 ; IASM-NEXT: .byte 0xcd |
237 ; IASM-NEXT: .byte 0xe1 | 237 ; IASM-NEXT: .byte 0xe1 |
238 | 238 |
239 ; ASM-NEXT: ldr r0, [sp, #24] | 239 ; ASM-NEXT: ldr r0, [sp, #24] |
240 ; DIS-NEXT: 8c: e59d0018 | 240 ; DIS-NEXT: 8c: e59d0018 |
241 ; IASM-NEXT: .byte 0x18 | 241 ; IASM-NEXT: .byte 0x18 |
242 ; IASM-NEXT: .byte 0x0 | 242 ; IASM-NEXT: .byte 0x0 |
243 ; IASM-NEXT: .byte 0x9d | 243 ; IASM-NEXT: .byte 0x9d |
244 ; IASM-NEXT: .byte 0xe5 | 244 ; IASM-NEXT: .byte 0xe5 |
245 | 245 |
246 ; ASM-NEXT: str r0, [sp] | 246 ; ASM-NEXT: str r0, [sp] |
247 ; ASM-NEXT: # [sp] = def.pseudo | 247 ; ASM-NEXT: # [sp] = def.pseudo |
248 ; DIS-NEXT: 90: e58d0000 | 248 ; DIS-NEXT: 90: e58d0000 |
249 ; IASM-NEXT: .byte 0x0 | 249 ; IASM-NEXT: .byte 0x0 |
250 ; IASM-NEXT: .byte 0x0 | 250 ; IASM-NEXT: .byte 0x0 |
251 ; IASM-NEXT: .byte 0x8d | 251 ; IASM-NEXT: .byte 0x8d |
252 ; IASM-NEXT: .byte 0xe5 | 252 ; IASM-NEXT: .byte 0xe5 |
253 | 253 |
254 ; ASM-NEXT: dmb sy | 254 ; ASM-NEXT: dmb sy |
255 ; DIS-NEXT: 94: f57ff05f | 255 ; DIS-NEXT: 94: f57ff05f |
256 ; IASM-NEXT: .byte 0x5f | 256 ; IASM-NEXT: .byte 0x5f |
257 ; IASM-NEXT: .byte 0xf0 | 257 ; IASM-NEXT: .byte 0xf0 |
(...skipping 26 matching lines...) Expand all Loading... |
284 | 284 |
285 ; ***** Example of ldrexh ***** | 285 ; ***** Example of ldrexh ***** |
286 ; ASM-NEXT: ldrexh r2, [r0] | 286 ; ASM-NEXT: ldrexh r2, [r0] |
287 ; DIS-NEXT: a4: e1f02f9f | 287 ; DIS-NEXT: a4: e1f02f9f |
288 ; IASM-NEXT: .byte 0x9f | 288 ; IASM-NEXT: .byte 0x9f |
289 ; IASM-NEXT: .byte 0x2f | 289 ; IASM-NEXT: .byte 0x2f |
290 ; IASM-NEXT: .byte 0xf0 | 290 ; IASM-NEXT: .byte 0xf0 |
291 ; IASM-NEXT: .byte 0xe1 | 291 ; IASM-NEXT: .byte 0xe1 |
292 | 292 |
293 ; ASM-NEXT: add r1, r2, r1 | 293 ; ASM-NEXT: add r1, r2, r1 |
294 ; ASM-NEXT: # r3 = def.pseudo | 294 ; ASM-NEXT: # r3 = def.pseudo |
295 ; DIS-NEXT: a8: e0821001 | 295 ; DIS-NEXT: a8: e0821001 |
296 ; IASM-NEXT: .byte 0x1 | 296 ; IASM-NEXT: .byte 0x1 |
297 ; IASM-NEXT: .byte 0x10 | 297 ; IASM-NEXT: .byte 0x10 |
298 ; IASM-NEXT: .byte 0x82 | 298 ; IASM-NEXT: .byte 0x82 |
299 ; IASM-NEXT: .byte 0xe0 | 299 ; IASM-NEXT: .byte 0xe0 |
300 | 300 |
301 ; ***** Example of strexh ***** | 301 ; ***** Example of strexh ***** |
302 ; ASM-NEXT: strexh r3, r1, [r0] | 302 ; ASM-NEXT: strexh r3, r1, [r0] |
303 ; DIS-NEXT: ac: e1e03f91 | 303 ; DIS-NEXT: ac: e1e03f91 |
304 ; IASM-NEXT: .byte 0x91 | 304 ; IASM-NEXT: .byte 0x91 |
(...skipping 15 matching lines...) Expand all Loading... |
320 ; IASM-NEXT:.LtestI32Form$entry: | 320 ; IASM-NEXT:.LtestI32Form$entry: |
321 | 321 |
322 ; ASM-NEXT: sub sp, sp, #20 | 322 ; ASM-NEXT: sub sp, sp, #20 |
323 ; DIS-NEXT: e0: e24dd014 | 323 ; DIS-NEXT: e0: e24dd014 |
324 ; IASM-NEXT: .byte 0x14 | 324 ; IASM-NEXT: .byte 0x14 |
325 ; IASM-NEXT: .byte 0xd0 | 325 ; IASM-NEXT: .byte 0xd0 |
326 ; IASM-NEXT: .byte 0x4d | 326 ; IASM-NEXT: .byte 0x4d |
327 ; IASM-NEXT: .byte 0xe2 | 327 ; IASM-NEXT: .byte 0xe2 |
328 | 328 |
329 ; ASM-NEXT: str r0, [sp, #16] | 329 ; ASM-NEXT: str r0, [sp, #16] |
330 ; ASM-NEXT: # [sp, #16] = def.pseudo | 330 ; ASM-NEXT: # [sp, #16] = def.pseudo |
331 ; DIS-NEXT: e4: e58d0010 | 331 ; DIS-NEXT: e4: e58d0010 |
332 ; IASM-NEXT: .byte 0x10 | 332 ; IASM-NEXT: .byte 0x10 |
333 ; IASM-NEXT: .byte 0x0 | 333 ; IASM-NEXT: .byte 0x0 |
334 ; IASM-NEXT: .byte 0x8d | 334 ; IASM-NEXT: .byte 0x8d |
335 ; IASM-NEXT: .byte 0xe5 | 335 ; IASM-NEXT: .byte 0xe5 |
336 | 336 |
337 ; ASM-NEXT: str r1, [sp, #12] | 337 ; ASM-NEXT: str r1, [sp, #12] |
338 ; ASM-NEXT: # [sp, #12] = def.pseudo | 338 ; ASM-NEXT: # [sp, #12] = def.pseudo |
339 ; DIS-NEXT: e8: e58d100c | 339 ; DIS-NEXT: e8: e58d100c |
340 ; IASM-NEXT: .byte 0xc | 340 ; IASM-NEXT: .byte 0xc |
341 ; IASM-NEXT: .byte 0x10 | 341 ; IASM-NEXT: .byte 0x10 |
342 ; IASM-NEXT: .byte 0x8d | 342 ; IASM-NEXT: .byte 0x8d |
343 ; IASM-NEXT: .byte 0xe5 | 343 ; IASM-NEXT: .byte 0xe5 |
344 | 344 |
345 %ptr.asptr = inttoptr i32 %ptr to i32* | 345 %ptr.asptr = inttoptr i32 %ptr to i32* |
346 %v = call i32 @llvm.nacl.atomic.rmw.i32(i32 1, i32* %ptr.asptr, | 346 %v = call i32 @llvm.nacl.atomic.rmw.i32(i32 1, i32* %ptr.asptr, |
347 i32 %a, i32 6) | 347 i32 %a, i32 6) |
348 | 348 |
349 ; ASM-NEXT: ldr r0, [sp, #12] | 349 ; ASM-NEXT: ldr r0, [sp, #12] |
350 ; DIS-NEXT: ec: e59d000c | 350 ; DIS-NEXT: ec: e59d000c |
351 ; IASM-NEXT: .byte 0xc | 351 ; IASM-NEXT: .byte 0xc |
352 ; IASM-NEXT: .byte 0x0 | 352 ; IASM-NEXT: .byte 0x0 |
353 ; IASM-NEXT: .byte 0x9d | 353 ; IASM-NEXT: .byte 0x9d |
354 ; IASM-NEXT: .byte 0xe5 | 354 ; IASM-NEXT: .byte 0xe5 |
355 | 355 |
356 ; ASM-NEXT: str r0, [sp, #4] | 356 ; ASM-NEXT: str r0, [sp, #4] |
357 ; ASM-NEXT: # [sp, #4] = def.pseudo | 357 ; ASM-NEXT: # [sp, #4] = def.pseudo |
358 ; DIS-NEXT: f0: e58d0004 | 358 ; DIS-NEXT: f0: e58d0004 |
359 ; IASM-NEXT: .byte 0x4 | 359 ; IASM-NEXT: .byte 0x4 |
360 ; IASM-NEXT: .byte 0x0 | 360 ; IASM-NEXT: .byte 0x0 |
361 ; IASM-NEXT: .byte 0x8d | 361 ; IASM-NEXT: .byte 0x8d |
362 ; IASM-NEXT: .byte 0xe5 | 362 ; IASM-NEXT: .byte 0xe5 |
363 | 363 |
364 ; ASM-NEXT: ldr r0, [sp, #16] | 364 ; ASM-NEXT: ldr r0, [sp, #16] |
365 ; DIS-NEXT: f4: e59d0010 | 365 ; DIS-NEXT: f4: e59d0010 |
366 ; IASM-NEXT: .byte 0x10 | 366 ; IASM-NEXT: .byte 0x10 |
367 ; IASM-NEXT: .byte 0x0 | 367 ; IASM-NEXT: .byte 0x0 |
368 ; IASM-NEXT: .byte 0x9d | 368 ; IASM-NEXT: .byte 0x9d |
369 ; IASM-NEXT: .byte 0xe5 | 369 ; IASM-NEXT: .byte 0xe5 |
370 | 370 |
371 ; ASM-NEXT: str r0, [sp] | 371 ; ASM-NEXT: str r0, [sp] |
372 ; ASM-NEXT: # [sp] = def.pseudo | 372 ; ASM-NEXT: # [sp] = def.pseudo |
373 ; DIS-NEXT: f8: e58d0000 | 373 ; DIS-NEXT: f8: e58d0000 |
374 ; IASM-NEXT: .byte 0x0 | 374 ; IASM-NEXT: .byte 0x0 |
375 ; IASM-NEXT: .byte 0x0 | 375 ; IASM-NEXT: .byte 0x0 |
376 ; IASM-NEXT: .byte 0x8d | 376 ; IASM-NEXT: .byte 0x8d |
377 ; IASM-NEXT: .byte 0xe5 | 377 ; IASM-NEXT: .byte 0xe5 |
378 | 378 |
379 ; ASM-NEXT: dmb sy | 379 ; ASM-NEXT: dmb sy |
380 ; DIS-NEXT: fc: f57ff05f | 380 ; DIS-NEXT: fc: f57ff05f |
381 ; IASM-NEXT: .byte 0x5f | 381 ; IASM-NEXT: .byte 0x5f |
382 ; IASM-NEXT: .byte 0xf0 | 382 ; IASM-NEXT: .byte 0xf0 |
(...skipping 19 matching lines...) Expand all Loading... |
402 | 402 |
403 ; ***** Example of ldrex ***** | 403 ; ***** Example of ldrex ***** |
404 ; ASM-NEXT: ldrex r2, [r0] | 404 ; ASM-NEXT: ldrex r2, [r0] |
405 ; DIS-NEXT: 108: e1902f9f | 405 ; DIS-NEXT: 108: e1902f9f |
406 ; IASM-NEXT: .byte 0x9f | 406 ; IASM-NEXT: .byte 0x9f |
407 ; IASM-NEXT: .byte 0x2f | 407 ; IASM-NEXT: .byte 0x2f |
408 ; IASM-NEXT: .byte 0x90 | 408 ; IASM-NEXT: .byte 0x90 |
409 ; IASM-NEXT: .byte 0xe1 | 409 ; IASM-NEXT: .byte 0xe1 |
410 | 410 |
411 ; ASM-NEXT: add r1, r2, r1 | 411 ; ASM-NEXT: add r1, r2, r1 |
412 ; ASM-NEXT: # r3 = def.pseudo | 412 ; ASM-NEXT: # r3 = def.pseudo |
413 ; DIS-NEXT: 10c: e0821001 | 413 ; DIS-NEXT: 10c: e0821001 |
414 ; IASM-NEXT: .byte 0x1 | 414 ; IASM-NEXT: .byte 0x1 |
415 ; IASM-NEXT: .byte 0x10 | 415 ; IASM-NEXT: .byte 0x10 |
416 ; IASM-NEXT: .byte 0x82 | 416 ; IASM-NEXT: .byte 0x82 |
417 ; IASM-NEXT: .byte 0xe0 | 417 ; IASM-NEXT: .byte 0xe0 |
418 | 418 |
419 ; ***** Example of strex ***** | 419 ; ***** Example of strex ***** |
420 ; ASM-NEXT: strex r3, r1, [r0] | 420 ; ASM-NEXT: strex r3, r1, [r0] |
421 ; DIS-NEXT: 110: e1803f91 | 421 ; DIS-NEXT: 110: e1803f91 |
422 ; IASM-NEXT: .byte 0x91 | 422 ; IASM-NEXT: .byte 0x91 |
(...skipping 21 matching lines...) Expand all Loading... |
444 ; IASM-NEXT: .byte 0xe9 | 444 ; IASM-NEXT: .byte 0xe9 |
445 | 445 |
446 ; ASM-NEXT: sub sp, sp, #32 | 446 ; ASM-NEXT: sub sp, sp, #32 |
447 ; DIS-NEXT: 134: e24dd020 | 447 ; DIS-NEXT: 134: e24dd020 |
448 ; IASM-NEXT: .byte 0x20 | 448 ; IASM-NEXT: .byte 0x20 |
449 ; IASM-NEXT: .byte 0xd0 | 449 ; IASM-NEXT: .byte 0xd0 |
450 ; IASM-NEXT: .byte 0x4d | 450 ; IASM-NEXT: .byte 0x4d |
451 ; IASM-NEXT: .byte 0xe2 | 451 ; IASM-NEXT: .byte 0xe2 |
452 | 452 |
453 ; ASM-NEXT: str r0, [sp, #28] | 453 ; ASM-NEXT: str r0, [sp, #28] |
454 ; ASM-NEXT: # [sp, #28] = def.pseudo | 454 ; ASM-NEXT: # [sp, #28] = def.pseudo |
455 ; DIS-NEXT: 138: e58d001c | 455 ; DIS-NEXT: 138: e58d001c |
456 ; IASM-NEXT: .byte 0x1c | 456 ; IASM-NEXT: .byte 0x1c |
457 ; IASM-NEXT: .byte 0x0 | 457 ; IASM-NEXT: .byte 0x0 |
458 ; IASM-NEXT: .byte 0x8d | 458 ; IASM-NEXT: .byte 0x8d |
459 ; IASM-NEXT: .byte 0xe5 | 459 ; IASM-NEXT: .byte 0xe5 |
460 | 460 |
461 ; ASM-NEXT: mov r0, r2 | 461 ; ASM-NEXT: mov r0, r2 |
462 ; DIS-NEXT: 13c: e1a00002 | 462 ; DIS-NEXT: 13c: e1a00002 |
463 ; IASM-NEXT: .byte 0x2 | 463 ; IASM-NEXT: .byte 0x2 |
464 ; IASM-NEXT: .byte 0x0 | 464 ; IASM-NEXT: .byte 0x0 |
465 ; IASM-NEXT: .byte 0xa0 | 465 ; IASM-NEXT: .byte 0xa0 |
466 ; IASM-NEXT: .byte 0xe1 | 466 ; IASM-NEXT: .byte 0xe1 |
467 | 467 |
468 ; ASM-NEXT: str r0, [sp, #24] | 468 ; ASM-NEXT: str r0, [sp, #24] |
469 ; ASM-NEXT: # [sp, #24] = def.pseudo | 469 ; ASM-NEXT: # [sp, #24] = def.pseudo |
470 ; DIS-NEXT: 140: e58d0018 | 470 ; DIS-NEXT: 140: e58d0018 |
471 ; IASM-NEXT: .byte 0x18 | 471 ; IASM-NEXT: .byte 0x18 |
472 ; IASM-NEXT: .byte 0x0 | 472 ; IASM-NEXT: .byte 0x0 |
473 ; IASM-NEXT: .byte 0x8d | 473 ; IASM-NEXT: .byte 0x8d |
474 ; IASM-NEXT: .byte 0xe5 | 474 ; IASM-NEXT: .byte 0xe5 |
475 | 475 |
476 ; ASM-NEXT: mov r0, r3 | 476 ; ASM-NEXT: mov r0, r3 |
477 ; DIS-NEXT: 144: e1a00003 | 477 ; DIS-NEXT: 144: e1a00003 |
478 ; IASM-NEXT: .byte 0x3 | 478 ; IASM-NEXT: .byte 0x3 |
479 ; IASM-NEXT: .byte 0x0 | 479 ; IASM-NEXT: .byte 0x0 |
480 ; IASM-NEXT: .byte 0xa0 | 480 ; IASM-NEXT: .byte 0xa0 |
481 ; IASM-NEXT: .byte 0xe1 | 481 ; IASM-NEXT: .byte 0xe1 |
482 | 482 |
483 ; ASM-NEXT: str r0, [sp, #20] | 483 ; ASM-NEXT: str r0, [sp, #20] |
484 ; ASM-NEXT: # [sp, #20] = def.pseudo | 484 ; ASM-NEXT: # [sp, #20] = def.pseudo |
485 ; ASM-NEXT: # [sp] = def.pseudo | 485 ; ASM-NEXT: # [sp] = def.pseudo |
486 ; DIS-NEXT: 148: e58d0014 | 486 ; DIS-NEXT: 148: e58d0014 |
487 ; IASM-NEXT: .byte 0x14 | 487 ; IASM-NEXT: .byte 0x14 |
488 ; IASM-NEXT: .byte 0x0 | 488 ; IASM-NEXT: .byte 0x0 |
489 ; IASM-NEXT: .byte 0x8d | 489 ; IASM-NEXT: .byte 0x8d |
490 ; IASM-NEXT: .byte 0xe5 | 490 ; IASM-NEXT: .byte 0xe5 |
491 | 491 |
492 %ptr.asptr = inttoptr i32 %ptr to i64* | 492 %ptr.asptr = inttoptr i32 %ptr to i64* |
493 %v = call i64 @llvm.nacl.atomic.rmw.i64(i32 1, i64* %ptr.asptr, | 493 %v = call i64 @llvm.nacl.atomic.rmw.i64(i32 1, i64* %ptr.asptr, |
494 i64 %a, i32 6) | 494 i64 %a, i32 6) |
495 | 495 |
496 ; ASM-NEXT: ldr r0, [sp, #24] | 496 ; ASM-NEXT: ldr r0, [sp, #24] |
497 ; DIS-NEXT: 14c: e59d0018 | 497 ; DIS-NEXT: 14c: e59d0018 |
498 ; IASM-NEXT: .byte 0x18 | 498 ; IASM-NEXT: .byte 0x18 |
499 ; IASM-NEXT: .byte 0x0 | 499 ; IASM-NEXT: .byte 0x0 |
500 ; IASM-NEXT: .byte 0x9d | 500 ; IASM-NEXT: .byte 0x9d |
501 ; IASM-NEXT: .byte 0xe5 | 501 ; IASM-NEXT: .byte 0xe5 |
502 | 502 |
503 ; ASM-NEXT: str r0, [sp, #8] | 503 ; ASM-NEXT: str r0, [sp, #8] |
504 ; ASM-NEXT: # [sp, #8] = def.pseudo | 504 ; ASM-NEXT: # [sp, #8] = def.pseudo |
505 ; DIS-NEXT: 150: e58d0008 | 505 ; DIS-NEXT: 150: e58d0008 |
506 ; IASM-NEXT: .byte 0x8 | 506 ; IASM-NEXT: .byte 0x8 |
507 ; IASM-NEXT: .byte 0x0 | 507 ; IASM-NEXT: .byte 0x0 |
508 ; IASM-NEXT: .byte 0x8d | 508 ; IASM-NEXT: .byte 0x8d |
509 ; IASM-NEXT: .byte 0xe5 | 509 ; IASM-NEXT: .byte 0xe5 |
510 | 510 |
511 ; ASM-NEXT: ldr r0, [sp, #20] | 511 ; ASM-NEXT: ldr r0, [sp, #20] |
512 ; DIS-NEXT: 154: e59d0014 | 512 ; DIS-NEXT: 154: e59d0014 |
513 ; IASM-NEXT: .byte 0x14 | 513 ; IASM-NEXT: .byte 0x14 |
514 ; IASM-NEXT: .byte 0x0 | 514 ; IASM-NEXT: .byte 0x0 |
515 ; IASM-NEXT: .byte 0x9d | 515 ; IASM-NEXT: .byte 0x9d |
516 ; IASM-NEXT: .byte 0xe5 | 516 ; IASM-NEXT: .byte 0xe5 |
517 | 517 |
518 ; ASM-NEXT: str r0, [sp, #4] | 518 ; ASM-NEXT: str r0, [sp, #4] |
519 ; ASM-NEXT: # [sp, #4] = def.pseudo | 519 ; ASM-NEXT: # [sp, #4] = def.pseudo |
520 ; DIS-NEXT: 158: e58d0004 | 520 ; DIS-NEXT: 158: e58d0004 |
521 ; IASM-NEXT: .byte 0x4 | 521 ; IASM-NEXT: .byte 0x4 |
522 ; IASM-NEXT: .byte 0x0 | 522 ; IASM-NEXT: .byte 0x0 |
523 ; IASM-NEXT: .byte 0x8d | 523 ; IASM-NEXT: .byte 0x8d |
524 ; IASM-NEXT: .byte 0xe5 | 524 ; IASM-NEXT: .byte 0xe5 |
525 | 525 |
526 ; ASM-NEXT: ldr r0, [sp, #28] | 526 ; ASM-NEXT: ldr r0, [sp, #28] |
527 ; DIS-NEXT: 15c: e59d001c | 527 ; DIS-NEXT: 15c: e59d001c |
528 ; IASM-NEXT: .byte 0x1c | 528 ; IASM-NEXT: .byte 0x1c |
529 ; IASM-NEXT: .byte 0x0 | 529 ; IASM-NEXT: .byte 0x0 |
530 ; IASM-NEXT: .byte 0x9d | 530 ; IASM-NEXT: .byte 0x9d |
531 ; IASM-NEXT: .byte 0xe5 | 531 ; IASM-NEXT: .byte 0xe5 |
532 | 532 |
533 ; ASM-NEXT: str r0, [sp] | 533 ; ASM-NEXT: str r0, [sp] |
534 ; ASM-NEXT: # [sp] = def.pseudo | 534 ; ASM-NEXT: # [sp] = def.pseudo |
535 ; DIS-NEXT: 160: e58d0000 | 535 ; DIS-NEXT: 160: e58d0000 |
536 ; IASM-NEXT: .byte 0x0 | 536 ; IASM-NEXT: .byte 0x0 |
537 ; IASM-NEXT: .byte 0x0 | 537 ; IASM-NEXT: .byte 0x0 |
538 ; IASM-NEXT: .byte 0x8d | 538 ; IASM-NEXT: .byte 0x8d |
539 ; IASM-NEXT: .byte 0xe5 | 539 ; IASM-NEXT: .byte 0xe5 |
540 | 540 |
541 ; ASM-NEXT: dmb sy | 541 ; ASM-NEXT: dmb sy |
542 ; DIS-NEXT: 164: f57ff05f | 542 ; DIS-NEXT: 164: f57ff05f |
543 ; IASM-NEXT: .byte 0x5f | 543 ; IASM-NEXT: .byte 0x5f |
544 ; IASM-NEXT: .byte 0xf0 | 544 ; IASM-NEXT: .byte 0xf0 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 ; IASM-NEXT: .byte 0xe1 | 596 ; IASM-NEXT: .byte 0xe1 |
597 | 597 |
598 ; ASM-NEXT: adds r2, r4, r2 | 598 ; ASM-NEXT: adds r2, r4, r2 |
599 ; DIS-NEXT: 180: e0942002 | 599 ; DIS-NEXT: 180: e0942002 |
600 ; IASM-NEXT: .byte 0x2 | 600 ; IASM-NEXT: .byte 0x2 |
601 ; IASM-NEXT: .byte 0x20 | 601 ; IASM-NEXT: .byte 0x20 |
602 ; IASM-NEXT: .byte 0x94 | 602 ; IASM-NEXT: .byte 0x94 |
603 ; IASM-NEXT: .byte 0xe0 | 603 ; IASM-NEXT: .byte 0xe0 |
604 | 604 |
605 ; ASM-NEXT: adc r3, r5, r3 | 605 ; ASM-NEXT: adc r3, r5, r3 |
606 ; ASM-NEXT: # r1 = def.pseudo | 606 ; ASM-NEXT: # r1 = def.pseudo |
607 ; DIS-NEXT: 184: e0a53003 | 607 ; DIS-NEXT: 184: e0a53003 |
608 ; IASM-NEXT: .byte 0x3 | 608 ; IASM-NEXT: .byte 0x3 |
609 ; IASM-NEXT: .byte 0x30 | 609 ; IASM-NEXT: .byte 0x30 |
610 ; IASM-NEXT: .byte 0xa5 | 610 ; IASM-NEXT: .byte 0xa5 |
611 ; IASM-NEXT: .byte 0xe0 | 611 ; IASM-NEXT: .byte 0xe0 |
612 | 612 |
613 ; ***** Example of strexd ***** | 613 ; ***** Example of strexd ***** |
614 ; ASM-NEXT: strexd r1, r2, r3, [r0] | 614 ; ASM-NEXT: strexd r1, r2, r3, [r0] |
615 ; DIS-NEXT: 188: e1a01f92 | 615 ; DIS-NEXT: 188: e1a01f92 |
616 ; IASM-NEXT: .byte 0x92 | 616 ; IASM-NEXT: .byte 0x92 |
617 ; IASM-NEXT: .byte 0x1f | 617 ; IASM-NEXT: .byte 0x1f |
618 ; IASM-NEXT: .byte 0xa0 | 618 ; IASM-NEXT: .byte 0xa0 |
619 ; IASM-NEXT: .byte 0xe1 | 619 ; IASM-NEXT: .byte 0xe1 |
620 | 620 |
621 ret i64 %v | 621 ret i64 %v |
622 } | 622 } |
OLD | NEW |