comparison python/ppci/ir2tree.py @ 356:52492b304adf

Added newline to print
author Windel Bouwman
date Fri, 14 Mar 2014 13:02:16 +0100
parents c2ddc8a36f5e
children c49459768aaa
comparison
equal deleted inserted replaced
355:c2ddc8a36f5e 356:52492b304adf
13 return reg_f 13 return reg_f
14 14
15 @register(ir.Binop) 15 @register(ir.Binop)
16 def binop_to_tree(e): 16 def binop_to_tree(e):
17 names = {'+':'ADDI32', '-':'SUBI32', '|':'ORI32', '<<':'SHLI32', 17 names = {'+':'ADDI32', '-':'SUBI32', '|':'ORI32', '<<':'SHLI32',
18 '*':'MULI32'} 18 '*':'MULI32', '&':'ANDI32', '>>':'SHRI32'}
19 op = names[e.operation] 19 op = names[e.operation]
20 return Tree(op, makeTree(e.a), makeTree(e.b)) 20 return Tree(op, makeTree(e.a), makeTree(e.b))
21 21
22 @register(ir.Temp) 22 @register(ir.Temp)
23 def temp_to_tree(e): 23 def temp_to_tree(e):