projects
/
riscv-isa-sim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
AMOs should always return store faults, not load faults
[riscv-isa-sim.git]
/
riscv
/
insns
/
amoor_d.h
diff --git
a/riscv/insns/amoor_d.h
b/riscv/insns/amoor_d.h
index 5a697172408995031dccafcb8065bf0be1b2306a..de8762745b3768a66be72da7c2bbcfc9d6d32b3f 100644
(file)
--- a/
riscv/insns/amoor_d.h
+++ b/
riscv/insns/amoor_d.h
@@
-1,5
+1,3
@@
require_extension('A');
require_rv64;
-reg_t v = MMU.load_uint64(RS1);
-MMU.store_uint64(RS1, RS2 | v);
-WRITE_RD(v);
+WRITE_RD(MMU.amo_uint64(RS1, [&](uint64_t lhs) { return lhs | RS2; }));