File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,30 +135,3 @@ impl Float for f64 {
135135 ( 1i32 . wrapping_sub ( shift as i32 ) , significand << shift as Self :: Int )
136136 }
137137}
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);
3131
3232#[ cfg( test) ]
3333mod tests {
34- use float:: { Float , FRepr } ;
35- use qc:: { I32 , U32 , U64 } ;
34+ use float:: { Float } ;
35+ use qc:: { I32 , F32 , F64 } ;
3636
3737 check ! {
3838 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 ) ) )
4342 }
4443
4544 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 ) ) )
5048 }
5149 }
5250}
You can’t perform that action at this time.
0 commit comments