Skip to content

Commit 1a7736c

Browse files
committed
workaround for rust-lang/rust#92897
1 parent 63545f1 commit 1a7736c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sim/spififo/testbench/src/main.rs

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ use sim_bios::sim_test;
55
extern crate volatile;
66
use volatile::Volatile;
77

8+
// work around a compiler bug in rustc-1.58: https://github.com/rust-lang/rust/issues/92897
9+
#[no_mangle]
10+
pub fn __atomic_load_4(arg: *const usize, _ordering: usize) -> usize {
11+
unsafe { *arg }
12+
}
13+
814
// allocate a global, unsafe static string. You can use this to force writes to RAM.
915
#[used] // This is necessary to keep DBGSTR from being optimized out
1016
static mut DBGSTR: [u32; 8] = [0, 0, 0, 0, 0, 0, 0, 0];

0 commit comments

Comments
 (0)