diff options
| -rw-r--r-- | Bugs | 1 | ||||
| -rw-r--r-- | isa/checker.cpp | 3 | ||||
| -rw-r--r-- | isa/decode.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
| @@ -1 +0,0 @@ | |||
| 1 | IF is used for same-page and zero-page memory accesses (including the first access of an indirect) | ||
diff --git a/isa/checker.cpp b/isa/checker.cpp index 770d9d6..6eaa15f 100644 --- a/isa/checker.cpp +++ b/isa/checker.cpp | |||
| @@ -21,7 +21,8 @@ void checker::execute() { | |||
| 21 | addr = (addr + 1) & 07777; | 21 | addr = (addr + 1) & 07777; |
| 22 | mem.store(*inst.init_address, addr); | 22 | mem.store(*inst.init_address, addr); |
| 23 | } | 23 | } |
| 24 | inst.final_address = addr; | 24 | auto df = ctlregs[DATA_INSTRUCTION_FIELD_BUFFER] >> 3; |
| 25 | inst.final_address = (df << 12) | addr; | ||
| 25 | } else { | 26 | } else { |
| 26 | assert(!inst.need_autoinc_store); | 27 | assert(!inst.need_autoinc_store); |
| 27 | } | 28 | } |
diff --git a/isa/decode.cpp b/isa/decode.cpp index af38c64..f183c1f 100644 --- a/isa/decode.cpp +++ b/isa/decode.cpp | |||
| @@ -373,7 +373,7 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit | |||
| 373 | 373 | ||
| 374 | // Instructions with memory operands may be direct or indirect | 374 | // Instructions with memory operands may be direct or indirect |
| 375 | if (inst.need_exec_load || inst.need_exec_store || inst.possibly_redirects) { | 375 | if (inst.need_exec_load || inst.need_exec_store || inst.possibly_redirects) { |
| 376 | auto addr = (df << 12) | ((bits & 00200) ? (pc & 07600) : 0) | (bits & 00177); | 376 | auto addr = (pc & 070000) | ((bits & 00200) ? (pc & 07600) : 0) | (bits & 00177); |
| 377 | if (bits & 00400) { | 377 | if (bits & 00400) { |
| 378 | inst.need_indirect_load = true; | 378 | inst.need_indirect_load = true; |
| 379 | inst.init_address = addr; | 379 | inst.init_address = addr; |
