comparison python/target.py @ 219:1fa3e0050b49

Expanded ad hoc code generator
author Windel Bouwman
date Sat, 06 Jul 2013 12:38:09 +0200
parents 6c6bf8890d8a
children 83781bd10fdb
comparison
equal deleted inserted replaced
218:494828a7adf1 219:1fa3e0050b49
91 91
92 # map to real operands: 92 # map to real operands:
93 93
94 # look for a suitable instruction 94 # look for a suitable instruction
95 for ic in self.instructions: 95 for ic in self.instructions:
96 if ic.mnemonic == vi.mnemonic and len(ic.operands) == len(vi.operands): 96 if ic.mnemonic.upper() == vi.mnemonic.upper() and len(ic.operands) == len(vi.operands):
97 # Try to map operands to the correct operand types: 97 # Try to map operands to the correct operand types:
98 rops = [roptype.Create(vop) for roptype, vop in zip(ic.operands, vi.operands)] 98 rops = [roptype.Create(vop) for roptype, vop in zip(ic.operands, vi.operands)]
99 99
100 # Check if we succeeded: 100 # Check if we succeeded:
101 optypes = tuple(map(type, rops)) 101 optypes = tuple(map(type, rops))