1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc %s -o - -mtriple=m68k -mcpu=M68000 | FileCheck %s --check-prefix=NO-ATOMIC
3 ; RUN: llc %s -o - -mtriple=m68k -mcpu=M68010 | FileCheck %s --check-prefix=NO-ATOMIC
4 ; RUN: llc %s -o - -mtriple=m68k -mcpu=M68020 | FileCheck %s --check-prefix=ATOMIC
5 ; RUN: llc %s -o - -mtriple=m68k -mcpu=M68030 | FileCheck %s --check-prefix=ATOMIC
6 ; RUN: llc %s -o - -mtriple=m68k -mcpu=M68040 | FileCheck %s --check-prefix=ATOMIC
8 define i8 @atomic_load_i8_unordered(ptr %a) nounwind {
9 ; NO-ATOMIC-LABEL: atomic_load_i8_unordered:
11 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
12 ; NO-ATOMIC-NEXT: move.b (%a0), %d0
15 ; ATOMIC-LABEL: atomic_load_i8_unordered:
17 ; ATOMIC-NEXT: move.l (4,%sp), %a0
18 ; ATOMIC-NEXT: move.b (%a0), %d0
20 %1 = load atomic i8, ptr %a unordered, align 1
24 define i8 @atomic_load_i8_monotonic(ptr %a) nounwind {
25 ; NO-ATOMIC-LABEL: atomic_load_i8_monotonic:
27 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
28 ; NO-ATOMIC-NEXT: move.b (%a0), %d0
31 ; ATOMIC-LABEL: atomic_load_i8_monotonic:
33 ; ATOMIC-NEXT: move.l (4,%sp), %a0
34 ; ATOMIC-NEXT: move.b (%a0), %d0
36 %1 = load atomic i8, ptr %a monotonic, align 1
40 define i8 @atomic_load_i8_acquire(ptr %a) nounwind {
41 ; NO-ATOMIC-LABEL: atomic_load_i8_acquire:
43 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
44 ; NO-ATOMIC-NEXT: move.b (%a0), %d0
47 ; ATOMIC-LABEL: atomic_load_i8_acquire:
49 ; ATOMIC-NEXT: move.l (4,%sp), %a0
50 ; ATOMIC-NEXT: move.b (%a0), %d0
52 %1 = load atomic i8, ptr %a acquire, align 1
56 define i8 @atomic_load_i8_seq_cst(ptr %a) nounwind {
57 ; NO-ATOMIC-LABEL: atomic_load_i8_seq_cst:
59 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
60 ; NO-ATOMIC-NEXT: move.b (%a0), %d0
63 ; ATOMIC-LABEL: atomic_load_i8_seq_cst:
65 ; ATOMIC-NEXT: move.l (4,%sp), %a0
66 ; ATOMIC-NEXT: move.b (%a0), %d0
68 %1 = load atomic i8, ptr %a seq_cst, align 1
72 define i16 @atomic_load_i16_unordered(ptr %a) nounwind {
73 ; NO-ATOMIC-LABEL: atomic_load_i16_unordered:
75 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
76 ; NO-ATOMIC-NEXT: move.w (%a0), %d0
79 ; ATOMIC-LABEL: atomic_load_i16_unordered:
81 ; ATOMIC-NEXT: move.l (4,%sp), %a0
82 ; ATOMIC-NEXT: move.w (%a0), %d0
84 %1 = load atomic i16, ptr %a unordered, align 2
88 define i16 @atomic_load_i16_monotonic(ptr %a) nounwind {
89 ; NO-ATOMIC-LABEL: atomic_load_i16_monotonic:
91 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
92 ; NO-ATOMIC-NEXT: move.w (%a0), %d0
95 ; ATOMIC-LABEL: atomic_load_i16_monotonic:
97 ; ATOMIC-NEXT: move.l (4,%sp), %a0
98 ; ATOMIC-NEXT: move.w (%a0), %d0
100 %1 = load atomic i16, ptr %a monotonic, align 2
104 define i16 @atomic_load_i16_acquire(ptr %a) nounwind {
105 ; NO-ATOMIC-LABEL: atomic_load_i16_acquire:
106 ; NO-ATOMIC: ; %bb.0:
107 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
108 ; NO-ATOMIC-NEXT: move.w (%a0), %d0
109 ; NO-ATOMIC-NEXT: rts
111 ; ATOMIC-LABEL: atomic_load_i16_acquire:
113 ; ATOMIC-NEXT: move.l (4,%sp), %a0
114 ; ATOMIC-NEXT: move.w (%a0), %d0
116 %1 = load atomic i16, ptr %a acquire, align 2
120 define i16 @atomic_load_i16_seq_cst(ptr %a) nounwind {
121 ; NO-ATOMIC-LABEL: atomic_load_i16_seq_cst:
122 ; NO-ATOMIC: ; %bb.0:
123 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
124 ; NO-ATOMIC-NEXT: move.w (%a0), %d0
125 ; NO-ATOMIC-NEXT: rts
127 ; ATOMIC-LABEL: atomic_load_i16_seq_cst:
129 ; ATOMIC-NEXT: move.l (4,%sp), %a0
130 ; ATOMIC-NEXT: move.w (%a0), %d0
132 %1 = load atomic i16, ptr %a seq_cst, align 2
136 define i32 @atomic_load_i32_unordered(ptr %a) nounwind {
137 ; NO-ATOMIC-LABEL: atomic_load_i32_unordered:
138 ; NO-ATOMIC: ; %bb.0:
139 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
140 ; NO-ATOMIC-NEXT: move.l (%a0), %d0
141 ; NO-ATOMIC-NEXT: rts
143 ; ATOMIC-LABEL: atomic_load_i32_unordered:
145 ; ATOMIC-NEXT: move.l (4,%sp), %a0
146 ; ATOMIC-NEXT: move.l (%a0), %d0
148 %1 = load atomic i32, ptr %a unordered, align 4
152 define i32 @atomic_load_i32_monotonic(ptr %a) nounwind {
153 ; NO-ATOMIC-LABEL: atomic_load_i32_monotonic:
154 ; NO-ATOMIC: ; %bb.0:
155 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
156 ; NO-ATOMIC-NEXT: move.l (%a0), %d0
157 ; NO-ATOMIC-NEXT: rts
159 ; ATOMIC-LABEL: atomic_load_i32_monotonic:
161 ; ATOMIC-NEXT: move.l (4,%sp), %a0
162 ; ATOMIC-NEXT: move.l (%a0), %d0
164 %1 = load atomic i32, ptr %a monotonic, align 4
168 define i32 @atomic_load_i32_acquire(ptr %a) nounwind {
169 ; NO-ATOMIC-LABEL: atomic_load_i32_acquire:
170 ; NO-ATOMIC: ; %bb.0:
171 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
172 ; NO-ATOMIC-NEXT: move.l (%a0), %d0
173 ; NO-ATOMIC-NEXT: rts
175 ; ATOMIC-LABEL: atomic_load_i32_acquire:
177 ; ATOMIC-NEXT: move.l (4,%sp), %a0
178 ; ATOMIC-NEXT: move.l (%a0), %d0
180 %1 = load atomic i32, ptr %a acquire, align 4
184 define i32 @atomic_load_i32_seq_cst(ptr %a) nounwind {
185 ; NO-ATOMIC-LABEL: atomic_load_i32_seq_cst:
186 ; NO-ATOMIC: ; %bb.0:
187 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
188 ; NO-ATOMIC-NEXT: move.l (%a0), %d0
189 ; NO-ATOMIC-NEXT: rts
191 ; ATOMIC-LABEL: atomic_load_i32_seq_cst:
193 ; ATOMIC-NEXT: move.l (4,%sp), %a0
194 ; ATOMIC-NEXT: move.l (%a0), %d0
196 %1 = load atomic i32, ptr %a seq_cst, align 4
200 define i64 @atomic_load_i64_unordered(ptr %a) nounwind {
201 ; NO-ATOMIC-LABEL: atomic_load_i64_unordered:
202 ; NO-ATOMIC: ; %bb.0:
203 ; NO-ATOMIC-NEXT: suba.l #12, %sp
204 ; NO-ATOMIC-NEXT: move.l #0, (4,%sp)
205 ; NO-ATOMIC-NEXT: move.l (16,%sp), (%sp)
206 ; NO-ATOMIC-NEXT: jsr __atomic_load_8
207 ; NO-ATOMIC-NEXT: adda.l #12, %sp
208 ; NO-ATOMIC-NEXT: rts
210 ; ATOMIC-LABEL: atomic_load_i64_unordered:
212 ; ATOMIC-NEXT: suba.l #12, %sp
213 ; ATOMIC-NEXT: move.l #0, (4,%sp)
214 ; ATOMIC-NEXT: move.l (16,%sp), (%sp)
215 ; ATOMIC-NEXT: jsr __atomic_load_8
216 ; ATOMIC-NEXT: adda.l #12, %sp
218 %1 = load atomic i64, ptr %a unordered, align 8
222 define i64 @atomic_load_i64_monotonic(ptr %a) nounwind {
223 ; NO-ATOMIC-LABEL: atomic_load_i64_monotonic:
224 ; NO-ATOMIC: ; %bb.0:
225 ; NO-ATOMIC-NEXT: suba.l #12, %sp
226 ; NO-ATOMIC-NEXT: move.l #0, (4,%sp)
227 ; NO-ATOMIC-NEXT: move.l (16,%sp), (%sp)
228 ; NO-ATOMIC-NEXT: jsr __atomic_load_8
229 ; NO-ATOMIC-NEXT: adda.l #12, %sp
230 ; NO-ATOMIC-NEXT: rts
232 ; ATOMIC-LABEL: atomic_load_i64_monotonic:
234 ; ATOMIC-NEXT: suba.l #12, %sp
235 ; ATOMIC-NEXT: move.l #0, (4,%sp)
236 ; ATOMIC-NEXT: move.l (16,%sp), (%sp)
237 ; ATOMIC-NEXT: jsr __atomic_load_8
238 ; ATOMIC-NEXT: adda.l #12, %sp
240 %1 = load atomic i64, ptr %a monotonic, align 8
244 define i64 @atomic_load_i64_acquire(ptr %a) nounwind {
245 ; NO-ATOMIC-LABEL: atomic_load_i64_acquire:
246 ; NO-ATOMIC: ; %bb.0:
247 ; NO-ATOMIC-NEXT: suba.l #12, %sp
248 ; NO-ATOMIC-NEXT: move.l #2, (4,%sp)
249 ; NO-ATOMIC-NEXT: move.l (16,%sp), (%sp)
250 ; NO-ATOMIC-NEXT: jsr __atomic_load_8
251 ; NO-ATOMIC-NEXT: adda.l #12, %sp
252 ; NO-ATOMIC-NEXT: rts
254 ; ATOMIC-LABEL: atomic_load_i64_acquire:
256 ; ATOMIC-NEXT: suba.l #12, %sp
257 ; ATOMIC-NEXT: move.l #2, (4,%sp)
258 ; ATOMIC-NEXT: move.l (16,%sp), (%sp)
259 ; ATOMIC-NEXT: jsr __atomic_load_8
260 ; ATOMIC-NEXT: adda.l #12, %sp
262 %1 = load atomic i64, ptr %a acquire, align 8
266 define i64 @atomic_load_i64_seq_cst(ptr %a) nounwind {
267 ; NO-ATOMIC-LABEL: atomic_load_i64_seq_cst:
268 ; NO-ATOMIC: ; %bb.0:
269 ; NO-ATOMIC-NEXT: suba.l #12, %sp
270 ; NO-ATOMIC-NEXT: move.l #5, (4,%sp)
271 ; NO-ATOMIC-NEXT: move.l (16,%sp), (%sp)
272 ; NO-ATOMIC-NEXT: jsr __atomic_load_8
273 ; NO-ATOMIC-NEXT: adda.l #12, %sp
274 ; NO-ATOMIC-NEXT: rts
276 ; ATOMIC-LABEL: atomic_load_i64_seq_cst:
278 ; ATOMIC-NEXT: suba.l #12, %sp
279 ; ATOMIC-NEXT: move.l #5, (4,%sp)
280 ; ATOMIC-NEXT: move.l (16,%sp), (%sp)
281 ; ATOMIC-NEXT: jsr __atomic_load_8
282 ; ATOMIC-NEXT: adda.l #12, %sp
284 %1 = load atomic i64, ptr %a seq_cst, align 8
288 define void @atomic_store_i8_unordered(ptr %a, i8 %val) nounwind {
289 ; NO-ATOMIC-LABEL: atomic_store_i8_unordered:
290 ; NO-ATOMIC: ; %bb.0:
291 ; NO-ATOMIC-NEXT: move.b (11,%sp), %d0
292 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
293 ; NO-ATOMIC-NEXT: move.b %d0, (%a0)
294 ; NO-ATOMIC-NEXT: rts
296 ; ATOMIC-LABEL: atomic_store_i8_unordered:
298 ; ATOMIC-NEXT: move.b (11,%sp), %d0
299 ; ATOMIC-NEXT: move.l (4,%sp), %a0
300 ; ATOMIC-NEXT: move.b %d0, (%a0)
302 store atomic i8 %val, ptr %a unordered, align 1
306 define void @atomic_store_i8_monotonic(ptr %a, i8 %val) nounwind {
307 ; NO-ATOMIC-LABEL: atomic_store_i8_monotonic:
308 ; NO-ATOMIC: ; %bb.0:
309 ; NO-ATOMIC-NEXT: move.b (11,%sp), %d0
310 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
311 ; NO-ATOMIC-NEXT: move.b %d0, (%a0)
312 ; NO-ATOMIC-NEXT: rts
314 ; ATOMIC-LABEL: atomic_store_i8_monotonic:
316 ; ATOMIC-NEXT: move.b (11,%sp), %d0
317 ; ATOMIC-NEXT: move.l (4,%sp), %a0
318 ; ATOMIC-NEXT: move.b %d0, (%a0)
320 store atomic i8 %val, ptr %a monotonic, align 1
324 define void @atomic_store_i8_release(ptr %a, i8 %val) nounwind {
325 ; NO-ATOMIC-LABEL: atomic_store_i8_release:
326 ; NO-ATOMIC: ; %bb.0:
327 ; NO-ATOMIC-NEXT: move.b (11,%sp), %d0
328 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
329 ; NO-ATOMIC-NEXT: move.b %d0, (%a0)
330 ; NO-ATOMIC-NEXT: rts
332 ; ATOMIC-LABEL: atomic_store_i8_release:
334 ; ATOMIC-NEXT: move.b (11,%sp), %d0
335 ; ATOMIC-NEXT: move.l (4,%sp), %a0
336 ; ATOMIC-NEXT: move.b %d0, (%a0)
338 store atomic i8 %val, ptr %a release, align 1
342 define void @atomic_store_i8_seq_cst(ptr %a, i8 %val) nounwind {
343 ; NO-ATOMIC-LABEL: atomic_store_i8_seq_cst:
344 ; NO-ATOMIC: ; %bb.0:
345 ; NO-ATOMIC-NEXT: move.b (11,%sp), %d0
346 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
347 ; NO-ATOMIC-NEXT: move.b %d0, (%a0)
348 ; NO-ATOMIC-NEXT: rts
350 ; ATOMIC-LABEL: atomic_store_i8_seq_cst:
352 ; ATOMIC-NEXT: move.b (11,%sp), %d0
353 ; ATOMIC-NEXT: move.l (4,%sp), %a0
354 ; ATOMIC-NEXT: move.b %d0, (%a0)
356 store atomic i8 %val, ptr %a seq_cst, align 1
360 define void @atomic_store_i16_unordered(ptr %a, i16 %val) nounwind {
361 ; NO-ATOMIC-LABEL: atomic_store_i16_unordered:
362 ; NO-ATOMIC: ; %bb.0:
363 ; NO-ATOMIC-NEXT: move.w (10,%sp), %d0
364 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
365 ; NO-ATOMIC-NEXT: move.w %d0, (%a0)
366 ; NO-ATOMIC-NEXT: rts
368 ; ATOMIC-LABEL: atomic_store_i16_unordered:
370 ; ATOMIC-NEXT: move.w (10,%sp), %d0
371 ; ATOMIC-NEXT: move.l (4,%sp), %a0
372 ; ATOMIC-NEXT: move.w %d0, (%a0)
374 store atomic i16 %val, ptr %a unordered, align 2
378 define void @atomic_store_i16_monotonic(ptr %a, i16 %val) nounwind {
379 ; NO-ATOMIC-LABEL: atomic_store_i16_monotonic:
380 ; NO-ATOMIC: ; %bb.0:
381 ; NO-ATOMIC-NEXT: move.w (10,%sp), %d0
382 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
383 ; NO-ATOMIC-NEXT: move.w %d0, (%a0)
384 ; NO-ATOMIC-NEXT: rts
386 ; ATOMIC-LABEL: atomic_store_i16_monotonic:
388 ; ATOMIC-NEXT: move.w (10,%sp), %d0
389 ; ATOMIC-NEXT: move.l (4,%sp), %a0
390 ; ATOMIC-NEXT: move.w %d0, (%a0)
392 store atomic i16 %val, ptr %a monotonic, align 2
396 define void @atomic_store_i16_release(ptr %a, i16 %val) nounwind {
397 ; NO-ATOMIC-LABEL: atomic_store_i16_release:
398 ; NO-ATOMIC: ; %bb.0:
399 ; NO-ATOMIC-NEXT: move.w (10,%sp), %d0
400 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
401 ; NO-ATOMIC-NEXT: move.w %d0, (%a0)
402 ; NO-ATOMIC-NEXT: rts
404 ; ATOMIC-LABEL: atomic_store_i16_release:
406 ; ATOMIC-NEXT: move.w (10,%sp), %d0
407 ; ATOMIC-NEXT: move.l (4,%sp), %a0
408 ; ATOMIC-NEXT: move.w %d0, (%a0)
410 store atomic i16 %val, ptr %a release, align 2
414 define void @atomic_store_i16_seq_cst(ptr %a, i16 %val) nounwind {
415 ; NO-ATOMIC-LABEL: atomic_store_i16_seq_cst:
416 ; NO-ATOMIC: ; %bb.0:
417 ; NO-ATOMIC-NEXT: move.w (10,%sp), %d0
418 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
419 ; NO-ATOMIC-NEXT: move.w %d0, (%a0)
420 ; NO-ATOMIC-NEXT: rts
422 ; ATOMIC-LABEL: atomic_store_i16_seq_cst:
424 ; ATOMIC-NEXT: move.w (10,%sp), %d0
425 ; ATOMIC-NEXT: move.l (4,%sp), %a0
426 ; ATOMIC-NEXT: move.w %d0, (%a0)
428 store atomic i16 %val, ptr %a seq_cst, align 2
432 define void @atomic_store_i32_unordered(ptr %a, i32 %val) nounwind {
433 ; NO-ATOMIC-LABEL: atomic_store_i32_unordered:
434 ; NO-ATOMIC: ; %bb.0:
435 ; NO-ATOMIC-NEXT: move.l (8,%sp), %d0
436 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
437 ; NO-ATOMIC-NEXT: move.l %d0, (%a0)
438 ; NO-ATOMIC-NEXT: rts
440 ; ATOMIC-LABEL: atomic_store_i32_unordered:
442 ; ATOMIC-NEXT: move.l (8,%sp), %d0
443 ; ATOMIC-NEXT: move.l (4,%sp), %a0
444 ; ATOMIC-NEXT: move.l %d0, (%a0)
446 store atomic i32 %val, ptr %a unordered, align 4
450 define void @atomic_store_i32_monotonic(ptr %a, i32 %val) nounwind {
451 ; NO-ATOMIC-LABEL: atomic_store_i32_monotonic:
452 ; NO-ATOMIC: ; %bb.0:
453 ; NO-ATOMIC-NEXT: move.l (8,%sp), %d0
454 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
455 ; NO-ATOMIC-NEXT: move.l %d0, (%a0)
456 ; NO-ATOMIC-NEXT: rts
458 ; ATOMIC-LABEL: atomic_store_i32_monotonic:
460 ; ATOMIC-NEXT: move.l (8,%sp), %d0
461 ; ATOMIC-NEXT: move.l (4,%sp), %a0
462 ; ATOMIC-NEXT: move.l %d0, (%a0)
464 store atomic i32 %val, ptr %a monotonic, align 4
468 define void @atomic_store_i32_release(ptr %a, i32 %val) nounwind {
469 ; NO-ATOMIC-LABEL: atomic_store_i32_release:
470 ; NO-ATOMIC: ; %bb.0:
471 ; NO-ATOMIC-NEXT: move.l (8,%sp), %d0
472 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
473 ; NO-ATOMIC-NEXT: move.l %d0, (%a0)
474 ; NO-ATOMIC-NEXT: rts
476 ; ATOMIC-LABEL: atomic_store_i32_release:
478 ; ATOMIC-NEXT: move.l (8,%sp), %d0
479 ; ATOMIC-NEXT: move.l (4,%sp), %a0
480 ; ATOMIC-NEXT: move.l %d0, (%a0)
482 store atomic i32 %val, ptr %a release, align 4
486 define void @atomic_store_i32_seq_cst(ptr %a, i32 %val) nounwind {
487 ; NO-ATOMIC-LABEL: atomic_store_i32_seq_cst:
488 ; NO-ATOMIC: ; %bb.0:
489 ; NO-ATOMIC-NEXT: move.l (8,%sp), %d0
490 ; NO-ATOMIC-NEXT: move.l (4,%sp), %a0
491 ; NO-ATOMIC-NEXT: move.l %d0, (%a0)
492 ; NO-ATOMIC-NEXT: rts
494 ; ATOMIC-LABEL: atomic_store_i32_seq_cst:
496 ; ATOMIC-NEXT: move.l (8,%sp), %d0
497 ; ATOMIC-NEXT: move.l (4,%sp), %a0
498 ; ATOMIC-NEXT: move.l %d0, (%a0)
500 store atomic i32 %val, ptr %a seq_cst, align 4
504 define void @atomic_store_i64_unordered(ptr %a, i64 %val) nounwind {
505 ; NO-ATOMIC-LABEL: atomic_store_i64_unordered:
506 ; NO-ATOMIC: ; %bb.0:
507 ; NO-ATOMIC-NEXT: suba.l #20, %sp
508 ; NO-ATOMIC-NEXT: move.l #0, (12,%sp)
509 ; NO-ATOMIC-NEXT: move.l (32,%sp), (8,%sp)
510 ; NO-ATOMIC-NEXT: move.l (28,%sp), (4,%sp)
511 ; NO-ATOMIC-NEXT: move.l (24,%sp), (%sp)
512 ; NO-ATOMIC-NEXT: jsr __atomic_store_8
513 ; NO-ATOMIC-NEXT: adda.l #20, %sp
514 ; NO-ATOMIC-NEXT: rts
516 ; ATOMIC-LABEL: atomic_store_i64_unordered:
518 ; ATOMIC-NEXT: suba.l #20, %sp
519 ; ATOMIC-NEXT: move.l #0, (12,%sp)
520 ; ATOMIC-NEXT: move.l (32,%sp), (8,%sp)
521 ; ATOMIC-NEXT: move.l (28,%sp), (4,%sp)
522 ; ATOMIC-NEXT: move.l (24,%sp), (%sp)
523 ; ATOMIC-NEXT: jsr __atomic_store_8
524 ; ATOMIC-NEXT: adda.l #20, %sp
526 store atomic i64 %val, ptr %a unordered, align 8
530 define void @atomic_store_i64_monotonic(ptr %a, i64 %val) nounwind {
531 ; NO-ATOMIC-LABEL: atomic_store_i64_monotonic:
532 ; NO-ATOMIC: ; %bb.0:
533 ; NO-ATOMIC-NEXT: suba.l #20, %sp
534 ; NO-ATOMIC-NEXT: move.l #0, (12,%sp)
535 ; NO-ATOMIC-NEXT: move.l (32,%sp), (8,%sp)
536 ; NO-ATOMIC-NEXT: move.l (28,%sp), (4,%sp)
537 ; NO-ATOMIC-NEXT: move.l (24,%sp), (%sp)
538 ; NO-ATOMIC-NEXT: jsr __atomic_store_8
539 ; NO-ATOMIC-NEXT: adda.l #20, %sp
540 ; NO-ATOMIC-NEXT: rts
542 ; ATOMIC-LABEL: atomic_store_i64_monotonic:
544 ; ATOMIC-NEXT: suba.l #20, %sp
545 ; ATOMIC-NEXT: move.l #0, (12,%sp)
546 ; ATOMIC-NEXT: move.l (32,%sp), (8,%sp)
547 ; ATOMIC-NEXT: move.l (28,%sp), (4,%sp)
548 ; ATOMIC-NEXT: move.l (24,%sp), (%sp)
549 ; ATOMIC-NEXT: jsr __atomic_store_8
550 ; ATOMIC-NEXT: adda.l #20, %sp
552 store atomic i64 %val, ptr %a monotonic, align 8
556 define void @atomic_store_i64_release(ptr %a, i64 %val) nounwind {
557 ; NO-ATOMIC-LABEL: atomic_store_i64_release:
558 ; NO-ATOMIC: ; %bb.0:
559 ; NO-ATOMIC-NEXT: suba.l #20, %sp
560 ; NO-ATOMIC-NEXT: move.l #3, (12,%sp)
561 ; NO-ATOMIC-NEXT: move.l (32,%sp), (8,%sp)
562 ; NO-ATOMIC-NEXT: move.l (28,%sp), (4,%sp)
563 ; NO-ATOMIC-NEXT: move.l (24,%sp), (%sp)
564 ; NO-ATOMIC-NEXT: jsr __atomic_store_8
565 ; NO-ATOMIC-NEXT: adda.l #20, %sp
566 ; NO-ATOMIC-NEXT: rts
568 ; ATOMIC-LABEL: atomic_store_i64_release:
570 ; ATOMIC-NEXT: suba.l #20, %sp
571 ; ATOMIC-NEXT: move.l #3, (12,%sp)
572 ; ATOMIC-NEXT: move.l (32,%sp), (8,%sp)
573 ; ATOMIC-NEXT: move.l (28,%sp), (4,%sp)
574 ; ATOMIC-NEXT: move.l (24,%sp), (%sp)
575 ; ATOMIC-NEXT: jsr __atomic_store_8
576 ; ATOMIC-NEXT: adda.l #20, %sp
578 store atomic i64 %val, ptr %a release, align 8
582 define void @atomic_store_i64_seq_cst(ptr %a, i64 %val) nounwind {
583 ; NO-ATOMIC-LABEL: atomic_store_i64_seq_cst:
584 ; NO-ATOMIC: ; %bb.0:
585 ; NO-ATOMIC-NEXT: suba.l #20, %sp
586 ; NO-ATOMIC-NEXT: move.l #5, (12,%sp)
587 ; NO-ATOMIC-NEXT: move.l (32,%sp), (8,%sp)
588 ; NO-ATOMIC-NEXT: move.l (28,%sp), (4,%sp)
589 ; NO-ATOMIC-NEXT: move.l (24,%sp), (%sp)
590 ; NO-ATOMIC-NEXT: jsr __atomic_store_8
591 ; NO-ATOMIC-NEXT: adda.l #20, %sp
592 ; NO-ATOMIC-NEXT: rts
594 ; ATOMIC-LABEL: atomic_store_i64_seq_cst:
596 ; ATOMIC-NEXT: suba.l #20, %sp
597 ; ATOMIC-NEXT: move.l #5, (12,%sp)
598 ; ATOMIC-NEXT: move.l (32,%sp), (8,%sp)
599 ; ATOMIC-NEXT: move.l (28,%sp), (4,%sp)
600 ; ATOMIC-NEXT: move.l (24,%sp), (%sp)
601 ; ATOMIC-NEXT: jsr __atomic_store_8
602 ; ATOMIC-NEXT: adda.l #20, %sp
604 store atomic i64 %val, ptr %a seq_cst, align 8