]> git.lizzy.rs Git - rust.git/commitdiff
Review comments
authorDavid Cook <divergentdave@gmail.com>
Sun, 19 Apr 2020 14:22:40 +0000 (09:22 -0500)
committerDavid Cook <divergentdave@gmail.com>
Sun, 19 Apr 2020 14:22:40 +0000 (09:22 -0500)
src/shims/foreign_items.rs

index c4acbd6a1b9a90a9cab980274bff10815482fa22..75a2475d228a6535087a8e347fcbdb1814783c3f 100644 (file)
@@ -433,15 +433,14 @@ fn emulate_foreign_item_by_name(
                 this.write_scalar(Scalar::from_f64(res), dest)?;
             }
 
+            // Architecture-specific shims
             "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.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),
-                    target => throw_unsup_format!("the target `{}` is not supported", target),
-                }
+            // Platform-specific shims
+            _ => 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),
+                target => throw_unsup_format!("the target `{}` is not supported", target),
             }
         };