Repository navigation
rustc_target: Require altivec feature for ELFv2 powerpc64 targets - #166049
Conversation
|
Target features are being changed; ensure all ABI effects are being accounted for cc @RalfJung |
|
|
|
r=me with comment nit fixed. |
|
✌️ @Gelbpunkt, you can now approve this pull request! If @RalfJung told you to " |
|
there are projects that need to disable altivec (e.g. antonblanchard/microwatt#354), it would be nice if they have an option to use modern Rust so I think we should not enforce this requirement until we have a suitable soft-float or hard-float-but-no-altivec target. |
|
ah, it just generates a FCW and there is a planned alternative for targets that need to disable features ( |
Note that |
Hopefully the FCW motivates people to create a proper target for this. |
|
Yeah, the primary motivation for requiring AltiVec is f128. Vector types are just not available if AltiVec is disabled anyways, and I don't think any "future type with 16 byte alignment" case is likely to ever be added, but not having f128 on some targets would be suboptimal. With ELFv1 there is no defined ABI for f128, so I guess you could resort to that for an AltiVec-less powerpc64 target. Anyways, I don't think any of this should block enforcing this requirement for ELFv2 at the moment and any possible exceptions should be added when we have targets proposed for those usecases. |
|
There were softfloat PPC targets proposed but #160575 hasn't landed yet. Though elfv2 isn't in that list rust-lang/compiler-team#988 |
|
I believe ELFv2 softfloat should be simple and can just be exempted here in the future since then f128 also isn't a concern. hardfloat without AltiVec is somewhat problematic with f128. |
|
@bors r=RalfJung |
|
@bors squash |
This comment has been minimized.
This comment has been minimized.
* rustc_target: Require altivec feature for ELFv2 powerpc64 targets The ELFv2 ABI requires vector registers for passing certain types like vectors, the IEEE binary128 type and any future 16-byte aligned types. While all our targets that use the ELFv2 ABI have a baseline that already includes AltiVec (and therefore vector registers), we also shouldn't allow disabling the target feature. Add it to the list of ABI required features. * Apply Ralf's comment suggestion
cbf3050 to
1cfe456
Compare
|
🔨 2 commits were squashed into 1cfe456. This pull request was unapproved. |
|
@bors r+ |
…=RalfJung rustc_target: Require altivec feature for ELFv2 powerpc64 targets The ELFv2 ABI requires vector registers for passing certain types like vectors, the IEEE binary128 type and any future 16-byte aligned types. While all our targets that use the ELFv2 ABI have a baseline that already includes AltiVec (and therefore vector registers), we also shouldn't allow disabling the target feature. Add it to the list of ABI required features. r? RalfJung
…=RalfJung rustc_target: Require altivec feature for ELFv2 powerpc64 targets The ELFv2 ABI requires vector registers for passing certain types like vectors, the IEEE binary128 type and any future 16-byte aligned types. While all our targets that use the ELFv2 ABI have a baseline that already includes AltiVec (and therefore vector registers), we also shouldn't allow disabling the target feature. Add it to the list of ABI required features. r? RalfJung
…uwer Rollup of 13 pull requests Successful merges: - #166054 (stdarch subtree update) - #165289 (lexer: Update to Unicode 18) - #165960 (alloctests: use thread-local in `c_str_alloc_error`) - #166002 (#[optimize]: keep low opt levels unoptimized) - #166049 (rustc_target: Require altivec feature for ELFv2 powerpc64 targets) - #165200 (fix abi kind of thumb windows targets) - #165935 (Duplicate attribute diagnostic cleanups) - #165999 (Update TPDE submodule) - #166045 (rustdoc: Correctly filter deref impls on type aliases) - #166063 (Fix bad hyperlink) - #166066 (Update books) - #166072 (simplify Appearances iter) - #166075 (Remove dead code emitting `UnusedBuiltinAttribute`)
Rollup of 15 pull requests Successful merges: - #166054 (stdarch subtree update) - #165939 (Convert `pretty-std` debuginfo test to `gdb-repr`) - #165289 (lexer: Update to Unicode 18) - #165960 (alloctests: use thread-local in `c_str_alloc_error`) - #166002 (#[optimize]: keep low opt levels unoptimized) - #166003 (Fix ICE in tail_expr_drop_order lint with async drops) - #166049 (rustc_target: Require altivec feature for ELFv2 powerpc64 targets) - #165200 (fix abi kind of thumb windows targets) - #165966 (Document failing cases for spawning processes when using Command) - #165999 (Update TPDE submodule) - #166045 (rustdoc: Correctly filter deref impls on type aliases) - #166063 (Fix bad hyperlink) - #166066 (Update books) - #166072 (simplify Appearances iter) - #166075 (Remove dead code emitting `UnusedBuiltinAttribute`)
Rollup merge of #166049 - Gelbpunkt:elfv2-require-altivec, r=RalfJung rustc_target: Require altivec feature for ELFv2 powerpc64 targets The ELFv2 ABI requires vector registers for passing certain types like vectors, the IEEE binary128 type and any future 16-byte aligned types. While all our targets that use the ELFv2 ABI have a baseline that already includes AltiVec (and therefore vector registers), we also shouldn't allow disabling the target feature. Add it to the list of ABI required features. r? RalfJung
Rollup of 15 pull requests Successful merges: - rust-lang/rust#166054 (stdarch subtree update) - rust-lang/rust#165939 (Convert `pretty-std` debuginfo test to `gdb-repr`) - rust-lang/rust#165289 (lexer: Update to Unicode 18) - rust-lang/rust#165960 (alloctests: use thread-local in `c_str_alloc_error`) - rust-lang/rust#166002 (#[optimize]: keep low opt levels unoptimized) - rust-lang/rust#166003 (Fix ICE in tail_expr_drop_order lint with async drops) - rust-lang/rust#166049 (rustc_target: Require altivec feature for ELFv2 powerpc64 targets) - rust-lang/rust#165200 (fix abi kind of thumb windows targets) - rust-lang/rust#165966 (Document failing cases for spawning processes when using Command) - rust-lang/rust#165999 (Update TPDE submodule) - rust-lang/rust#166045 (rustdoc: Correctly filter deref impls on type aliases) - rust-lang/rust#166063 (Fix bad hyperlink) - rust-lang/rust#166066 (Update books) - rust-lang/rust#166072 (simplify Appearances iter) - rust-lang/rust#166075 (Remove dead code emitting `UnusedBuiltinAttribute`)
The ELFv2 ABI requires vector registers for passing certain types like vectors, the IEEE binary128 type and any future 16-byte aligned types. While all our targets that use the ELFv2 ABI have a baseline that already includes AltiVec (and therefore vector registers), we also shouldn't allow disabling the target feature. Add it to the list of ABI required features.
r? RalfJung