Skip to content

Commit b5d29a8

Browse files
committed
Rustup to rustc 1.40.0-nightly (787005079 2019-10-04)
1 parent 8bb81fd commit b5d29a8

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

patches/0003-Disable-inline-assembly-in-libcore.patch

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,5 @@ index ad5a207..04712b8 100644
2525
}
2626
+ */
2727
}
28-
diff --git a/src/libcore/hint.rs b/src/libcore/hint.rs
29-
index ce35181..7d3f6a5 100644
30-
--- a/src/libcore/hint.rs
31-
+++ b/src/libcore/hint.rs
32-
@@ -128,6 +128,7 @@ pub fn black_box<T>(dummy: T) -> T {
33-
// this. LLVM's intepretation of inline assembly is that it's, well, a black
34-
// box. This isn't the greatest implementation since it probably deoptimizes
35-
// more than we want, but it's so far good enough.
36-
+/*
37-
#[cfg(not(any(
38-
target_arch = "asmjs",
39-
all(
40-
@@ -139,6 +140,7 @@ pub fn black_box<T>(dummy: T) -> T {
41-
asm!("" : : "r"(&dummy));
42-
return dummy;
43-
}
44-
+*/
45-
46-
// Not all platforms support inline assembly so try to do something without
47-
// inline assembly which in theory still hinders at least some optimizations
4828
--
4929
2.17.2 (Apple Git-113)

src/base.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,12 @@ fn trans_stmt<'tcx>(
536536
asm_str_style: _,
537537
} = asm;
538538
match &*asm_code.as_str() {
539+
"" => {
540+
assert_eq!(inputs, &[Name::intern("r")]);
541+
assert!(outputs.is_empty(), "{:?}", outputs);
542+
543+
// Black box
544+
}
539545
"cpuid" | "cpuid\n" => {
540546
assert_eq!(inputs, &[Name::intern("{eax}"), Name::intern("{ecx}")]);
541547

0 commit comments

Comments
 (0)