atomic volatile: add intrinsics - #160058
Conversation
|
Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter cc @rust-lang/miri, @oli-obk, @lcnr
cc @bjorn3
cc @rust-lang/miri |
|
r? @nia-e rustbot has assigned @nia-e. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
library stuff looks fine, but the rest is not my prerogative :D r? compiler |
780cd0f to
faddba5
Compare
This comment has been minimized.
This comment has been minimized.
faddba5 to
7b5dd39
Compare
|
Cranelift doesn't currently have a way to do volatile memory operations. In the past this was not an issue given the lack of optimizations on memory operations, but those recently got added, so volatile support now needs to be added on the Cranelift side. |
This comment has been minimized.
This comment has been minimized.
7b5dd39 to
d51ce47
Compare
This comment has been minimized.
This comment has been minimized.
d51ce47 to
528983b
Compare
This comment has been minimized.
This comment has been minimized.
|
Rerolling since we have not heard from the assigned reviewer. |
| _ty: Type<'gcc>, | ||
| ptr: RValue<'gcc>, | ||
| order: AtomicOrdering, | ||
| _volatile: bool, // FIXME we are ignoring this |
There was a problem hiding this comment.
cc @antoyo, @GuillaumeGomez what do you propose we do about these FIXME? How should volatile atomic operations be handled in the GCC backend?
There was a problem hiding this comment.
Usually, you make something volatile by calling make_volatile() on the type used for the operation, but it seems it is already done here.
And I don't remember why we already call make_volatile() here.
There was a problem hiding this comment.
Ah okay. I have adjusted the comment accordingly, thanks.
528983b to
78a3e30
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
cg_clif changes LGTM. |
|
@bors r=JohnTitor |
|
Github tells me "Merge status cannot be loaded", maybe that is why bors ignores it? @bors r=JohnTitor |
|
There is an active github outage according to the status page. |
|
Yeah everything is super slow currently or doesn't load at all. |
atomic volatile: add intrinsics Extend the atomic load/store intrinsics to also support volatile atomic load/store. Tracking issue: rust-lang#158947. Library APIs that use these intrinsics will be added inn a future PR. The GCC and cranelift implementations ignore the volatile flag, not sure how that should be implemented for them.
…uwer Rollup of 12 pull requests Successful merges: - #161221 (`rust-analyzer` subtree update) - #161232 (Subtree sync for rustc_codegen_cranelift) - #160058 (atomic volatile: add intrinsics) - #161206 (Library lock file update) - #160905 (implement <IpAddr, SocketAddr>::unspecified_from()) - #160986 (Move `LateParamRegion` to `rustc_type_ir`) - #161145 (Remove references to the obsolete `try-perf` branch) - #161197 (citool: update rust crates) - #161225 (Add regression test for lint panic on nested generic with default type param) - #161229 (rustc_target: couple AArch64 LLVM and cfg pauthtest ABIs) - #161230 (rename `#[rustc_dump_predicates]` to `#[rustc_dump_clauses]`) - #161237 (Remove jdno from infra-ci rotation)
Rollup merge of #160058 - RalfJung:atomic-volatile, r=JohnTitor atomic volatile: add intrinsics Extend the atomic load/store intrinsics to also support volatile atomic load/store. Tracking issue: #158947. Library APIs that use these intrinsics will be added inn a future PR. The GCC and cranelift implementations ignore the volatile flag, not sure how that should be implemented for them.
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#161221 (`rust-analyzer` subtree update) - rust-lang/rust#161232 (Subtree sync for rustc_codegen_cranelift) - rust-lang/rust#160058 (atomic volatile: add intrinsics) - rust-lang/rust#161206 (Library lock file update) - rust-lang/rust#160905 (implement <IpAddr, SocketAddr>::unspecified_from()) - rust-lang/rust#160986 (Move `LateParamRegion` to `rustc_type_ir`) - rust-lang/rust#161145 (Remove references to the obsolete `try-perf` branch) - rust-lang/rust#161197 (citool: update rust crates) - rust-lang/rust#161225 (Add regression test for lint panic on nested generic with default type param) - rust-lang/rust#161229 (rustc_target: couple AArch64 LLVM and cfg pauthtest ABIs) - rust-lang/rust#161230 (rename `#[rustc_dump_predicates]` to `#[rustc_dump_clauses]`) - rust-lang/rust#161237 (Remove jdno from infra-ci rotation)
View all comments
Extend the atomic load/store intrinsics to also support volatile atomic load/store.
Tracking issue: #158947.
Library APIs that use these intrinsics will be added inn a future PR.
The GCC and cranelift implementations ignore the volatile flag, not sure how that should be implemented for them.