diff --git a/common/shmem.h b/common/shmem.h index e377e2f..0370a5c 100755 --- a/common/shmem.h +++ b/common/shmem.h @@ -40,6 +40,10 @@ extern SystemSHMEM *shmemGlobalBase; static inline SystemSHMEM *ARM_GetSHMEM(void) { + // shared memory contents are extremely likely to change + // insert a compiler barrier to force the compiler not to assume + // memory values will remain constant in between calls to getSHMEM + asm_v("":::"memory", "cc"); return shmemGlobalBase; }