copy over fake OP_FETCH_FAILED and instruction on instr_fault
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 12 Dec 2021 18:56:48 +0000 (18:56 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 12 Dec 2021 18:56:48 +0000 (18:56 +0000)
src/openpower/decoder/power_decoder2.py

index 271fb971bd4d58f70b21f2199beb3e2bc3654f76..3517dafa80e67dbb00d4645a654ba9c6fbfa7f77 100644 (file)
@@ -1509,9 +1509,12 @@ class PowerDecode2(PowerDecodeSubset):
         # absolute top priority: check for an instruction failed
         with m.If(self.instr_fault):
             comb += self.e.eq(0)  # reset eeeeeverything
+            comb += self.do_copy("insn", self.dec.opcode_in, True)
             comb += self.do_copy("insn_type", MicrOp.OP_FETCH_FAILED, True)
             comb += self.do_copy("fn_unit", Function.MMU, True)
             comb += self.do_copy("nia", self.state.pc, True)  # PC
+            # special override on internal_op, due to being a "fake" op
+            comb += self.dec.op.internal_op.eq(MicrOp.OP_FETCH_FAILED)
 
         # LD/ST exceptions.  TestIssuer copies the exception info at us
         # after a failed LD/ST.