Auto merge of #3024 - RalfJung:nomath, r=RalfJung

llvm.prefetch is not a math function

fixes the comment in src/shims/foreign_items.rs
This commit is contained in:
bors 2023-08-11 15:07:18 +00:00
commit 8ce365ff79

View File

@ -942,6 +942,7 @@ fn emulate_foreign_item_by_name(
this.write_scalar(Scalar::from_u64(res.to_bits()), dest)?; this.write_scalar(Scalar::from_u64(res.to_bits()), dest)?;
} }
// LLVM intrinsics
"llvm.prefetch" => { "llvm.prefetch" => {
let [p, rw, loc, ty] = let [p, rw, loc, ty] =
this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?; this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
@ -968,8 +969,6 @@ fn emulate_foreign_item_by_name(
throw_unsup_format!("unsupported `llvm.prefetch` type argument: {}", ty); throw_unsup_format!("unsupported `llvm.prefetch` type argument: {}", ty);
} }
} }
// Architecture-specific shims
"llvm.x86.addcarry.64" if this.tcx.sess.target.arch == "x86_64" => { "llvm.x86.addcarry.64" if this.tcx.sess.target.arch == "x86_64" => {
// Computes u8+u64+u64, returning tuple (u8,u64) comprising the output carry and truncated sum. // Computes u8+u64+u64, returning tuple (u8,u64) comprising the output carry and truncated sum.
let [c_in, a, b] = this.check_shim(abi, Abi::Unadjusted, link_name, args)?; let [c_in, a, b] = this.check_shim(abi, Abi::Unadjusted, link_name, args)?;