diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-02-04 23:46:35 -0800 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-02-04 23:46:35 -0800 |
commit | 1f719b8879580586970338e7c96d65910dca02e8 (patch) | |
tree | 2a0e50f419456feff7262b8afabbbd3d6c2928dd /cpu_dsl.py | |
parent | 9f3816b25a22648eb1cde164dcfc1541f48ace31 (diff) |
Fixed CPI/CPD/CPIR/CPDR in new Z80 core
Diffstat (limited to 'cpu_dsl.py')
-rwxr-xr-x | cpu_dsl.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -418,7 +418,7 @@ def _updateFlagsCImpl(prog, params, rawParams): raise Exception('Unknown flag calc type: ' + calc) if prog.carryFlowDst: if prog.lastOp.op != 'cmp': - output.append('\n\t{dst} = {tmpdst};'.format(dst = prog.resolveParam(prog.lastDst, None, {}), tmpdst = prog.carryFlowDst)) + output.append('\n\t{dst} = {tmpdst};'.format(dst = prog.resolveParam(prog.lastDst, prog.currentScope, {}), tmpdst = prog.carryFlowDst)) prog.carryFlowDst = None if parity: if paritySize > 8: @@ -1363,8 +1363,8 @@ class Program: def getTemp(self, size): if size in self.temp: return ('', self.temp[size]) - self.temp[size] = 'tmp{sz}'.format(sz=size); - return ('\n\tuint{sz}_t tmp{sz};'.format(sz=size), self.temp[size]) + self.temp[size] = 'gen_tmp{sz}__'.format(sz=size); + return ('\n\tuint{sz}_t gen_tmp{sz}__;'.format(sz=size), self.temp[size]) def resolveParam(self, param, parent, fieldVals, allowConstant=True, isdst=False): keepGoing = True |