Enable f16 on platforms that were missing conversion symbols · qinheping/verify-rust-std@05590f7 (original) (raw)

`@@ -96,9 +96,6 @@ fn main() {

`

96

96

`let has_reliable_f16 = match (target_arch.as_str(), target_os.as_str()) {

`

97

97

`// We can always enable these in Miri as that is not affected by codegen bugs.

`

98

98

` _ if is_miri => true,

`

99

``

`-

// Selection failure until recent LLVM https://github.com/llvm/llvm-project/issues/93894

`

100

``

`-

// FIXME(llvm19): can probably be removed at the version bump

`

101

``

`-

("loongarch64", _) => false,

`

102

99

`// Selection failure https://github.com/llvm/llvm-project/issues/50374

`

103

100

`("s390x", _) => false,

`

104

101

`// Unsupported https://github.com/llvm/llvm-project/issues/94434

`

`@@ -108,18 +105,18 @@ fn main() {

`

108

105

`` // Apple has a special ABI for f16 that we do not yet support

``

109

106

`// FIXME(builtins): fixed by https://github.com/rust-lang/compiler-builtins/pull/675

`

110

107

`("x86" | "x86_64", _) if target_vendor == "apple" => false,

`

111

``

`` -

// Missing __gnu_h2f_ieee and __gnu_f2h_ieee

``

``

108

`+

// Infinite recursion https://github.com/llvm/llvm-project/issues/97981

`

``

109

`+

("csky", _) => false,

`

``

110

`+

("hexagon", _) => false,

`

``

111

`+

("loongarch64", _) => false,

`

``

112

`+

("mips" | "mips64" | "mips32r6" | "mips64r6", _) => false,

`

112

113

`("powerpc" | "powerpc64", _) => false,

`

113

``

`` -

// Missing __gnu_h2f_ieee and __gnu_f2h_ieee

``

114

``

`-

("mips" | "mips32r6" | "mips64" | "mips64r6", _) => false,

`

115

``

`` -

// Missing __extendhfsf and __truncsfhf

``

116

``

`-

("riscv32" | "riscv64", _) => false,

`

117

``

`` -

// Most OSs are missing __extendhfsf and __truncsfhf

``

118

``

`-

(_, "linux" | "macos") => true,

`

119

``

`-

// Almost all OSs besides Linux and MacOS are missing symbols until compiler-builtins can

`

120

``

`-

// be updated. https://github.com/rust-lang/rust/pull/125016 will get some of these, the

`

121

``

`-

// next CB update should get the rest.

`

122

``

`-

_ => false,

`

``

114

`+

("sparc" | "sparc64", _) => false,

`

``

115

`+

("wasm32" | "wasm64", _) => false,

`

``

116

`` +

// f16 support only requires that symbols converting to and from f32 are available. We

``

``

117

`` +

// provide these in compiler-builtins, so f16 should be available on all platforms that

``

``

118

`+

// do not have other ABI issues or LLVM crashes.

`

``

119

`+

_ => true,

`

123

120

`};

`

124

121

``

125

122

`let has_reliable_f128 = match (target_arch.as_str(), target_os.as_str()) {

`