diff options
| author | WANG Rui <wangrui@loongson.cn> | 2025-06-28 11:16:39 +0800 |
|---|---|---|
| committer | WANG Rui <wangrui@loongson.cn> | 2025-06-28 11:28:32 +0800 |
| commit | d63e865a958a4e75e20b9b043c22b70094b9f0e1 (patch) | |
| tree | 97b9f21c89efe909c499c75988ad52836d5a78da /library/stdarch/crates/std_detect/tests | |
| parent | 36462f901e5b45eec36ea52000c8f2caa4b8ea67 (diff) | |
| download | rust-d63e865a958a4e75e20b9b043c22b70094b9f0e1.tar.gz rust-d63e865a958a4e75e20b9b043c22b70094b9f0e1.zip | |
loongarch: Add basic support for LoongArch32
Diffstat (limited to 'library/stdarch/crates/std_detect/tests')
| -rw-r--r-- | library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs b/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs index fa3a23c7968..2fee0abdd57 100644 --- a/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs +++ b/library/stdarch/crates/std_detect/tests/macro_trailing_commas.rs @@ -11,6 +11,7 @@ target_arch = "s390x", target_arch = "riscv32", target_arch = "riscv64", + target_arch = "loongarch32", target_arch = "loongarch64" ), feature(stdarch_internal) @@ -30,7 +31,7 @@ feature(stdarch_riscv_feature_detection) )] #![cfg_attr( - target_arch = "loongarch64", + any(target_arch = "loongarch32", target_arch = "loongarch64"), feature(stdarch_loongarch_feature_detection) )] @@ -45,6 +46,7 @@ target_arch = "s390x", target_arch = "riscv32", target_arch = "riscv64", + target_arch = "loongarch32", target_arch = "loongarch64" ))] #[macro_use] @@ -65,8 +67,8 @@ fn aarch64() { } #[test] -#[cfg(target_arch = "loongarch64")] -fn loongarch64() { +#[cfg(any(target_arch = "loongarch32", target_arch = "loongarch64"))] +fn loongarch() { let _ = is_loongarch_feature_detected!("lsx"); let _ = is_loongarch_feature_detected!("lsx",); } |
