Skip to content

Commit

Permalink
adjust for different 'yield' hint on aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed May 3, 2021
1 parent aac6e2a commit c3ae8a6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/shims/foreign_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,16 +512,16 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
let &[] = check_arg_count(args)?;
this.yield_active_thread();
}
"llvm.aarch64.hint" if this.tcx.sess.target.arch == "aarch64" => {
"llvm.aarch64.isb" if this.tcx.sess.target.arch == "aarch64" => {
check_abi(abi, Abi::C { unwind: false })?;
let &[ref hint] = check_arg_count(args)?;
let hint = this.read_scalar(hint)?.to_i32()?;
match hint {
1 => { // HINT_YIELD
let &[ref arg] = check_arg_count(args)?;
let arg = this.read_scalar(arg)?.to_i32()?;
match arg {
15 => { // SY ("full system scope")
this.yield_active_thread();
}
_ => {
throw_unsup_format!("unsupported llvm.aarch64.hint argument {}", hint);
throw_unsup_format!("unsupported llvm.aarch64.isb argument {}", arg);
}
}
}
Expand Down

0 comments on commit c3ae8a6

Please sign in to comment.