diff --git a/riscv/mmu.h b/riscv/mmu.h index ee8ebd15..f1fac1be 100644 --- a/riscv/mmu.h +++ b/riscv/mmu.h @@ -196,10 +196,12 @@ public: // for shadow stack amoswap template T ssamoswap(reg_t addr, reg_t value) { + convert_load_traps_to_store_traps({ store_slow_path(addr, sizeof(T), nullptr, {.ss_access=true}, false, true); auto data = load(addr, {.ss_access=true}); store(addr, value, {.ss_access=true}); return data; + }) } template