Skip to content

Commit 547a4cc

Browse files
committed
Review comments
1 parent 7b69a62 commit 547a4cc

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/shims/foreign_items.rs

+6-7
Original file line numberDiff line numberDiff line change
@@ -433,15 +433,14 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
433433
this.write_scalar(Scalar::from_f64(res), dest)?;
434434
}
435435

436+
// Architecture-specific shims
436437
"llvm.x86.sse2.pause" if this.tcx.sess.target.target.arch == "x86" || this.tcx.sess.target.target.arch == "x86_64" => {}
437438

438-
// Target-specific shims
439-
_ => {
440-
match this.tcx.sess.target.target.target_os.as_str() {
441-
"linux" | "macos" => return posix::EvalContextExt::emulate_foreign_item_by_name(this, link_name, args, dest, ret),
442-
"windows" => return windows::EvalContextExt::emulate_foreign_item_by_name(this, link_name, args, dest, ret),
443-
target => throw_unsup_format!("the target `{}` is not supported", target),
444-
}
439+
// Platform-specific shims
440+
_ => match this.tcx.sess.target.target.target_os.as_str() {
441+
"linux" | "macos" => return posix::EvalContextExt::emulate_foreign_item_by_name(this, link_name, args, dest, ret),
442+
"windows" => return windows::EvalContextExt::emulate_foreign_item_by_name(this, link_name, args, dest, ret),
443+
target => throw_unsup_format!("the target `{}` is not supported", target),
445444
}
446445
};
447446

0 commit comments

Comments
 (0)