We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87666e5 commit 4dc4e9fCopy full SHA for 4dc4e9f
library/core/src/hint.rs
@@ -122,7 +122,7 @@ pub fn black_box<T>(mut dummy: T) -> T {
122
// SAFETY: the inline assembly is a no-op.
123
unsafe {
124
// FIXME: Cannot use `asm!` because it doesn't support MIPS and other architectures.
125
- llvm_asm!("" : : "r"(&mut dummy));
+ llvm_asm!("" : : "r"(&mut dummy) : "memory" : "volatile");
126
}
127
128
dummy
0 commit comments