From 11cd87e4572fc3ce19a19bf0dd9a2bcfd3c8e89a Mon Sep 17 00:00:00 2001 From: David Cook Date: Sat, 18 Apr 2020 19:16:52 -0500 Subject: [PATCH] Flip matching --- src/shims/foreign_items.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/shims/foreign_items.rs b/src/shims/foreign_items.rs index e816a35253d..c4acbd6a1b9 100644 --- a/src/shims/foreign_items.rs +++ b/src/shims/foreign_items.rs @@ -433,15 +433,10 @@ fn emulate_foreign_item_by_name( this.write_scalar(Scalar::from_f64(res), dest)?; } + "llvm.x86.sse2.pause" if this.tcx.sess.target.target.arch == "x86" || this.tcx.sess.target.target.arch == "x86_64" => {} + // Target-specific shims _ => { - match this.tcx.sess.target.target.arch.as_str() { - "x86" | "x86_64" => match link_name { - "llvm.x86.sse2.pause" => return Ok(true), - _ => {} - } - _ => {} - } match this.tcx.sess.target.target.target_os.as_str() { "linux" | "macos" => return posix::EvalContextExt::emulate_foreign_item_by_name(this, link_name, args, dest, ret), "windows" => return windows::EvalContextExt::emulate_foreign_item_by_name(this, link_name, args, dest, ret),