@@ -187,9 +187,15 @@ fn float_extend() {
187187 conv ! ( f32 , f64 , __extendsfdf2, Single , Double ) ;
188188 #[ cfg( not( feature = "no-f16-f128" ) ) ]
189189 {
190+ #[ cfg( any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ]
190191 use compiler_builtins:: float:: extend:: {
191- __extenddftf2, __extendhfsf2, __extendhftf2, __extendsftf2, __gnu_h2f_ieee,
192+ __extenddfkf2 as __extenddftf2, __extendhfkf2 as __extendhftf2,
193+ __extendsfkf2 as __extendsftf2,
192194 } ;
195+ #[ cfg( not( any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ) ]
196+ use compiler_builtins:: float:: extend:: { __extenddftf2, __extendhftf2, __extendsftf2} ;
197+ use compiler_builtins:: float:: extend:: { __extendhfsf2, __gnu_h2f_ieee} ;
198+
193199 // FIXME(f16_f128): Also do extend!() for `f16` and `f128` when builtins are in nightly
194200 conv ! ( f16, f32 , __extendhfsf2, Half , Single ) ;
195201 conv ! ( f16, f32 , __gnu_h2f_ieee, Half , Single ) ;
@@ -234,9 +240,15 @@ fn float_trunc() {
234240 conv ! ( f64 , f32 , __truncdfsf2, Double , Single ) ;
235241 #[ cfg( not( feature = "no-f16-f128" ) ) ]
236242 {
243+ use compiler_builtins:: float:: trunc:: { __gnu_f2h_ieee, __truncdfhf2, __truncsfhf2} ;
244+ #[ cfg( any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ]
237245 use compiler_builtins:: float:: trunc:: {
238- __gnu_f2h_ieee, __truncdfhf2, __truncsfhf2, __trunctfdf2, __trunctfhf2, __trunctfsf2,
246+ __trunckfdf2 as __trunctfdf2, __trunckfhf2 as __trunctfhf2,
247+ __trunckfsf2 as __trunctfsf2,
239248 } ;
249+ #[ cfg( not( any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ) ]
250+ use compiler_builtins:: float:: trunc:: { __trunctfdf2, __trunctfhf2, __trunctfsf2} ;
251+
240252 // FIXME(f16_f128): Also do trunc!() for `f16` and `f128` when builtins are in nightly
241253 conv ! ( f32 , f16, __truncsfhf2, Single , Half ) ;
242254 conv ! ( f32 , f16, __gnu_f2h_ieee, Single , Half ) ;
0 commit comments