-
Notifications
You must be signed in to change notification settings - Fork 13.4k
add s390x z17 target features #141250
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
add s390x z17 target features #141250
Conversation
This comment has been minimized.
This comment has been minimized.
Based on that CI log, I believe what is happening is that rust still supportes LLVM 19 (because of linux distributions), and in that version these new target features are not yet present. So, we may need to wait until the lowest supported LLVM version also does support these target features. |
Hi @folkertdev , I've checked the implications against the official docs, and the following are not quite correct:
Checking for completeness, for recent processors, the only missing features now are related to privileged (kernel-only) instructions:
It seems OK to omit those (at least until such time as core kernel components may be written in Rust ...). Every other LLVM feature that is still missing is about rather old processor versions (z13 and older) - at this point in time it's no longer useful to write code distinguishing pre-z13 features, those old machines are barely in use any more (if at all). Overall, I think with the implicit feature links fixed as described above, this should be good to do. Thanks! |
67cb97c
to
6bf41a5
Compare
Target features not available in older LLVM can be handled in rust/compiler/rustc_codegen_llvm/src/llvm_util.rs Lines 275 to 276 in efcbb94
|
6bf41a5
to
1d50046
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM now from a SystemZ target perspective. Thanks!
This comment has been minimized.
This comment has been minimized.
1d50046
to
ffc6e3b
Compare
This comment has been minimized.
This comment has been minimized.
ffc6e3b
to
c24e1c3
Compare
r? compiler Thanks Taiki for the quick suggestions and Ulrich for the review as a target maintainer. |
The approval from @uweigand is helpful from a SystemZ expert, but we should get someone who knows about this stuff on the rustc side (i.e. not me), therefore: |
Oh, do we have an implicit SystemZ architectural minimum, then? That should probably go in the platform-support docs? |
I wouldn't consider it an architectural minimum just yet - that's still z10. We can still generate code that works on anything from z10 upwards. I'm just saying at this point in time it is extremely unlikely that any newly written code would still want to add conditional compilation to make distinctions between older machines like z10, z196, zEC12 etc. Newly written code today would likely want to make such distinctions between z17, z16, z15 or so - so that is where we should provide target feature support primarily. |
Ah, that makes sense to me. |
cool, |
…es, r=workingjubilee add s390x z17 target features tracking issue: rust-lang#130869 earlier target features were added in rust-lang#135630, and rust-lang#135413 (comment) has some extra context on these new features. r? `@ghost` cc `@uweigand`
Rollup of 6 pull requests Successful merges: - #141250 (add s390x z17 target features) - #141570 (Fix incorrect eq_unspanned in TokenStream) - #141893 (remove `f16: From<u16>`) - #141924 (Lightly tweak docs for BTree{Map,Set}::extract_if) - #141959 (Add more missing 2015 edition directives) - #141960 (Use non-2015 edition paths in tests that do not test for their resolution) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #136687 (Improve the documentation of `Display` and `FromStr`, and their interactions) - #137306 (Remove `i128` and `u128` from `improper_ctypes_definitions`) - #138699 (build dist for x86_64-pc-solaris and sparcv9-sun-solaris) - #141250 (add s390x z17 target features) - #141467 (make `OsString::new` and `PathBuf::new` unstably const) - #141871 (index: add method for checking range on DenseBitSet) - #141888 (Use non-2015 edition paths in tests that do not test for their resolution) - #142000 (bootstrap: don't symlink source dir into stage0 sysroot) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #141250 - folkertdev:s390x-z17-target-features, r=workingjubilee add s390x z17 target features tracking issue: #130869 earlier target features were added in #135630, and #135413 (comment) has some extra context on these new features. r? ``@ghost`` cc ``@uweigand``
Rollup of 8 pull requests Successful merges: - rust-lang/rust#136687 (Improve the documentation of `Display` and `FromStr`, and their interactions) - rust-lang/rust#137306 (Remove `i128` and `u128` from `improper_ctypes_definitions`) - rust-lang/rust#138699 (build dist for x86_64-pc-solaris and sparcv9-sun-solaris) - rust-lang/rust#141250 (add s390x z17 target features) - rust-lang/rust#141467 (make `OsString::new` and `PathBuf::new` unstably const) - rust-lang/rust#141871 (index: add method for checking range on DenseBitSet) - rust-lang/rust#141888 (Use non-2015 edition paths in tests that do not test for their resolution) - rust-lang/rust#142000 (bootstrap: don't symlink source dir into stage0 sysroot) r? `@ghost` `@rustbot` modify labels: rollup
tracking issue: #130869
earlier target features were added in #135630, and #135413 (comment) has some extra context on these new features.
r? @ghost
cc @uweigand