Skip to content

Commit 4f17ac5

Browse files
heiherAmanieu
authored andcommitted
std_detect: loongarch: Remove features not supported by LLVM
1 parent 15b9572 commit 4f17ac5

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

crates/std_detect/src/detect/arch/loongarch.rs

-24
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,17 @@ features! {
88
/// Checks if `loongarch` feature is enabled.
99
/// Supported arguments are:
1010
///
11-
/// * `"lam"`
1211
/// * `"ual"`
13-
/// * `"fpu"`
1412
/// * `"lsx"`
1513
/// * `"lasx"`
16-
/// * `"crc32"`
17-
/// * `"complex"`
18-
/// * `"crypto"`
1914
/// * `"lvz"`
20-
/// * `"lbtx86"`
21-
/// * `"lbtarm"`
22-
/// * `"lbtmips"`
2315
#[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")]
24-
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] lam: "lam";
25-
/// LAM
2616
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] ual: "ual";
2717
/// UAL
28-
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] fpu: "fpu";
29-
/// FPU
3018
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] lsx: "lsx";
3119
/// LSX
3220
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] lasx: "lasx";
3321
/// LASX
34-
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] crc32: "crc32";
35-
/// FPU
36-
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] complex: "complex";
37-
/// Complex
38-
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] crypto: "crypto";
39-
/// Crypto
4022
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] lvz: "lvz";
4123
/// LVZ
42-
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] lbtx86: "lbtx86";
43-
/// LBT.X86
44-
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] lbtarm: "lbtarm";
45-
/// LBT.ARM
46-
@FEATURE: #[unstable(feature = "stdarch_loongarch_feature_detection", issue = "117425")] lbtmips: "lbtmips";
47-
/// LBT.MIPS
4824
}

crates/std_detect/src/detect/os/linux/loongarch.rs

-8
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,10 @@ pub(crate) fn detect_features() -> cache::Initializer {
1616
//
1717
// [hwcap]: https://github.com/torvalds/linux/blob/master/arch/loongarch/include/uapi/asm/hwcap.h
1818
if let Ok(auxv) = auxvec::auxv() {
19-
enable_feature(&mut value, Feature::lam, bit::test(auxv.hwcap, 1));
2019
enable_feature(&mut value, Feature::ual, bit::test(auxv.hwcap, 2));
21-
enable_feature(&mut value, Feature::fpu, bit::test(auxv.hwcap, 3));
2220
enable_feature(&mut value, Feature::lsx, bit::test(auxv.hwcap, 4));
2321
enable_feature(&mut value, Feature::lasx, bit::test(auxv.hwcap, 5));
24-
enable_feature(&mut value, Feature::crc32, bit::test(auxv.hwcap, 6));
25-
enable_feature(&mut value, Feature::complex, bit::test(auxv.hwcap, 7));
26-
enable_feature(&mut value, Feature::crypto, bit::test(auxv.hwcap, 8));
2722
enable_feature(&mut value, Feature::lvz, bit::test(auxv.hwcap, 9));
28-
enable_feature(&mut value, Feature::lbtx86, bit::test(auxv.hwcap, 10));
29-
enable_feature(&mut value, Feature::lbtarm, bit::test(auxv.hwcap, 11));
30-
enable_feature(&mut value, Feature::lbtmips, bit::test(auxv.hwcap, 12));
3123
return value;
3224
}
3325
value

0 commit comments

Comments
 (0)