Mercurial > lcfOS
diff python/ppci/codegen/codegen.py @ 336:d1ecc493384e
Added spiffy armtoken class for bit fiddeling. Added cool test that checks for build repeatability
author | Windel Bouwman |
---|---|
date | Wed, 19 Feb 2014 22:32:15 +0100 |
parents | 6f4753202b9a |
children | 86b02c98a717 |
line wrap: on
line diff
--- a/python/ppci/codegen/codegen.py Mon Feb 17 20:41:30 2014 +0100 +++ b/python/ppci/codegen/codegen.py Wed Feb 19 22:32:15 2014 +0100 @@ -1,4 +1,4 @@ -from ..ir import Module +from .. import ir from ..irutils import Verifier from target import Target from ppci import CompilerError @@ -23,7 +23,7 @@ """ Generate code for one function into a frame """ self.logger.debug('Generating code for {}'.format(irfunc.name)) # Create a frame for this function: - frame = self.target.FrameClass(irfunc.name) + frame = self.target.FrameClass(ir.label_name(irfunc)) # Canonicalize the intermediate language: canonicalize(irfunc, frame) @@ -48,7 +48,7 @@ def generate(self, ircode, outs): """ Generate code into output stream """ - assert isinstance(ircode, Module) + assert isinstance(ircode, ir.Module) outs.selectSection('code') # Munch program into a bunch of frames. One frame per function.