diff --git a/rust-version b/rust-version index 1f61617e11..464ab46b92 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -bcd696d722c04a0f8c34d884aa4ed2322f55cdd8 +59f551a2dcf57c0d3d96ac5ef60e000524210469 diff --git a/src/helpers.rs b/src/helpers.rs index 7fe0ae0a97..8a7657745b 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -443,7 +443,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx let this = self.eval_context_mut(); let target = &this.tcx.sess.target; let target_os = &target.os; - let last_error = if target.os_family == Some("unix".to_owned()) { + let last_error = if target.families.contains(&"unix".to_owned()) { this.eval_libc(match e.kind() { ConnectionRefused => "ECONNREFUSED", ConnectionReset => "ECONNRESET", @@ -463,7 +463,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx throw_unsup_format!("io error {} cannot be transformed into a raw os error", e) } })? - } else if target_os == "windows" { + } else if target.families.contains(&"windows".to_owned()) { // FIXME: we have to finish implementing the Windows equivalent of this. this.eval_windows("c", match e.kind() { NotFound => "ERROR_FILE_NOT_FOUND", diff --git a/src/shims/foreign_items.rs b/src/shims/foreign_items.rs index 373d529961..75a7505e73 100644 --- a/src/shims/foreign_items.rs +++ b/src/shims/foreign_items.rs @@ -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); } } }