File tree 4 files changed +28
-2
lines changed
4 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ of being added to Rust.
274
274
- [ ] floatunsitf.c
275
275
- [ ] floatuntitf.c
276
276
- [x] multf3.c
277
- - [ ] powitf2.c
277
+ - [x ] powitf2.c
278
278
- [x] subtf3.c
279
279
- [x] truncdfhf2.c
280
280
- [x] truncsfhf2.c
Original file line number Diff line number Diff line change @@ -527,7 +527,6 @@ mod c {
527
527
( "__floatunditf" , "floatunditf.c" ) ,
528
528
( "__floatunsitf" , "floatunsitf.c" ) ,
529
529
( "__divtf3" , "divtf3.c" ) ,
530
- ( "__powitf2" , "powitf2.c" ) ,
531
530
( "__fe_getround" , "fp_mode.c" ) ,
532
531
( "__fe_raise_inexact" , "fp_mode.c" ) ,
533
532
] ) ;
Original file line number Diff line number Diff line change @@ -35,4 +35,16 @@ intrinsics! {
35
35
pub extern "C" fn __powidf2( a: f64 , b: i32 ) -> f64 {
36
36
pow( a, b)
37
37
}
38
+
39
+ #[ avr_skip]
40
+ #[ cfg( not( any( feature = "no-f16-f128" , target_arch = "powerpc" , target_arch = "powerpc64" ) ) ) ]
41
+ pub extern "C" fn __powitf2( a: f128, b: i32 ) -> f128 {
42
+ pow( a, b)
43
+ }
44
+
45
+ #[ avr_skip]
46
+ #[ cfg( all( not( feature = "no-f16-f128" ) , any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ) ]
47
+ pub extern "C" fn __powikf2( a: f128, b: i32 ) -> f128 {
48
+ pow( a, b)
49
+ }
38
50
}
Original file line number Diff line number Diff line change 1
1
#![ allow( unused_macros) ]
2
+ #![ cfg_attr( f128_enabled, feature( f128) ) ]
2
3
#![ cfg( not( all( target_arch = "x86" , not( target_feature = "sse" ) ) ) ) ]
3
4
4
5
use testcrate:: * ;
@@ -53,3 +54,17 @@ pow! {
53
54
f32 , 1e-4 , __powisf2;
54
55
f64 , 1e-12 , __powidf2;
55
56
}
57
+
58
+ #[ cfg( f128_enabled) ]
59
+ // Windows can't link the required arithmetic functions. See
60
+ // <https://github.com/rust-lang/compiler-builtins/pull/614#issuecomment-2118636613>
61
+ #[ cfg( not( any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ) ]
62
+ pow ! {
63
+ f128, 1e-36 , __powitf2;
64
+ }
65
+
66
+ #[ cfg( f128_enabled) ]
67
+ #[ cfg( any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ]
68
+ pow ! {
69
+ f128, 1e-36 , __powikf2;
70
+ }
You can’t perform that action at this time.
0 commit comments