Skip to content

Commit

Permalink
Skip the f16-related tests on LoongArch
Browse files Browse the repository at this point in the history
Skip the f16-related tests on LoongArch if there are no f16 symbols
in the system libraries.
  • Loading branch information
heiher committed Mar 3, 2025
1 parent a2d46f5 commit 8f1dbb6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions testcrate/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ fn main() {
|| target.arch == "powerpc"
|| target.arch == "powerpc64"
|| target.arch == "powerpc64le"
|| target.arch == "loongarch64"
|| (target.arch == "x86" && !target.has_feature("sse"))
|| target.os == "windows"
// Linking says "error: function signature mismatch: __extendhfsf2" and seems to
Expand Down
12 changes: 10 additions & 2 deletions testcrate/tests/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,11 @@ mod extend {
}

#[cfg(all(f16_enabled, f128_enabled))]
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
#[cfg(not(any(
target_arch = "powerpc",
target_arch = "powerpc64",
target_arch = "loongarch64"
)))]
f_to_f! {
extend,
f16 => f32, Half => Single, __extendhfsf2, not(feature = "no-sys-f16");
Expand Down Expand Up @@ -335,7 +339,11 @@ mod trunc {
}

#[cfg(all(f16_enabled, f128_enabled))]
#[cfg(not(any(target_arch = "powerpc", target_arch = "powerpc64")))]
#[cfg(not(any(
target_arch = "powerpc",
target_arch = "powerpc64",
target_arch = "loongarch64"
)))]
f_to_f! {
trunc,
f32 => f16, Single => Half, __truncsfhf2, not(feature = "no-sys-f16");
Expand Down

0 comments on commit 8f1dbb6

Please sign in to comment.