@@ -190,40 +190,18 @@ mod tests {
190
190
use float:: Float ;
191
191
use qc:: { F32 , F64 } ;
192
192
193
- // NOTE The tests below have special handing for NaN values.
194
- // Because NaN != NaN, the floating-point representations must be used
195
- // Because there are many diffferent values of NaN, and the implementation
196
- // doesn't care about calculating the 'correct' one, if both values are NaN
197
- // the values are considered equivalent.
198
-
199
- struct FRepr < F > ( F ) ;
200
-
201
- impl < F : Float > PartialEq for FRepr < F > {
202
- fn eq ( & self , other : & FRepr < F > ) -> bool {
203
- // NOTE(cfg) for some reason, on hard float targets, our implementation doesn't
204
- // match the output of its gcc_s counterpart. Until we investigate further, we'll
205
- // just avoid testing against gcc_s on those targets. Do note that our
206
- // implementation matches the output of the FPU instruction on *hard* float targets
207
- // and matches its gcc_s counterpart on *soft* float targets.
208
- if cfg ! ( gnueabihf) {
209
- return true
210
- }
211
- self . 0 . eq_repr ( other. 0 )
212
- }
213
- }
214
-
215
193
check ! {
216
194
fn __addsf3( f: extern fn ( f32 , f32 ) -> f32 ,
217
195
a: F32 ,
218
196
b: F32 )
219
- -> Option <FRepr < f32 > > {
220
- Some ( FRepr ( f( a. 0 , b. 0 ) ) )
197
+ -> Option <F32 > {
198
+ Some ( F32 ( f( a. 0 , b. 0 ) ) )
221
199
}
222
200
223
201
fn __adddf3( f: extern fn ( f64 , f64 ) -> f64 ,
224
202
a: F64 ,
225
- b: F64 ) -> Option <FRepr < f64 > > {
226
- Some ( FRepr ( f( a. 0 , b. 0 ) ) )
203
+ b: F64 ) -> Option <F64 > {
204
+ Some ( F64 ( f( a. 0 , b. 0 ) ) )
227
205
}
228
206
}
229
207
}
0 commit comments