Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

compiler_barrier

Function compiler_barrier 

Source
pub fn compiler_barrier()
Expand description

Compiler-only barrier: ordinary RAM accesses are not moved across it in either direction, so stores before it land before an MMIO store after it and accesses after it follow an MMIO read before it.

The pinned MIPS-I backend lowers even a single-thread compiler fence to SYNC, which the R3000 lacks, so the target uses an empty asm! with its default memory clobber. Do not add nomem or readonly: both would drop the guarantee.