Skip to content

Commit 25a125d

Browse files
Rollup merge of #157137 - taiki-e:powerpcspe, r=RalfJung
rustc_target: Use +spe for powerpcspe targets LLVM does not infer this from the target name and `abi: "spe"` is just for cfg. To actually generate the correct instructions for these targets (without `-C target-cpu`), we need to pass `+spe` to LLVM. Fixes #138960 See also #157085 Related #137860 cc @RalfJung 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 #48484) cc @biabbas @hax0kartik ([*-wrs-vxworks target maintainers](https://doc.rust-lang.org/nightly/rustc/platform-support/vxworks.html#target-maintainers)) @rustbot label +O-PowerPC +A-target-feature
2 parents a703f75 + 3277a9c commit 25a125d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnuspe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub(crate) fn target() -> Target {
2525
options: TargetOptions {
2626
cfg_abi: CfgAbi::Spe,
2727
endian: Endian::Big,
28-
features: "+secure-plt,+msync".into(),
28+
features: "+secure-plt,+msync,+spe".into(),
2929
mcount: "_mcount".into(),
3030
..base
3131
},

compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_muslspe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub(crate) fn target() -> Target {
2525
options: TargetOptions {
2626
cfg_abi: CfgAbi::Spe,
2727
endian: Endian::Big,
28-
features: "+msync".into(),
28+
features: "+msync,+spe".into(),
2929
mcount: "_mcount".into(),
3030
..base
3131
},

compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks_spe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub(crate) fn target() -> Target {
2626
cfg_abi: CfgAbi::Spe,
2727
endian: Endian::Big,
2828
// feature msync would disable instruction 'fsync' which is not supported by fsl_p1p2
29-
features: "+secure-plt,+msync".into(),
29+
features: "+secure-plt,+msync,+spe".into(),
3030
..base
3131
},
3232
}

0 commit comments

Comments
 (0)