Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def execute_mfc0( s, inst ):
# CP0 register: mngr2proc
if inst.rd == 1:
bits = s.mngr2proc_queue.popleft()
s.mngr2proc_str = str(bits)
s.R[inst.rt] = bits
# CPO register: coreid
elif inst.rd == 17:
s.R[inst.rt] = 0
else:
raise PisaSemantics.IllegalInstruction(
"Unrecognized CPO register ({}) for mfc0 at PC={}" \
.format(inst.rd.uint(),s.PC) )
s.PC += 4