about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-11 15:07:18 +0000
committerbors <bors@rust-lang.org>2023-08-11 15:07:18 +0000
commit8ce365ff79fe323ca5ea269ea261363efc82ce2d (patch)
tree0a310e404895a649759279a94975eab5b1f49cc3
parenta45f181eb0e9337bb5e5aea59c74018db4edc432 (diff)
parent05d5f9887de8399254c77e96ed72f4f80cc60db3 (diff)
downloadrust-8ce365ff79fe323ca5ea269ea261363efc82ce2d.tar.gz
rust-8ce365ff79fe323ca5ea269ea261363efc82ce2d.zip
Auto merge of #3024 - RalfJung:nomath, r=RalfJung
llvm.prefetch is not a math function

fixes the comment in src/shims/foreign_items.rs
-rw-r--r--src/tools/miri/src/shims/foreign_items.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tools/miri/src/shims/foreign_items.rs b/src/tools/miri/src/shims/foreign_items.rs
index 953677d3290..99bcce6ab74 100644
--- a/src/tools/miri/src/shims/foreign_items.rs
+++ b/src/tools/miri/src/shims/foreign_items.rs
@@ -942,6 +942,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
                 this.write_scalar(Scalar::from_u64(res.to_bits()), dest)?;
             }
 
+            // LLVM intrinsics
             "llvm.prefetch" => {
                 let [p, rw, loc, ty] =
                     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> {
                     throw_unsup_format!("unsupported `llvm.prefetch` type argument: {}", ty);
                 }
             }
-
-            // Architecture-specific shims
             "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.
                 let [c_in, a, b] = this.check_shim(abi, Abi::Unadjusted, link_name, args)?;