Skip to content

Commit b9c6771

Browse files
committed
Auto merge of #2382 - RalfJung:atomic, r=RalfJung
add support for new RMW orders Implements support for rust-lang/rust#98383. Also restructure intrinsic shims a bit so we have atomic and SIMD intrinsics in their own file, and refactor atomic intrinsic name parsing.
2 parents 5a4d71f + 6ab6462 commit b9c6771

File tree

13 files changed

+1408
-1470
lines changed

13 files changed

+1408
-1470
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
db41351753df840773ca628d8daa040e95d00eef
1+
880416180b0a9ee1141c07d4d17667edb77daebd

src/shims/foreign_items.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
297297
Some(p) => p,
298298
};
299299

300-
// Second: functions that return.
301-
match this.emulate_foreign_item_by_name(link_name, abi, args, dest, ret)? {
300+
// Second: functions that return immediately.
301+
match this.emulate_foreign_item_by_name(link_name, abi, args, dest)? {
302302
EmulateByNameResult::NeedsJumping => {
303303
trace!("{:?}", this.dump_place(**dest));
304304
this.go_to_block(ret);
@@ -355,7 +355,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
355355
abi: Abi,
356356
args: &[OpTy<'tcx, Tag>],
357357
dest: &PlaceTy<'tcx, Tag>,
358-
ret: mir::BasicBlock,
359358
) -> InterpResult<'tcx, EmulateByNameResult<'mir, 'tcx>> {
360359
let this = self.eval_context_mut();
361360

@@ -702,8 +701,8 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
702701

703702
// Platform-specific shims
704703
_ => match this.tcx.sess.target.os.as_ref() {
705-
target if target_os_is_unix(target) => return shims::unix::foreign_items::EvalContextExt::emulate_foreign_item_by_name(this, link_name, abi, args, dest, ret),
706-
"windows" => return shims::windows::foreign_items::EvalContextExt::emulate_foreign_item_by_name(this, link_name, abi, args, dest, ret),
704+
target if target_os_is_unix(target) => return shims::unix::foreign_items::EvalContextExt::emulate_foreign_item_by_name(this, link_name, abi, args, dest),
705+
"windows" => return shims::windows::foreign_items::EvalContextExt::emulate_foreign_item_by_name(this, link_name, abi, args, dest),
707706
target => throw_unsup_format!("the target `{}` is not supported", target),
708707
}
709708
};

0 commit comments

Comments
 (0)