Vendor dependencies

This commit is contained in:
2026-08-01 16:11:49 +03:00
parent 7f139a0241
commit 6b5e7f0f8b
29706 changed files with 9575646 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
//! ARM64 tests
#![cfg(target_arch = "aarch64")]
cpufeatures::new!(armcaps, "aes", "sha2", "sha3", "sm4");
#[test]
fn init() {
let token: armcaps::InitToken = armcaps::init();
assert_eq!(token.get(), armcaps::get());
}
#[test]
fn init_get() {
let (token, val) = armcaps::init_get();
assert_eq!(val, token.get());
}
+33
View File
@@ -0,0 +1,33 @@
//! `loongarch64` tests
#![cfg(target_arch = "loongarch64")]
cpufeatures::new!(
lacaps,
"32s",
"f",
"d",
"frecipe",
"div32",
"lsx",
"lasx",
"lam-bh",
"lamcas",
"ld-seq-sa",
"scq",
"lbt",
"lvz",
"ual"
);
#[test]
fn init() {
let token: lacaps::InitToken = lacaps::init();
assert_eq!(token.get(), lacaps::get());
}
#[test]
fn init_get() {
let (token, val) = lacaps::init_get();
assert_eq!(val, token.get());
}
+17
View File
@@ -0,0 +1,17 @@
//! `x86`/`x86_64` tests
#![cfg(any(target_arch = "x86", target_arch = "x86_64"))]
cpufeatures::new!(cpuid, "aes", "sha");
#[test]
fn init() {
let token: cpuid::InitToken = cpuid::init();
assert_eq!(token.get(), cpuid::get());
}
#[test]
fn init_get() {
let (token, val) = cpuid::init_get();
assert_eq!(val, token.get());
}