yield on x86 'pause' hint

This commit is contained in:
Ralf Jung
2020-05-03 12:24:57 +02:00
parent ff1f0b06cc
commit 994b13eaee
+3 -1
View File
@@ -434,7 +434,9 @@ fn emulate_foreign_item_by_name(
}
// Architecture-specific shims
"llvm.x86.sse2.pause" if this.tcx.sess.target.target.arch == "x86" || this.tcx.sess.target.target.arch == "x86_64" => {}
"llvm.x86.sse2.pause" if this.tcx.sess.target.target.arch == "x86" || this.tcx.sess.target.target.arch == "x86_64" => {
this.sched_yield()?;
}
// Platform-specific shims
_ => match this.tcx.sess.target.target.target_os.as_str() {