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

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

WRITE_RD(!have_reservation);