1
Fork 0

Rustup to rustc 1.40.0-nightly (787005079 2019-10-04)

This commit is contained in:
bjorn3 2019-10-06 10:41:15 +02:00
parent 8bb81fdc3b
commit b5d29a8c58
2 changed files with 6 additions and 20 deletions

View file

@ -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<T>(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<T>(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)

View file

@ -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}")]);