Skip to content

Commit 43ae314

Browse files
committed
Auto merge of #1786 - RalfJung:rustup, r=RalfJung
fix checking os_family Cc rust-lang/rust#84848
2 parents 0e30385 + c3ae8a6 commit 43ae314

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bcd696d722c04a0f8c34d884aa4ed2322f55cdd8
1+
59f551a2dcf57c0d3d96ac5ef60e000524210469

src/helpers.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
443443
let this = self.eval_context_mut();
444444
let target = &this.tcx.sess.target;
445445
let target_os = &target.os;
446-
let last_error = if target.os_family == Some("unix".to_owned()) {
446+
let last_error = if target.families.contains(&"unix".to_owned()) {
447447
this.eval_libc(match e.kind() {
448448
ConnectionRefused => "ECONNREFUSED",
449449
ConnectionReset => "ECONNRESET",
@@ -463,7 +463,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
463463
throw_unsup_format!("io error {} cannot be transformed into a raw os error", e)
464464
}
465465
})?
466-
} else if target_os == "windows" {
466+
} else if target.families.contains(&"windows".to_owned()) {
467467
// FIXME: we have to finish implementing the Windows equivalent of this.
468468
this.eval_windows("c", match e.kind() {
469469
NotFound => "ERROR_FILE_NOT_FOUND",

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)