@@ -83,8 +83,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
83
83
let op = op. to_scalar ( ) ;
84
84
// "Bitwise" operation, no NaN adjustments
85
85
match float_ty {
86
+ FloatTy :: F16 => unimplemented ! ( "f16_f128" ) ,
86
87
FloatTy :: F32 => Scalar :: from_f32 ( op. to_f32 ( ) ?. abs ( ) ) ,
87
88
FloatTy :: F64 => Scalar :: from_f64 ( op. to_f64 ( ) ?. abs ( ) ) ,
89
+ FloatTy :: F128 => unimplemented ! ( "f16_f128" ) ,
88
90
}
89
91
}
90
92
Op :: Sqrt => {
@@ -93,6 +95,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
93
95
} ;
94
96
// FIXME using host floats
95
97
match float_ty {
98
+ FloatTy :: F16 => unimplemented ! ( "f16_f128" ) ,
96
99
FloatTy :: F32 => {
97
100
let f = op. to_scalar ( ) . to_f32 ( ) ?;
98
101
let res = f. to_host ( ) . sqrt ( ) . to_soft ( ) ;
@@ -105,13 +108,15 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
105
108
let res = this. adjust_nan ( res, & [ f] ) ;
106
109
Scalar :: from ( res)
107
110
}
111
+ FloatTy :: F128 => unimplemented ! ( "f16_f128" ) ,
108
112
}
109
113
}
110
114
Op :: Round ( rounding) => {
111
115
let ty:: Float ( float_ty) = op. layout . ty . kind ( ) else {
112
116
span_bug ! ( this. cur_span( ) , "{} operand is not a float" , intrinsic_name)
113
117
} ;
114
118
match float_ty {
119
+ FloatTy :: F16 => unimplemented ! ( "f16_f128" ) ,
115
120
FloatTy :: F32 => {
116
121
let f = op. to_scalar ( ) . to_f32 ( ) ?;
117
122
let res = f. round_to_integral ( rounding) . value ;
@@ -124,6 +129,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
124
129
let res = this. adjust_nan ( res, & [ f] ) ;
125
130
Scalar :: from_f64 ( res)
126
131
}
132
+ FloatTy :: F128 => unimplemented ! ( "f16_f128" ) ,
127
133
}
128
134
}
129
135
Op :: Numeric ( name) => {
@@ -267,6 +273,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
267
273
span_bug ! ( this. cur_span( ) , "{} operand is not a float" , intrinsic_name)
268
274
} ;
269
275
let val = match float_ty {
276
+ FloatTy :: F16 => unimplemented ! ( "f16_f128" ) ,
270
277
FloatTy :: F32 => {
271
278
let a = a. to_f32 ( ) ?;
272
279
let b = b. to_f32 ( ) ?;
@@ -283,6 +290,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
283
290
let res = this. adjust_nan ( res, & [ a, b, c] ) ;
284
291
Scalar :: from ( res)
285
292
}
293
+ FloatTy :: F128 => unimplemented ! ( "f16_f128" ) ,
286
294
} ;
287
295
this. write_scalar ( val, & dest) ?;
288
296
}
@@ -724,6 +732,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
724
732
let left = left. to_scalar ( ) ;
725
733
let right = right. to_scalar ( ) ;
726
734
Ok ( match float_ty {
735
+ FloatTy :: F16 => unimplemented ! ( "f16_f128" ) ,
727
736
FloatTy :: F32 => {
728
737
let left = left. to_f32 ( ) ?;
729
738
let right = right. to_f32 ( ) ?;
@@ -744,6 +753,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
744
753
let res = this. adjust_nan ( res, & [ left, right] ) ;
745
754
Scalar :: from_f64 ( res)
746
755
}
756
+ FloatTy :: F128 => unimplemented ! ( "f16_f128" ) ,
747
757
} )
748
758
}
749
759
}
0 commit comments