Skip to content

Commit 49f5f95

Browse files
committed
rustc_target: aarch64: Remove deprecated FEAT_TME
ARM has withdrawn FEAT_TME https://developer.arm.com/documentation/102105/lb-05/ LLVM has dropped support for it recently as a result.
1 parent 2922cbd commit 49f5f95

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
241241
"fp16" => Some(LLVMFeature::new("fullfp16")),
242242
// Filter out features that are not supported by the current LLVM version
243243
"fpmr" => None, // only existed in 18
244+
// Withdrawn by ARM; removed from LLVM in 22
245+
"tme" if major >= 22 => None,
244246
s => Some(LLVMFeature::new(s)),
245247
}
246248
}

library/std/tests/run-time-detect.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ fn aarch64_linux() {
105105
println!("sve2: {}", is_aarch64_feature_detected!("sve2"));
106106
println!("sve2p1: {}", is_aarch64_feature_detected!("sve2p1"));
107107
println!("sve: {}", is_aarch64_feature_detected!("sve"));
108-
println!("tme: {}", is_aarch64_feature_detected!("tme"));
109108
println!("wfxt: {}", is_aarch64_feature_detected!("wfxt"));
110109
// tidy-alphabetical-end
111110
}

library/std_detect/src/detect/os/aarch64.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ pub(crate) fn parse_system_registers(
8484

8585
// ID_AA64ISAR0_EL1 - Instruction Set Attribute Register 0
8686
enable_feature(Feature::pmull, bits_shift(aa64isar0, 7, 4) >= 2);
87-
enable_feature(Feature::tme, bits_shift(aa64isar0, 27, 24) == 1);
8887
enable_feature(Feature::lse, bits_shift(aa64isar0, 23, 20) >= 2);
8988
enable_feature(Feature::crc, bits_shift(aa64isar0, 19, 16) >= 1);
9089

library/std_detect/tests/cpu-detection.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ fn aarch64_linux() {
8585
println!("rcpc2: {}", is_aarch64_feature_detected!("rcpc2"));
8686
println!("rcpc3: {}", is_aarch64_feature_detected!("rcpc3"));
8787
println!("dotprod: {}", is_aarch64_feature_detected!("dotprod"));
88-
println!("tme: {}", is_aarch64_feature_detected!("tme"));
8988
println!("fhm: {}", is_aarch64_feature_detected!("fhm"));
9089
println!("dit: {}", is_aarch64_feature_detected!("dit"));
9190
println!("flagm: {}", is_aarch64_feature_detected!("flagm"));
@@ -175,7 +174,6 @@ fn aarch64_bsd() {
175174
println!("rdm: {:?}", is_aarch64_feature_detected!("rdm"));
176175
println!("rcpc: {:?}", is_aarch64_feature_detected!("rcpc"));
177176
println!("dotprod: {:?}", is_aarch64_feature_detected!("dotprod"));
178-
println!("tme: {:?}", is_aarch64_feature_detected!("tme"));
179177
println!("paca: {:?}", is_aarch64_feature_detected!("paca"));
180178
println!("pacg: {:?}", is_aarch64_feature_detected!("pacg"));
181179
println!("aes: {:?}", is_aarch64_feature_detected!("aes"));

0 commit comments

Comments
 (0)