Skip to content

Commit aef7dcb

Browse files
Added apxf target feature support, under flag apx_target_feature
1 parent 99b5a86 commit aef7dcb

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

+12
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,18 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
297297
None
298298
}
299299
("x86", "movrs") if get_version().0 < 20 => None,
300+
("x86", "apxf") => Some(LLVMFeature::with_dependencies(
301+
"egpr",
302+
smallvec![
303+
TargetFeatureFoldStrength::Both("push2pop2"),
304+
TargetFeatureFoldStrength::Both("ppx"),
305+
TargetFeatureFoldStrength::Both("ndd"),
306+
TargetFeatureFoldStrength::Both("ccmp"),
307+
TargetFeatureFoldStrength::Both("cf"),
308+
TargetFeatureFoldStrength::Both("nf"),
309+
TargetFeatureFoldStrength::Both("zu"),
310+
],
311+
)),
300312
(_, s) => Some(LLVMFeature::new(s)),
301313
}
302314
}

compiler/rustc_feature/src/unstable.rs

+1
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ declare_features! (
314314
// Unstable `#[target_feature]` directives.
315315
(unstable, aarch64_unstable_target_feature, "1.82.0", Some(44839)),
316316
(unstable, aarch64_ver_target_feature, "1.27.0", Some(44839)),
317+
(unstable, apx_target_feature, "CURRENT_RUSTC_VERSION", Some(139284)),
317318
(unstable, arm_target_feature, "1.27.0", Some(44839)),
318319
(unstable, avx512_target_feature, "1.27.0", Some(44839)),
319320
(unstable, bpf_target_feature, "1.54.0", Some(44839)),

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ symbols! {
457457
anonymous_lifetime_in_impl_trait,
458458
any,
459459
append_const_msg,
460+
apx_target_feature,
460461
arbitrary_enum_discriminant,
461462
arbitrary_self_types,
462463
arbitrary_self_types_pointers,

compiler/rustc_target/src/target_features.rs

+1
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ static X86_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
390390
("amx-tf32", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
391391
("amx-tile", Unstable(sym::x86_amx_intrinsics), &[]),
392392
("amx-transpose", Unstable(sym::x86_amx_intrinsics), &["amx-tile"]),
393+
("apxf", Unstable(sym::apx_target_feature), &[]),
393394
("avx", Stable, &["sse4.2"]),
394395
("avx2", Stable, &["avx"]),
395396
("avx512bf16", Unstable(sym::avx512_target_feature), &["avx512bw"]),

0 commit comments

Comments
 (0)