Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 128-bit atomics on s390x #130558

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Sep 19, 2024

Since LLVM 18 (llvm/llvm-project@c568927), 128-bit atomics are fully supported on s390x. And the current minimum external LLVM version is now 18 (#130487).

s390x 128-bit atomic instructions (lpq,stpq,cdsg) has been present since the First Edition of the Principles of Operation. (LLVM's minimal supported architecture level is z10 (the Eighth Edition of the PoP).)

cc #99069

r? @cuviper

@rustbot label +O-SystemZ

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 19, 2024
@rustbot
Copy link
Collaborator

rustbot commented Sep 19, 2024

These commits modify compiler targets.
(See the Target Tier Policy.)

@taiki-e
Copy link
Member Author

taiki-e commented Sep 19, 2024

I have tested LLVM's s390x 128-bit atomic implementation with LLVM 19 (rustc nightly-2024-09-19) and 18 (rustc nightly-2024-07-31) using the portable-atomic's test suite (that has caught some of the issues mentioned in #99069 (comment) in the past), an core::intrinsics-based Atomic{I,U}128 implementation equivalent to core::sync::atomic::Atomic{I,U}128, and qemu-user 9.1.0. (In debug, release, and release+lto+codegen-unit=1 modes. logs are here and test imp::intrinsics::* are tests for this implementation)

@cuviper
Copy link
Member

cuviper commented Sep 19, 2024

Thanks! I also ran the portable-atomic tests and core tests with this change on real hardware (z16), and it passed.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 19, 2024

📌 Commit 078b067 has been approved by cuviper

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 19, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 19, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#128001 (Improve documentation for <integer>::from_str_radix)
 - rust-lang#130553 ([Clippy] Get rid of most `std` `match_def_path` usage, swap to diagnostic items.)
 - rust-lang#130554 (`pal::unsupported::process::ExitCode`: use an `u8` instead of a `bool`)
 - rust-lang#130556 (Mark the `link_cfg` feature as internal)
 - rust-lang#130558 (Support 128-bit atomics on s390x)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f715815 into rust-lang:master Sep 19, 2024
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 19, 2024
Rollup merge of rust-lang#130558 - taiki-e:s390x-atomic-128, r=cuviper

Support 128-bit atomics on s390x

Since LLVM 18 (llvm/llvm-project@c568927), 128-bit atomics are fully supported on s390x. And the current minimum external LLVM version is now 18 (rust-lang#130487).

s390x 128-bit atomic instructions (lpq,stpq,cdsg) has been present since [the First Edition of the Principles of Operation](https://publibfp.dhe.ibm.com/epubs/pdf/dz9zr000.pdf). (LLVM's minimal supported architecture level [is z10 (the Eighth Edition of the PoP)](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZProcessors.td#L16-L17).)

cc rust-lang#99069

r? `@cuviper`
@rustbot rustbot added this to the 1.83.0 milestone Sep 19, 2024
@taiki-e taiki-e deleted the s390x-atomic-128 branch September 20, 2024 00:38
@rustbot rustbot added the O-SystemZ Target: SystemZ processors (s390x) label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-SystemZ Target: SystemZ processors (s390x) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants