From dfec2468ff106556e035c8e702edf5a7d0e50e68 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 6 Feb 2019 08:54:09 -0800 Subject: Fixes to DAA, SCF and CCF to pass ZEXALL in new Z80 core --- cpu_dsl.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cpu_dsl.py') diff --git a/cpu_dsl.py b/cpu_dsl.py index 928681b..070efbe 100755 --- a/cpu_dsl.py +++ b/cpu_dsl.py @@ -468,10 +468,11 @@ def _cmpCImpl(prog, params, rawParams, flagUpdates): if needsCarry: size *= 2 tmpvar = 'cmp_tmp{sz}__'.format(sz=size) - prog.carryFlowDst = tmpvar - prog.lastA = params[1] - prog.lastB = params[0] - prog.lastBFlow = params[0] + if flagUpdates: + prog.carryFlowDst = tmpvar + prog.lastA = params[1] + prog.lastB = params[0] + prog.lastBFlow = params[0] scope = prog.getRootScope() if not scope.resolveLocal(tmpvar): scope.addLocal(tmpvar, size) -- cgit v1.2.3