aboutsummaryrefslogtreecommitdiff
path: root/c_emulator/riscv_platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'c_emulator/riscv_platform.c')
-rw-r--r--c_emulator/riscv_platform.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/c_emulator/riscv_platform.c b/c_emulator/riscv_platform.c
index 3587206..e3c85a8 100644
--- a/c_emulator/riscv_platform.c
+++ b/c_emulator/riscv_platform.c
@@ -39,6 +39,7 @@ unit load_reservation(mach_bits addr)
{
reservation = addr;
reservation_valid = true;
+ /* fprintf(stderr, "reservation <- %0" PRIx64 "\n", reservation); */
return UNIT;
}
@@ -46,10 +47,15 @@ bool speculate_conditional(unit u)
{ return true; }
bool match_reservation(mach_bits addr)
-{ return reservation_valid && reservation == addr; }
+{ /*
+ fprintf(stderr, "reservation(%c): %0" PRIx64 ", key=%0" PRIx64 "\n",
+ reservation_valid ? 'v' : 'i', reservation, addr);
+ */
+ return reservation_valid && reservation == addr;
+}
unit cancel_reservation(unit u)
-{
+{ /* fprintf(stderr, "reservation <- none\n"); */
reservation_valid = false;
return UNIT;
}