You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tracking Issue for stdarch_s390x_feature_detection #135413
The new machines IBM z17 and IBM LinuxONE Emperor 5 were recently announced. These machines implement the arch15 level of the z/Architecture. Support for this has been added to LLVM here: llvm/llvm-project@8424bf2
This architecture level provides a number of new architecture features. LLVM supports the following:
It would be good to add (a subset of?) those to the list of features supported by Rust as well.
However, the Linux kernel maintainers decided to no longer provide new HWCAP bits for these features. Instead, users are encouraged to determine presence of those features via the STFLE instruction. This was done to avoid running out of HWCAP bits - new bits are now only allocated for features that require kernel support in addition to hardware support (as is currently the case for the "vector" feature).
This means the Rust implementation should be changed to primarily use STFLE to detect features, but still consult HWCAP in addition for those features that require kernel support (i.e. "vector" only right now). As an additional benefit, this would also allow properly detecting older features that do not have HWCAP bits - most notably the various "miscellaneous-extensions-N" features would be important to detect (and maybe some others).
Activity
Rollup merge of rust-lang#138275 - folkertdev:expose-is-s390x-feature…
Unrolled build for rust-lang#138275
Rollup merge of rust-lang#138275 - folkertdev:expose-is-s390x-feature…
uweigand commentedon May 16, 2025
The new machines IBM z17 and IBM LinuxONE Emperor 5 were recently announced. These machines implement the
arch15level of the z/Architecture. Support for this has been added to LLVM here: llvm/llvm-project@8424bf2This architecture level provides a number of new architecture features. LLVM supports the following:
It would be good to add (a subset of?) those to the list of features supported by Rust as well.
However, the Linux kernel maintainers decided to no longer provide new HWCAP bits for these features. Instead, users are encouraged to determine presence of those features via the
STFLEinstruction. This was done to avoid running out of HWCAP bits - new bits are now only allocated for features that require kernel support in addition to hardware support (as is currently the case for the "vector" feature).This means the Rust implementation should be changed to primarily use
STFLEto detect features, but still consult HWCAP in addition for those features that require kernel support (i.e. "vector" only right now). As an additional benefit, this would also allow properly detecting older features that do not have HWCAP bits - most notably the various "miscellaneous-extensions-N" features would be important to detect (and maybe some others).Is this feature the proper place to discuss this, or should I open another one?
FYI @folkertdev @taiki-e @cuviper @fneddy
Rollup merge of rust-lang#141250 - folkertdev:s390x-z17-target-featur…
Rollup merge of rust-lang#141250 - folkertdev:s390x-z17-target-featur…
Unrolled build for #141250
Rollup merge of #141250 - folkertdev:s390x-z17-target-features, r=wor…
Rollup merge of rust-lang#145656 - folkertdev:stabilize-s390x-vector,…
Rollup merge of rust-lang#145656 - folkertdev:stabilize-s390x-vector,…
Rollup merge of rust-lang#145656 - folkertdev:stabilize-s390x-vector,…
Rollup merge of rust-lang#145656 - folkertdev:stabilize-s390x-vector,…
Auto merge of #145656 - folkertdev:stabilize-s390x-vector, r=Amanieu
Auto merge of #145656 - folkertdev:stabilize-s390x-vector, r=Amanieu
Rollup merge of rust-lang#145656 - folkertdev:stabilize-s390x-vector,…
Unrolled build for #145656
Rollup merge of #145656 - folkertdev:stabilize-s390x-vector, r=Amanieu
Rollup merge of #145656 - folkertdev:stabilize-s390x-vector, r=Amanieu
Rollup merge of rust-lang#145656 - folkertdev:stabilize-s390x-vector,…