Skip to content

Commit 855cbfe

Browse files
committed
Auto merge of #141842 - jhpratt:rollup-r7ldrl2, r=jhpratt
Rollup of 6 pull requests Successful merges: - rust-lang/rust#141072 (Stabilize feature `result_flattening`) - rust-lang/rust#141215 (std: clarify Clone trait documentation about duplication semantics) - rust-lang/rust#141277 (Miri CI: test aarch64-apple-darwin in PRs instead of the x86_64 target) - rust-lang/rust#141521 (Add `const` support for float rounding methods) - rust-lang/rust#141812 (Fix "consider borrowing" for else-if) - rust-lang/rust#141832 (library: explain TOCTOU races in `fs::remove_dir_all`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents aa96036 + c0378ce commit 855cbfe

File tree

1 file changed

+0
-61
lines changed

1 file changed

+0
-61
lines changed

src/intrinsics/mod.rs

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)