summaryrefslogtreecommitdiff
path: root/isa/decode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'isa/decode.cpp')
-rw-r--r--isa/decode.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/isa/decode.cpp b/isa/decode.cpp
index cb6a694..03e2225 100644
--- a/isa/decode.cpp
+++ b/isa/decode.cpp
@@ -252,7 +252,7 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit
252 252
253 // Instructions with memory operands may be direct or indirect 253 // Instructions with memory operands may be direct or indirect
254 if (inst.need_exec_load || inst.need_exec_store || inst.possibly_redirects) { 254 if (inst.need_exec_load || inst.need_exec_store || inst.possibly_redirects) {
255 auto addr = (df << 12) | ((bits & 00200) ? (inst.next_pc & 07600) : 0) | (bits & 00177); 255 auto addr = (df << 12) | ((bits & 00200) ? (pc & 07600) : 0) | (bits & 00177);
256 if (bits & 00400) { 256 if (bits & 00400) {
257 inst.need_indirect_load = true; 257 inst.need_indirect_load = true;
258 inst.init_address = addr; 258 inst.init_address = addr;
@@ -262,7 +262,7 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit
262 } 262 }
263 263
264 // Non-jump indirect memory operands may be autoincrementing depending on operand bits 264 // Non-jump indirect memory operands may be autoincrementing depending on operand bits
265 if (!inst.possibly_redirects && inst.need_indirect_load && ((bits & 00170) == 00010)) 265 if (!inst.possibly_redirects && inst.need_indirect_load && ((inst.init_address.value() & 07770) == 00010))
266 inst.need_autoinc_store = true; 266 inst.need_autoinc_store = true;
267 267
268 return inst; 268 return inst;