about summary refs log tree commit diff
path: root/library/stdarch/crates/assert-instr-macro/src
diff options
context:
space:
mode:
authorJoseph Richey <joerichey94@gmail.com>2020-11-04 09:20:13 -0800
committerGitHub <noreply@github.com>2020-11-04 17:20:13 +0000
commite254082775525f44a7caa0cfb8eda283a5e171aa (patch)
treedf487f2bc85f7e979d48b177e37d35601331e920 /library/stdarch/crates/assert-instr-macro/src
parentdd11a4b07befa30df96b13793acaaa89a6ae81c4 (diff)
downloadrust-e254082775525f44a7caa0cfb8eda283a5e171aa.tar.gz
rust-e254082775525f44a7caa0cfb8eda283a5e171aa.zip
Use black_box instead of llvm_asm (#944)
The implementation is the same (where possible), and it unblocks #904

Signed-off-by: Joe Richey <joerichey@google.com>
Diffstat (limited to 'library/stdarch/crates/assert-instr-macro/src')
-rw-r--r--library/stdarch/crates/assert-instr-macro/src/lib.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/library/stdarch/crates/assert-instr-macro/src/lib.rs b/library/stdarch/crates/assert-instr-macro/src/lib.rs
index e9b027edc16..7f2c9902e2d 100644
--- a/library/stdarch/crates/assert-instr-macro/src/lib.rs
+++ b/library/stdarch/crates/assert-instr-macro/src/lib.rs
@@ -143,10 +143,6 @@ pub fn assert_instr(
         fn #assert_name() {
             #to_test
 
-            // Make sure that the shim is not removed by leaking it to unknown
-            // code:
-            unsafe { llvm_asm!("" : : "r"(#shim_name as usize) : "memory" : "volatile") };
-
             ::stdarch_test::assert(#shim_name as usize,
                                    stringify!(#shim_name),
                                    #instr);