Skip to content

Commit

Permalink
workaround for rust-lang/rust#92897
Browse files Browse the repository at this point in the history
  • Loading branch information
bunnie committed Jan 14, 2022
1 parent 63545f1 commit 1a7736c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sim/spififo/testbench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ use sim_bios::sim_test;
extern crate volatile;
use volatile::Volatile;

// work around a compiler bug in rustc-1.58: https://github.com/rust-lang/rust/issues/92897
#[no_mangle]
pub fn __atomic_load_4(arg: *const usize, _ordering: usize) -> usize {
unsafe { *arg }
}

// allocate a global, unsafe static string. You can use this to force writes to RAM.
#[used] // This is necessary to keep DBGSTR from being optimized out
static mut DBGSTR: [u32; 8] = [0, 0, 0, 0, 0, 0, 0, 0];
Expand Down

0 comments on commit 1a7736c

Please sign in to comment.