summaryrefslogtreecommitdiff
path: root/isa/checker.cpp
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-10-17 17:54:53 -0700
committerJulian Blake Kongslie2022-10-17 17:54:53 -0700
commit3f6b5e337b282bd8675a97e048e267e6f90ccec6 (patch)
tree9efeef7b96bab709782fed2ccc40034a88810678 /isa/checker.cpp
parentFaster IO model (until we determine how slow FOCAL needs to be) (diff)
downloadbiggolf-3f6b5e337b282bd8675a97e048e267e6f90ccec6.tar.xz
Clean up address handling and change autoinc to preincrement
Diffstat (limited to '')
-rw-r--r--isa/checker.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/isa/checker.cpp b/isa/checker.cpp
index 7bca5c9..770d9d6 100644
--- a/isa/checker.cpp
+++ b/isa/checker.cpp
@@ -17,8 +17,10 @@ void checker::execute() {
17 17
18 if (inst.need_indirect_load) { 18 if (inst.need_indirect_load) {
19 auto addr = mem.fetch(inst.init_address.value()); 19 auto addr = mem.fetch(inst.init_address.value());
20 if (inst.need_autoinc_store) 20 if (inst.need_autoinc_store) {
21 mem.store(*inst.init_address, (addr + 1) & 07777); 21 addr = (addr + 1) & 07777;
22 mem.store(*inst.init_address, addr);
23 }
22 inst.final_address = addr; 24 inst.final_address = addr;
23 } else { 25 } else {
24 assert(!inst.need_autoinc_store); 26 assert(!inst.need_autoinc_store);