diff python/ppci/c3/codegenerator.py @ 305:0615b5308710

Updated docs
author Windel Bouwman
date Fri, 06 Dec 2013 13:50:38 +0100
parents be7f60545368
children b145f8e6050b
line wrap: on
line diff
--- a/python/ppci/c3/codegenerator.py	Fri Dec 06 12:45:02 2013 +0100
+++ b/python/ppci/c3/codegenerator.py	Fri Dec 06 13:50:38 2013 +0100
@@ -131,7 +131,7 @@
                 self.genCondCode(expr.a, l2, bbfalse)
                 self.setBlock(l2)
                 self.genCondCode(expr.b, bbtrue, bbfalse)
-            elif expr.op in ['==', '>', '<']:
+            elif expr.op in ['==', '>', '<', '!=', '<=', '>=']:
                 ta = self.genExprCode(expr.a)
                 tb = self.genExprCode(expr.b)
                 self.emit(ir.CJump(ta, expr.op, tb, bbtrue, bbfalse))
@@ -190,7 +190,8 @@
                 raise NotImplementedError("not implemented")
         elif type(expr) is astnodes.FunctionCall:
             args = [self.genExprCode(e) for e in expr.args]
-            fn = self.funcMap[expr.proc]
+            #fn = self.funcMap[expr.proc]
+            fn = expr.proc.name
             return ir.Call(fn, args)
         else:
             raise NotImplementedError('Unknown expr {}'.format(expr))