Commit 5000d3f
authored
Rollup merge of rust-lang#141507 - RalfJung:atomic-intrinsics, r=bjorn3
atomic_load intrinsic: use const generic parameter for ordering
We have a gazillion intrinsics for the atomics because we encode the ordering into the intrinsic name rather than making it a parameter. This is particularly bad for those operations that take two orderings. Let's fix that!
This PR only converts `load`, to see if there's any feedback that would fundamentally change the strategy we pursue for the const generic intrinsics.
The first two commits are preparation and could be a separate PR if you prefer.
`@BoxyUwU` -- I hope this is a use of const generics that is unlikely to explode? All we need is a const generic of enum type. We could funnel it through an integer if we had to but an enum is obviously nicer...
`@bjorn3` it seems like the cranelift backend entirely ignores the ordering?2 files changed
+46
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
65 | 79 | | |
66 | 80 | | |
67 | 81 | | |
| |||
391 | 405 | | |
392 | 406 | | |
393 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
394 | 417 | | |
395 | 418 | | |
396 | 419 | | |
| |||
399 | 422 | | |
400 | 423 | | |
401 | 424 | | |
| 425 | + | |
402 | 426 | | |
403 | 427 | | |
404 | 428 | | |
| |||
408 | 432 | | |
409 | 433 | | |
410 | 434 | | |
| 435 | + | |
411 | 436 | | |
412 | 437 | | |
413 | 438 | | |
| |||
417 | 442 | | |
418 | 443 | | |
419 | 444 | | |
| 445 | + | |
420 | 446 | | |
421 | 447 | | |
422 | 448 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3822 | 3822 | | |
3823 | 3823 | | |
3824 | 3824 | | |
| 3825 | + | |
3825 | 3826 | | |
3826 | 3827 | | |
3827 | 3828 | | |
| |||
3835 | 3836 | | |
3836 | 3837 | | |
3837 | 3838 | | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
3838 | 3856 | | |
3839 | 3857 | | |
3840 | 3858 | | |
| |||
0 commit comments