@@ -159,67 +159,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
159159 this. write_scalar ( Scalar :: from_bool ( branch) , dest) ?;
160160 }
161161
162- "floorf16" | "ceilf16" | "truncf16" | "roundf16" | "round_ties_even_f16" => {
163- let [ f] = check_intrinsic_arg_count ( args) ?;
164- let f = this. read_scalar ( f) ?. to_f16 ( ) ?;
165- let mode = match intrinsic_name {
166- "floorf16" => Round :: TowardNegative ,
167- "ceilf16" => Round :: TowardPositive ,
168- "truncf16" => Round :: TowardZero ,
169- "roundf16" => Round :: NearestTiesToAway ,
170- "round_ties_even_f16" => Round :: NearestTiesToEven ,
171- _ => bug ! ( ) ,
172- } ;
173- let res = f. round_to_integral ( mode) . value ;
174- let res = this. adjust_nan ( res, & [ f] ) ;
175- this. write_scalar ( res, dest) ?;
176- }
177- "floorf32" | "ceilf32" | "truncf32" | "roundf32" | "round_ties_even_f32" => {
178- let [ f] = check_intrinsic_arg_count ( args) ?;
179- let f = this. read_scalar ( f) ?. to_f32 ( ) ?;
180- let mode = match intrinsic_name {
181- "floorf32" => Round :: TowardNegative ,
182- "ceilf32" => Round :: TowardPositive ,
183- "truncf32" => Round :: TowardZero ,
184- "roundf32" => Round :: NearestTiesToAway ,
185- "round_ties_even_f32" => Round :: NearestTiesToEven ,
186- _ => bug ! ( ) ,
187- } ;
188- let res = f. round_to_integral ( mode) . value ;
189- let res = this. adjust_nan ( res, & [ f] ) ;
190- this. write_scalar ( res, dest) ?;
191- }
192- "floorf64" | "ceilf64" | "truncf64" | "roundf64" | "round_ties_even_f64" => {
193- let [ f] = check_intrinsic_arg_count ( args) ?;
194- let f = this. read_scalar ( f) ?. to_f64 ( ) ?;
195- let mode = match intrinsic_name {
196- "floorf64" => Round :: TowardNegative ,
197- "ceilf64" => Round :: TowardPositive ,
198- "truncf64" => Round :: TowardZero ,
199- "roundf64" => Round :: NearestTiesToAway ,
200- "round_ties_even_f64" => Round :: NearestTiesToEven ,
201- _ => bug ! ( ) ,
202- } ;
203- let res = f. round_to_integral ( mode) . value ;
204- let res = this. adjust_nan ( res, & [ f] ) ;
205- this. write_scalar ( res, dest) ?;
206- }
207- "floorf128" | "ceilf128" | "truncf128" | "roundf128" | "round_ties_even_f128" => {
208- let [ f] = check_intrinsic_arg_count ( args) ?;
209- let f = this. read_scalar ( f) ?. to_f128 ( ) ?;
210- let mode = match intrinsic_name {
211- "floorf128" => Round :: TowardNegative ,
212- "ceilf128" => Round :: TowardPositive ,
213- "truncf128" => Round :: TowardZero ,
214- "roundf128" => Round :: NearestTiesToAway ,
215- "round_ties_even_f128" => Round :: NearestTiesToEven ,
216- _ => bug ! ( ) ,
217- } ;
218- let res = f. round_to_integral ( mode) . value ;
219- let res = this. adjust_nan ( res, & [ f] ) ;
220- this. write_scalar ( res, dest) ?;
221- }
222-
223162 "sqrtf32" => {
224163 let [ f] = check_intrinsic_arg_count ( args) ?;
225164 let f = this. read_scalar ( f) ?. to_f32 ( ) ?;
0 commit comments