@@ -193,12 +193,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
193
193
=> {
194
194
let [ f] = check_arg_count ( args) ?;
195
195
let f = this. read_scalar ( f) ?. to_f32 ( ) ?;
196
- // FIXME: Using host floats.
196
+ // Using host floats (but it's fine, these operations do not have guaranteed precision) .
197
197
let f_host = f. to_host ( ) ;
198
198
let res = match intrinsic_name {
199
199
"sinf32" => f_host. sin ( ) ,
200
200
"cosf32" => f_host. cos ( ) ,
201
- "sqrtf32" => f_host. sqrt ( ) ,
201
+ "sqrtf32" => f_host. sqrt ( ) , // FIXME Using host floats, this should use full-precision soft-floats
202
202
"expf32" => f_host. exp ( ) ,
203
203
"exp2f32" => f_host. exp2 ( ) ,
204
204
"logf32" => f_host. ln ( ) ,
@@ -238,12 +238,12 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
238
238
=> {
239
239
let [ f] = check_arg_count ( args) ?;
240
240
let f = this. read_scalar ( f) ?. to_f64 ( ) ?;
241
- // FIXME: Using host floats.
241
+ // Using host floats (but it's fine, these operations do not have guaranteed precision) .
242
242
let f_host = f. to_host ( ) ;
243
243
let res = match intrinsic_name {
244
244
"sinf64" => f_host. sin ( ) ,
245
245
"cosf64" => f_host. cos ( ) ,
246
- "sqrtf64" => f_host. sqrt ( ) ,
246
+ "sqrtf64" => f_host. sqrt ( ) , // FIXME Using host floats, this should use full-precision soft-floats
247
247
"expf64" => f_host. exp ( ) ,
248
248
"exp2f64" => f_host. exp2 ( ) ,
249
249
"logf64" => f_host. ln ( ) ,
@@ -366,7 +366,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
366
366
let [ f1, f2] = check_arg_count ( args) ?;
367
367
let f1 = this. read_scalar ( f1) ?. to_f32 ( ) ?;
368
368
let f2 = this. read_scalar ( f2) ?. to_f32 ( ) ?;
369
- // FIXME: Using host floats.
369
+ // Using host floats (but it's fine, this operation does not have guaranteed precision) .
370
370
let res = f1. to_host ( ) . powf ( f2. to_host ( ) ) . to_soft ( ) ;
371
371
let res = this. adjust_nan ( res, & [ f1, f2] ) ;
372
372
this. write_scalar ( res, dest) ?;
@@ -376,7 +376,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
376
376
let [ f1, f2] = check_arg_count ( args) ?;
377
377
let f1 = this. read_scalar ( f1) ?. to_f64 ( ) ?;
378
378
let f2 = this. read_scalar ( f2) ?. to_f64 ( ) ?;
379
- // FIXME: Using host floats.
379
+ // Using host floats (but it's fine, this operation does not have guaranteed precision) .
380
380
let res = f1. to_host ( ) . powf ( f2. to_host ( ) ) . to_soft ( ) ;
381
381
let res = this. adjust_nan ( res, & [ f1, f2] ) ;
382
382
this. write_scalar ( res, dest) ?;
@@ -386,7 +386,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
386
386
let [ f, i] = check_arg_count ( args) ?;
387
387
let f = this. read_scalar ( f) ?. to_f32 ( ) ?;
388
388
let i = this. read_scalar ( i) ?. to_i32 ( ) ?;
389
- // FIXME: Using host floats.
389
+ // Using host floats (but it's fine, this operation does not have guaranteed precision) .
390
390
let res = f. to_host ( ) . powi ( i) . to_soft ( ) ;
391
391
let res = this. adjust_nan ( res, & [ f] ) ;
392
392
this. write_scalar ( res, dest) ?;
@@ -396,7 +396,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
396
396
let [ f, i] = check_arg_count ( args) ?;
397
397
let f = this. read_scalar ( f) ?. to_f64 ( ) ?;
398
398
let i = this. read_scalar ( i) ?. to_i32 ( ) ?;
399
- // FIXME: Using host floats.
399
+ // Using host floats (but it's fine, this operation does not have guaranteed precision) .
400
400
let res = f. to_host ( ) . powi ( i) . to_soft ( ) ;
401
401
let res = this. adjust_nan ( res, & [ f] ) ;
402
402
this. write_scalar ( res, dest) ?;
0 commit comments