Skip to content

Commit 8ce365f

Browse files
committed
Auto merge of #3024 - RalfJung:nomath, r=RalfJung
llvm.prefetch is not a math function fixes the comment in src/shims/foreign_items.rs
2 parents a45f181 + 05d5f98 commit 8ce365f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/tools/miri/src/shims/foreign_items.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
942942
this.write_scalar(Scalar::from_u64(res.to_bits()), dest)?;
943943
}
944944

945+
// LLVM intrinsics
945946
"llvm.prefetch" => {
946947
let [p, rw, loc, ty] =
947948
this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
@@ -968,8 +969,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
968969
throw_unsup_format!("unsupported `llvm.prefetch` type argument: {}", ty);
969970
}
970971
}
971-
972-
// Architecture-specific shims
973972
"llvm.x86.addcarry.64" if this.tcx.sess.target.arch == "x86_64" => {
974973
// Computes u8+u64+u64, returning tuple (u8,u64) comprising the output carry and truncated sum.
975974
let [c_in, a, b] = this.check_shim(abi, Abi::Unadjusted, link_name, args)?;

0 commit comments

Comments
 (0)