rustc_target: add known safe s390x target features by liushuyu · Pull Request #127506 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation19 Commits4 Checks0 Files changed

Conversation

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

[ Show hidden characters]({{ revealButtonHref }})

@liushuyu

This pull request adds known safe target features for s390x (aka IBM Z systems).
Currently, these features are unstable since stabilizing the target features requires submitting proposals.

The vector feature was added in IBM Z13 (arch11), and this is a SIMD feature for the newer IBM Z systems.
The backchain attribute is the IBM Z way of adding frame pointers like unwinding capabilities (the "frame-pointer" switch on IBM Z and IBM POWER platforms will add emulated frame pointers to the binary, which profilers can't use for unwinding the stack).

Both attributes can be applied at the LLVM module or function levels. However, the backchain attribute has to be enabled for all the functions in the call stack to get a successful unwind process.

@rustbot

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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

Jul 9, 2024

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@liushuyu liushuyu marked this pull request as ready for review

July 10, 2024 05:32

@rustbot

Some changes occurred in tests/ui/check-cfg

cc @Urgau

@liushuyu

@bors

davidtwco

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay in reviewing, looks good to me, r=me after rebasing.

@liushuyu

@liushuyu

@liushuyu

@liushuyu

... this is a special attribute that was made to be a target-feature in LLVM 18+, but in all previous versions, this "feature" is a naked attribute. We will have to handle this situation differently than all other target-features.

@liushuyu

@liushuyu

@davidtwco

@bors

📌 Commit 01e6e60 has been approved by davidtwco

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

Jul 22, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Jul 22, 2024

@bors

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Sep 7, 2024

@rust-timer

Rollup merge of rust-lang#129940 - liushuyu:s390x-target-features, r=RalfJung

s390x: Fix a regression related to backchain feature

In rust-lang#127506, we introduced a new IBM Z-specific target feature, backchain.

This particular target-feature was available as a function-level attribute in LLVM 17 and below, so some hacks were used to avoid blowing up LLVM when querying the supported LLVM features.

This led to an unfortunate regression where cfg!(target-feature = "backchain") will always return true.

This pull request aims to fix this issue, and a test has been introduced to ensure it will never happen again.

Fixes rust-lang#129927.

r? @RalfJung

This was referenced

Sep 20, 2024

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request

Oct 1, 2024

@GuillaumeGomez

Support clobber_abi and vector/access registers (clobber-only) in s390x inline assembly

This supports clobber_abi which is one of the requirements of stabilization mentioned in rust-lang#93335.

This also supports vector registers (as vreg) and access registers (as areg) as clobber-only, which need to support clobbering of them to implement clobber_abi.

Refs:

I have three questions:

Note:

cc @uweigand

r? @Amanieu

@rustbot label +O-SystemZ

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Oct 1, 2024

@rust-timer

Rollup merge of rust-lang#130630 - taiki-e:s390x-clobber-abi, r=Amanieu

Support clobber_abi and vector/access registers (clobber-only) in s390x inline assembly

This supports clobber_abi which is one of the requirements of stabilization mentioned in rust-lang#93335.

This also supports vector registers (as vreg) and access registers (as areg) as clobber-only, which need to support clobbering of them to implement clobber_abi.

Refs:

I have three questions:

Note:

cc @uweigand

r? @Amanieu

@rustbot label +O-SystemZ

antoyo pushed a commit to rust-lang/rustc_codegen_gcc that referenced this pull request

Oct 9, 2024

@GuillaumeGomez

Support clobber_abi and vector/access registers (clobber-only) in s390x inline assembly

This supports clobber_abi which is one of the requirements of stabilization mentioned in #93335.

This also supports vector registers (as vreg) and access registers (as areg) as clobber-only, which need to support clobbering of them to implement clobber_abi.

Refs:

I have three questions:

Note:

cc @uweigand

r? @Amanieu

@rustbot label +O-SystemZ

fneddy added a commit to fneddy/rust that referenced this pull request

Apr 29, 2025

@fneddy

the s390x target_feature(enable = "vector") was merged in rust-lang#127506 but is still gated by #![feature(s390x_target_feature)].

fneddy added a commit to fneddy/rust that referenced this pull request

Apr 29, 2025

@fneddy

Fix the test for s390x by enabling s390x vector extension via target_feature(enable = "vector")(rust-lang#127506). As this is is still gated by #![feature(s390x_target_feature)] we need that attribute also.

fneddy added a commit to fneddy/rust that referenced this pull request

Apr 29, 2025

@fneddy

Fix the test for s390x by enabling s390x vector extension via target_feature(enable = "vector")(rust-lang#127506). As this is is still gated by #![feature(s390x_target_feature)] we need that attribute also.

fneddy added a commit to fneddy/rust that referenced this pull request

May 2, 2025

@fneddy

Fix the test for s390x by enabling s390x vector extension via target_feature(enable = "vector")(rust-lang#127506). As this is is still gated by #![feature(s390x_target_feature)] we need that attribute also.

fneddy added a commit to fneddy/rust that referenced this pull request

May 2, 2025

@fneddy

Fix the test for s390x by enabling s390x vector extension via target_feature(enable = "vector")(rust-lang#127506). As this is is still gated by #![feature(s390x_target_feature)] we need that attribute also.

fneddy added a commit to fneddy/rust that referenced this pull request

May 3, 2025

@fneddy

Fix the test for s390x by enabling s390x vector extension via target_feature(enable = "vector")(rust-lang#127506). As this is is still gated by #![feature(s390x_target_feature)] we need that attribute also.

fneddy added a commit to fneddy/rust that referenced this pull request

May 3, 2025

@fneddy

Fix the test for s390x by enabling s390x vector extension via target_feature(enable = "vector")(rust-lang#127506). As this is is still gated by #![feature(s390x_target_feature)] we need that attribute also.

Zalathar added a commit to Zalathar/rust that referenced this pull request

May 4, 2025

@Zalathar

…ins_dyn, r=wesleywiser

Fix test simd/extract-insert-dyn on s390x

Fix the test for s390x by enabling s390x vector extension via target_feature(enable = "vector")(rust-lang#127506). As this is is still gated by #![feature(s390x_target_feature)] we need that attribute also.

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

May 4, 2025

@rust-timer

Rollup merge of rust-lang#140456 - fneddy:fix_s390x_codegen_simd_ext_ins_dyn, r=wesleywiser

Fix test simd/extract-insert-dyn on s390x

Fix the test for s390x by enabling s390x vector extension via target_feature(enable = "vector")(rust-lang#127506). As this is is still gated by #![feature(s390x_target_feature)] we need that attribute also.

Zalathar added a commit to Zalathar/rust that referenced this pull request

Nov 6, 2025

@Zalathar

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Nov 6, 2025

@matthiaskrgr

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request

Nov 7, 2025

@GuillaumeGomez

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request

Nov 7, 2025

@GuillaumeGomez

bors added a commit that referenced this pull request

Nov 7, 2025

@bors

bors added a commit that referenced this pull request

Nov 7, 2025

@bors

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Nov 8, 2025

@matthiaskrgr

rust-timer added a commit that referenced this pull request

Nov 9, 2025

@rust-timer

github-actions bot pushed a commit to rust-lang/stdarch that referenced this pull request

Nov 10, 2025

@matthiaskrgr

github-actions bot pushed a commit to rust-lang/miri that referenced this pull request

Nov 10, 2025

@matthiaskrgr

github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request

Nov 30, 2025

@matthiaskrgr

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.