From b5d29a8c5889a0cbbab6511352e81ff47691ce61 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sun, 6 Oct 2019 10:41:15 +0200 Subject: [PATCH] Rustup to rustc 1.40.0-nightly (787005079 2019-10-04) --- ...3-Disable-inline-assembly-in-libcore.patch | 20 ------------------- src/base.rs | 6 ++++++ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/patches/0003-Disable-inline-assembly-in-libcore.patch b/patches/0003-Disable-inline-assembly-in-libcore.patch index 527dbda821c..dce18ec1ad9 100644 --- a/patches/0003-Disable-inline-assembly-in-libcore.patch +++ b/patches/0003-Disable-inline-assembly-in-libcore.patch @@ -25,25 +25,5 @@ index ad5a207..04712b8 100644 } + */ } -diff --git a/src/libcore/hint.rs b/src/libcore/hint.rs -index ce35181..7d3f6a5 100644 ---- a/src/libcore/hint.rs -+++ b/src/libcore/hint.rs -@@ -128,6 +128,7 @@ pub fn black_box(dummy: T) -> T { - // this. LLVM's intepretation of inline assembly is that it's, well, a black - // box. This isn't the greatest implementation since it probably deoptimizes - // more than we want, but it's so far good enough. -+/* - #[cfg(not(any( - target_arch = "asmjs", - all( -@@ -139,6 +140,7 @@ pub fn black_box(dummy: T) -> T { - asm!("" : : "r"(&dummy)); - return dummy; - } -+*/ - - // Not all platforms support inline assembly so try to do something without - // inline assembly which in theory still hinders at least some optimizations -- 2.17.2 (Apple Git-113) diff --git a/src/base.rs b/src/base.rs index 7cb079567f1..96f3b783d91 100644 --- a/src/base.rs +++ b/src/base.rs @@ -536,6 +536,12 @@ fn trans_stmt<'tcx>( asm_str_style: _, } = asm; match &*asm_code.as_str() { + "" => { + assert_eq!(inputs, &[Name::intern("r")]); + assert!(outputs.is_empty(), "{:?}", outputs); + + // Black box + } "cpuid" | "cpuid\n" => { assert_eq!(inputs, &[Name::intern("{eax}"), Name::intern("{ecx}")]);