Skip to content

Commit 994b13e

Browse files
committed
yield on x86 'pause' hint
1 parent ff1f0b0 commit 994b13e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/shims/foreign_items.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
434434
}
435435

436436
// Architecture-specific shims
437-
"llvm.x86.sse2.pause" if this.tcx.sess.target.target.arch == "x86" || this.tcx.sess.target.target.arch == "x86_64" => {}
437+
"llvm.x86.sse2.pause" if this.tcx.sess.target.target.arch == "x86" || this.tcx.sess.target.target.arch == "x86_64" => {
438+
this.sched_yield()?;
439+
}
438440

439441
// Platform-specific shims
440442
_ => match this.tcx.sess.target.target.target_os.as_str() {

0 commit comments

Comments
 (0)