comparison python/x86.py @ 178:c694ec551f34

Added lex yacc test scripts
author Windel Bouwman
date Sat, 04 May 2013 12:07:17 +0200
parents 460db5669efa
children 25a0753da4cf
comparison
equal deleted inserted replaced
177:460db5669efa 178:c694ec551f34
55 for bb in mod.BasicBlocks: 55 for bb in mod.BasicBlocks:
56 print(bb) 56 print(bb)
57 dag = Dag(bb) 57 dag = Dag(bb)
58 print(dag.mapping) 58 print(dag.mapping)
59 bb.dag = dag 59 bb.dag = dag
60
61 # Machine code interface:
62 class MachineOperand:
63 """ Single machine operand """
64 pass
65
66 class MachineInstruction:
67 def __init__(self, opcode):
68 self.opcode = opcode
69 self.operands = []
70
60 71
61 # x86 specific: 72 # x86 specific:
62 class AsmLabel: 73 class AsmLabel:
63 def __init__(self, lab): 74 def __init__(self, lab):
64 self.lab = lab 75 self.lab = lab