rustc_target: Add msync target feature and enable it on powerpcspe targets#137860
Merged
bors merged 1 commit intorust-lang:masterfrom Mar 3, 2025
Merged
rustc_target: Add msync target feature and enable it on powerpcspe targets#137860bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
These commits modify compiler targets. |
Contributor
|
Looks good to me! I can't test it at the moment thought as my Debian PowerPCSPE systems are currently put into storage. |
3bd251f to
6f7fd11
Compare
BKPepe
approved these changes
Mar 1, 2025
Member
|
@taiki-e Can you add a brief discussion of the CPU architectures relevant to this target to its platform support page? |
Member
Author
I wasn't sure what exactly you wanted documented and where, but I opened a PR to add the documentation that I thought was missing: #137868 |
Member
|
Thanks, that looks good. @bors r+ rollup |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 3, 2025
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#137375 (Minor internal comments fix for `BufRead::read_line`) - rust-lang#137641 (More precisely document `Global::deallocate()`'s safety.) - rust-lang#137755 (doc: update Wasmtime flags) - rust-lang#137851 (improve `simd_select` error message when used with invalid mask type) - rust-lang#137860 (rustc_target: Add msync target feature and enable it on powerpcspe targets) - rust-lang#137871 (fix `RangeBounds::is_empty` documentation) - rust-lang#137873 (Disable `f16` on Aarch64 without `neon`) - rust-lang#137876 (Adjust triagebot.toml entries for `rustc_mir_build/src/builder/`) - rust-lang#137883 (edit mailmap) - rust-lang#137886 (`name()` and `trimmed_name()` for `stable_mir::crate_def::DefId`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 3, 2025
Rollup merge of rust-lang#137860 - taiki-e:powerpcspe-msync, r=workingjubilee rustc_target: Add msync target feature and enable it on powerpcspe targets Some older PowerPC processors do not have the `sync` (`sync 0`) and `lwsync` (`sync 1`) instructions, but instead have the `msync` instruction. (IIRC `msync` and `sync` will be assembled into the same bit-pattern, but `lwsync` will be SIGILL. See also https://gcc.gnu.org/legacy-ml/gcc-patches/2006-11/msg01238.html.) LLVM recognizes this as the [`msync` feature](https://github.com/llvm/llvm-project/blob/cc5d8a4b2fc765c3c432f1ad0b185dae518d41bd/llvm/lib/Target/PowerPC/PPC.td#L140) and enables for some cpus such as [e500](https://github.com/llvm/llvm-project/blob/cc5d8a4b2fc765c3c432f1ad0b185dae518d41bd/llvm/lib/Target/PowerPC/PPC.td#L644). powerpcspe is a target for CPUs such as e500 ([Debian Wiki](https://wiki.debian.org/PowerPCSPEPort)). However, the `msync` feature is currently not enabled except for vxworks, and at least since 2022-04, powerpc-unknown-linux-gnuspe was known to not work on real hardware without `-C target-cpu` (e.g., rust-lang#96394, rust-lang#117361). https://github.com/rust-lang/rust/blob/8c392966a013fd8a09e6b78b3c8d6e442bc278e1/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks_spe.rs#L28 Fixes rust-lang#117361 cc `@BKPepe` ([powerpc-unknown-linux-muslspe target maintainer](https://doc.rust-lang.org/nightly/rustc/platform-support/powerpc-unknown-linux-muslspe.html#target-maintainers)) cc `@glaubitz` (who added powerpc-unknown-linux-gnuspe in rust-lang#48484) cc `@th0ma7` (who opened rust-lang#117361) r? workingjubilee `@rustbot` label +O-PowerPC +A-target-feature
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this pull request
Mar 6, 2025
…ubilee Add minimal platform support documentation for powerpc-unknown-linux-gnuspe Per rust-lang#137860 (comment), add minimal platform support documentation, including a brief summary and links to more detailed information about this target. The added documentation is minimal. This is somewhat similar to [powerpc-unknown-openbsd, which also has no target maintainer](https://doc.rust-lang.org/nightly/rustc/platform-support/powerpc-unknown-openbsd.html). The rest of the template is left to target maintainers. I also updated powerpc-unknown-linux-muslspe platform support documentation and added link to powerpc-unknown-linux-gnuspe platform support documentation. cc `@glaubitz` cc `@BKPepe` r? workingjubilee `@rustbot` label +O-PowerPC
Noratrieb
added a commit
to Noratrieb/rust
that referenced
this pull request
Mar 6, 2025
…ubilee Add minimal platform support documentation for powerpc-unknown-linux-gnuspe Per rust-lang#137860 (comment), add minimal platform support documentation, including a brief summary and links to more detailed information about this target. The added documentation is minimal. This is somewhat similar to [powerpc-unknown-openbsd, which also has no target maintainer](https://doc.rust-lang.org/nightly/rustc/platform-support/powerpc-unknown-openbsd.html). The rest of the template is left to target maintainers. I also updated powerpc-unknown-linux-muslspe platform support documentation and added link to powerpc-unknown-linux-gnuspe platform support documentation. cc ``@glaubitz`` cc ``@BKPepe`` r? workingjubilee ``@rustbot`` label +O-PowerPC
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this pull request
Mar 6, 2025
…ubilee Add minimal platform support documentation for powerpc-unknown-linux-gnuspe Per rust-lang#137860 (comment), add minimal platform support documentation, including a brief summary and links to more detailed information about this target. The added documentation is minimal. This is somewhat similar to [powerpc-unknown-openbsd, which also has no target maintainer](https://doc.rust-lang.org/nightly/rustc/platform-support/powerpc-unknown-openbsd.html). The rest of the template is left to target maintainers. I also updated powerpc-unknown-linux-muslspe platform support documentation and added link to powerpc-unknown-linux-gnuspe platform support documentation. cc ```@glaubitz``` cc ```@BKPepe``` r? workingjubilee ```@rustbot``` label +O-PowerPC
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 7, 2025
Rollup merge of rust-lang#137868 - taiki-e:powerpcspe-doc, r=workingjubilee Add minimal platform support documentation for powerpc-unknown-linux-gnuspe Per rust-lang#137860 (comment), add minimal platform support documentation, including a brief summary and links to more detailed information about this target. The added documentation is minimal. This is somewhat similar to [powerpc-unknown-openbsd, which also has no target maintainer](https://doc.rust-lang.org/nightly/rustc/platform-support/powerpc-unknown-openbsd.html). The rest of the template is left to target maintainers. I also updated powerpc-unknown-linux-muslspe platform support documentation and added link to powerpc-unknown-linux-gnuspe platform support documentation. cc ```@glaubitz``` cc ```@BKPepe``` r? workingjubilee ```@rustbot``` label +O-PowerPC
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Mar 7, 2025
Add minimal platform support documentation for powerpc-unknown-linux-gnuspe Per rust-lang/rust#137860 (comment), add minimal platform support documentation, including a brief summary and links to more detailed information about this target. The added documentation is minimal. This is somewhat similar to [powerpc-unknown-openbsd, which also has no target maintainer](https://doc.rust-lang.org/nightly/rustc/platform-support/powerpc-unknown-openbsd.html). The rest of the template is left to target maintainers. I also updated powerpc-unknown-linux-muslspe platform support documentation and added link to powerpc-unknown-linux-gnuspe platform support documentation. cc ```@glaubitz``` cc ```@BKPepe``` r? workingjubilee ```@rustbot``` label +O-PowerPC
lnicola
pushed a commit
to lnicola/rust-analyzer
that referenced
this pull request
Mar 10, 2025
Add minimal platform support documentation for powerpc-unknown-linux-gnuspe Per rust-lang/rust#137860 (comment), add minimal platform support documentation, including a brief summary and links to more detailed information about this target. The added documentation is minimal. This is somewhat similar to [powerpc-unknown-openbsd, which also has no target maintainer](https://doc.rust-lang.org/nightly/rustc/platform-support/powerpc-unknown-openbsd.html). The rest of the template is left to target maintainers. I also updated powerpc-unknown-linux-muslspe platform support documentation and added link to powerpc-unknown-linux-gnuspe platform support documentation. cc ```@glaubitz``` cc ```@BKPepe``` r? workingjubilee ```@rustbot``` label +O-PowerPC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some older PowerPC processors do not have the
sync(sync 0) andlwsync(sync 1) instructions, but instead have themsyncinstruction. (IIRCmsyncandsyncwill be assembled into the same bit-pattern, butlwsyncwill be SIGILL. See also https://gcc.gnu.org/legacy-ml/gcc-patches/2006-11/msg01238.html.)LLVM recognizes this as the
msyncfeature and enables for some cpus such as e500.powerpcspe is a target for CPUs such as e500 (Debian Wiki). However, the
msyncfeature is currently not enabled except for vxworks, and at least since 2022-04, powerpc-unknown-linux-gnuspe was known to not work on real hardware without-C target-cpu(e.g., #96394, #117361).rust/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks_spe.rs
Line 28 in 8c39296
Fixes #117361
cc @BKPepe (powerpc-unknown-linux-muslspe target maintainer)
cc @glaubitz (who added powerpc-unknown-linux-gnuspe in #48484)
cc @th0ma7 (who opened #117361)
r? workingjubilee
@rustbot label +O-PowerPC +A-target-feature