Enable f16 for LoongArch (#770)
[ the configured-out tests should be re-enabled once we have the symbols in nightly - Trevor ]
This commit is contained in:
parent
e4c1eb803d
commit
890cd1e0f9
3 changed files with 11 additions and 4 deletions
|
|
@ -76,10 +76,8 @@ pub fn configure_f16_f128(target: &Target) {
|
|||
// Selection failure <https://github.com/llvm/llvm-project/issues/50374>
|
||||
"s390x" => false,
|
||||
// Infinite recursion <https://github.com/llvm/llvm-project/issues/97981>
|
||||
// FIXME(llvm20): loongarch fixed by <https://github.com/llvm/llvm-project/pull/107791>
|
||||
"csky" => false,
|
||||
"hexagon" => false,
|
||||
"loongarch64" => false,
|
||||
"powerpc" | "powerpc64" => false,
|
||||
"sparc" | "sparc64" => false,
|
||||
"wasm32" | "wasm64" => false,
|
||||
|
|
|
|||
|
|
@ -75,6 +75,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
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
@ -336,7 +340,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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue