File tree 2 files changed +8
-37
lines changed
2 files changed +8
-37
lines changed Original file line number Diff line number Diff line change @@ -135,30 +135,3 @@ impl Float for f64 {
135
135
( 1i32 . wrapping_sub ( shift as i32 ) , significand << shift as Self :: Int )
136
136
}
137
137
}
138
-
139
- // TODO: Move this to F32/F64 in qc.rs
140
- #[ cfg( test) ]
141
- #[ derive( Copy , Clone ) ]
142
- pub struct FRepr < F > ( F ) ;
143
-
144
- #[ cfg( test) ]
145
- impl < F : Float > PartialEq for FRepr < F > {
146
- fn eq ( & self , other : & FRepr < F > ) -> bool {
147
- // NOTE(cfg) for some reason, on hard float targets, our implementation doesn't
148
- // match the output of its gcc_s counterpart. Until we investigate further, we'll
149
- // just avoid testing against gcc_s on those targets. Do note that our
150
- // implementation matches the output of the FPU instruction on *hard* float targets
151
- // and matches its gcc_s counterpart on *soft* float targets.
152
- if cfg ! ( gnueabihf) {
153
- return true
154
- }
155
- self . 0 . eq_repr ( other. 0 )
156
- }
157
- }
158
-
159
- #[ cfg( test) ]
160
- impl < F : fmt:: Debug > fmt:: Debug for FRepr < F > {
161
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
162
- self . 0 . fmt ( f)
163
- }
164
- }
Original file line number Diff line number Diff line change @@ -31,22 +31,20 @@ pow!(__powidf2: f64, i32);
31
31
32
32
#[ cfg( test) ]
33
33
mod tests {
34
- use float:: { Float , FRepr } ;
35
- use qc:: { I32 , U32 , U64 } ;
34
+ use float:: { Float } ;
35
+ use qc:: { I32 , F32 , F64 } ;
36
36
37
37
check ! {
38
38
fn __powisf2( f: extern fn ( f32 , i32 ) -> f32 ,
39
- a: U32 ,
40
- b: I32 ) -> Option <FRepr <f32 > > {
41
- let ( a, b) = ( f32 :: from_repr( a. 0 ) , b. 0 ) ;
42
- Some ( FRepr ( f( a, b) ) )
39
+ a: F32 ,
40
+ b: I32 ) -> Option <F32 > {
41
+ Some ( F32 ( f( a. 0 , b. 0 ) ) )
43
42
}
44
43
45
44
fn __powidf2( f: extern fn ( f64 , i32 ) -> f64 ,
46
- a: U64 ,
47
- b: I32 ) -> Option <FRepr <f64 > > {
48
- let ( a, b) = ( f64 :: from_repr( a. 0 ) , b. 0 ) ;
49
- Some ( FRepr ( f( a, b) ) )
45
+ a: F64 ,
46
+ b: I32 ) -> Option <F64 > {
47
+ Some ( F64 ( f( a. 0 , b. 0 ) ) )
50
48
}
51
49
}
52
50
}
You can’t perform that action at this time.
0 commit comments