add x86-sse2 (32bit) ABI that requires SSE2 target feature

This commit is contained in:
Ralf Jung
2025-01-29 12:16:51 +01:00
parent bdc97d1046
commit 2eff2155e5
25 changed files with 96 additions and 20 deletions

View File

@@ -790,6 +790,13 @@ impl Target {
// x87 must be enabled, soft-float must be disabled.
FeatureConstraints { required: &["x87"], incompatible: &["soft-float"] }
}
Some(RustcAbi::X86Sse2) => {
// Extended hardfloat ABI. x87 and SSE2 must be enabled, soft-float must be disabled.
FeatureConstraints {
required: &["x87", "sse2"],
incompatible: &["soft-float"],
}
}
Some(RustcAbi::X86Softfloat) => {
// Softfloat ABI, requires corresponding target feature. That feature trumps
// `x87` and all other FPU features so those do not matter.
@@ -817,6 +824,7 @@ impl Target {
// LLVM handles the rest.
FeatureConstraints { required: &["soft-float"], incompatible: &[] }
}
Some(r) => panic!("invalid Rust ABI for x86_64: {r:?}"),
}
}
"arm" => {