diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-02-06 08:54:09 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-02-06 08:54:09 -0800 |
commit | dfec2468ff106556e035c8e702edf5a7d0e50e68 (patch) | |
tree | 7a1d0f1d7c7d5f8c010bbd5ff5ceb52ba462fb7e /cpu_dsl.py | |
parent | 961bdbea9dbbabff23624ef18280218eae452a3a (diff) |
Fixes to DAA, SCF and CCF to pass ZEXALL in new Z80 core
Diffstat (limited to 'cpu_dsl.py')
-rwxr-xr-x | cpu_dsl.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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) |