Skip to content

Commit c3ae8a6

Browse files
committed
adjust for different 'yield' hint on aarch64
1 parent aac6e2a commit c3ae8a6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/shims/foreign_items.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -512,16 +512,16 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
512512
let &[] = check_arg_count(args)?;
513513
this.yield_active_thread();
514514
}
515-
"llvm.aarch64.hint" if this.tcx.sess.target.arch == "aarch64" => {
515+
"llvm.aarch64.isb" if this.tcx.sess.target.arch == "aarch64" => {
516516
check_abi(abi, Abi::C { unwind: false })?;
517-
let &[ref hint] = check_arg_count(args)?;
518-
let hint = this.read_scalar(hint)?.to_i32()?;
519-
match hint {
520-
1 => { // HINT_YIELD
517+
let &[ref arg] = check_arg_count(args)?;
518+
let arg = this.read_scalar(arg)?.to_i32()?;
519+
match arg {
520+
15 => { // SY ("full system scope")
521521
this.yield_active_thread();
522522
}
523523
_ => {
524-
throw_unsup_format!("unsupported llvm.aarch64.hint argument {}", hint);
524+
throw_unsup_format!("unsupported llvm.aarch64.isb argument {}", arg);
525525
}
526526
}
527527
}

0 commit comments

Comments
 (0)