Description
I tried this code when targeting any of the PowerPC SPE targets such as powerpc-unknown-linux-muslspe
(compiler explorer):
pub fn add(x: f32, y: f32) -> f32 {
x + y
}
I expected to see this happen: The assembly to use SPE instructions as this is an SPE target.
Instead, this happened: The assembly uses regular PowerPC FPU floating point instructions, as none of the three powerpc-*spe
targets actually have the spe
target feature enabled. According to the Debian PowerPCSPEPort wiki page, PowerPC SPE lacks the standard PowerPC FPU, and the Signal Processing Engine (SPE) Programming Environments Manual doesn't list fadds
(which the targets currently compile the x + y
to) as an SPE instruction, so the status quo is almost certainly incorrect.
cc @BKPepe as target maintainer of powerpc-unknown-linux-muslspe
. Also cc @glaubitz who added powerpc-unknown-linux-gnuspe
in #48484 and @BaoshanPang who added powerpc-wrs-vxworks-spe
in #61946, as neither of those two targets have any target maintainers.
Meta
rustc --version --verbose
:
rustc 1.87.0-nightly (aa8f0fd71 2025-03-23)
binary: rustc
commit-hash: aa8f0fd7163a2f23aa958faed30c9c2b77b934a5
commit-date: 2025-03-23
host: x86_64-unknown-linux-gnu
release: 1.87.0-nightly
LLVM version: 20.1.1