aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/sc_w.h
blob: fe4fcdcf55ac6e49d4adf6cd671f2791cf63cd3f (plain)
1
2
3
4
5
6
7
require_extension('A');

bool have_reservation = MMU.check_load_reservation(RS1);
MMU.amo_uint32(RS1, [&](uint32_t lhs) { return have_reservation ? RS2 : lhs; });
MMU.yield_load_reservation();

WRITE_RD(!have_reservation);