Mercurial > lcfOS
diff python/x86.py @ 173:c1d2b6b9f9a7
Rework into passes
author | Windel Bouwman |
---|---|
date | Fri, 19 Apr 2013 12:42:21 +0200 |
parents | 3eb9b9e2958d |
children | 3eb06f5fb987 |
line wrap: on
line diff
--- a/python/x86.py Thu Apr 04 17:58:37 2013 +0200 +++ b/python/x86.py Fri Apr 19 12:42:21 2013 +0200 @@ -1,5 +1,6 @@ import ppci import ir +import registerallocator class AsmLabel: def __init__(self, lab): @@ -33,7 +34,8 @@ def genBin(self, ir): self.asm = [] # Allocate registers: - ir.registerAllocate(self.regs) + ra = registerallocator.RegisterAllocator() + ra.registerAllocate(ir, self.regs) self.genModule(ir) return self.asm