@@ -216,21 +216,28 @@ mod tests {
216
216
let ( a, b) = ( f32 :: from_repr( a. 0 ) , f32 :: from_repr( b. 0 ) ) ;
217
217
let x = super :: __addsf3( a, b) ;
218
218
219
- if let Some ( addsf3) = gcc_s:: addsf3( ) {
220
- x. eq_repr( unsafe { addsf3( a, b) } )
221
- } else {
222
- x. eq_repr( a + b)
219
+ match gcc_s:: addsf3( ) {
220
+ // NOTE(cfg) for some reason, on hard float targets, our implementation doesn't
221
+ // match the output of its gcc_s counterpart. Until we investigate further, we'll
222
+ // just avoid testing against gcc_s on those targets. Do note that our
223
+ // implementation matches the output of the FPU instruction on *hard* float targets
224
+ // and matches its gcc_s counterpart on *soft* float targets.
225
+ #[ cfg( not( gnueabihf) ) ]
226
+ Some ( addsf3) => x. eq_repr( unsafe { addsf3( a, b) } ) ,
227
+ _ => x. eq_repr( a + b) ,
223
228
}
224
229
}
225
230
226
231
fn adddf3( a: U64 , b: U64 ) -> bool {
227
232
let ( a, b) = ( f64 :: from_repr( a. 0 ) , f64 :: from_repr( b. 0 ) ) ;
228
233
let x = super :: __adddf3( a, b) ;
229
234
230
- if let Some ( adddf3) = gcc_s:: adddf3( ) {
231
- x. eq_repr( unsafe { adddf3( a, b) } )
232
- } else {
233
- x. eq_repr( a + b)
235
+ match gcc_s:: adddf3( ) {
236
+ // NOTE(cfg) See NOTE above
237
+ #[ cfg( not( gnueabihf) ) ]
238
+ Some ( adddf3) => x. eq_repr( unsafe { adddf3( a, b) } ) ,
239
+ _ => x. eq_repr( a + b) ,
240
+
234
241
}
235
242
}
236
243
}
0 commit comments