diff cpu_dsl.py @ 1728:b0e01e64d76d

Implemented RES instruction in new Z80 core
author Michael Pavone <pavone@retrodev.com>
date Sat, 02 Feb 2019 15:35:15 -0800
parents 89ee53a149ea
children 1f0a86f5e055
line wrap: on
line diff
--- a/cpu_dsl.py	Sat Feb 02 15:10:18 2019 -0800
+++ b/cpu_dsl.py	Sat Feb 02 15:35:15 2019 -0800
@@ -745,6 +745,13 @@
 					output.append(_opMap['mov'].generate(otype, prog, shortProc, shortParams, None))
 			else:
 				output.append(opDef.generate(otype, prog, procParams, self.params, flagUpdates))
+				for dstIdx in opDef.outOp:
+					dst = self.params[dstIdx]
+					while dst in prog.meta:
+						dst = prog.meta[dst]
+					if dst in parent.regValues:
+						del parent.regValues[dst]
+					
 		elif self.op in prog.subroutines:
 			procParams = []
 			for param in self.params: