diff options
Diffstat (limited to '')
| -rw-r--r-- | isa/decode.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/isa/decode.cpp b/isa/decode.cpp index 1d46375..1979982 100644 --- a/isa/decode.cpp +++ b/isa/decode.cpp | |||
| @@ -155,6 +155,25 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit | |||
| 155 | if (skip) | 155 | if (skip) |
| 156 | ctx.next_pc = (ctx.next_pc & 070000) | ((ctx.next_pc + 1) & 007777); | 156 | ctx.next_pc = (ctx.next_pc & 070000) | ((ctx.next_pc + 1) & 007777); |
| 157 | }; | 157 | }; |
| 158 | } else if ((bits & 0401) == 0401) { | ||
| 159 | bool cla = bits & 0200; | ||
| 160 | bool mqa = bits & 0100; | ||
| 161 | bool mql = bits & 0020; | ||
| 162 | bool extended_arith = bits & 0056; | ||
| 163 | inst.need_read_acc = mqa || mql; | ||
| 164 | inst.need_read_mq = mqa; | ||
| 165 | inst.need_write_acc = cla || mqa; | ||
| 166 | inst.need_write_mq = mql; | ||
| 167 | inst.ef = [cla, mqa, mql, extended_arith](auto &ctx) { | ||
| 168 | assert(!extended_arith); | ||
| 169 | if (cla) ctx.acc = 0; | ||
| 170 | auto new_acc = ctx.acc; | ||
| 171 | auto new_mq = ctx.mq; | ||
| 172 | if (mqa) new_acc = ctx.acc.value() | ctx.mq.value(); | ||
| 173 | if (mql) new_mq = ctx.acc.value(); | ||
| 174 | ctx.acc = new_acc; | ||
| 175 | ctx.mq = new_mq; | ||
| 176 | }; | ||
| 158 | } else { | 177 | } else { |
| 159 | assert(false); | 178 | assert(false); |
| 160 | } | 179 | } |
