comparison python/target/arminstructionselector.py @ 316:56e6ff84f646

Fixed burn led demo
author Windel Bouwman
date Sat, 21 Dec 2013 13:13:26 +0100
parents 0615b5308710
children e84047f29c78
comparison
equal deleted inserted replaced
315:084cccaa5deb 316:56e6ff84f646
43 elif isinstance(e, ir.Binop) and e.operation == '|': 43 elif isinstance(e, ir.Binop) and e.operation == '|':
44 a = self.munchExpr(e.a) 44 a = self.munchExpr(e.a)
45 b = self.munchExpr(e.b) 45 b = self.munchExpr(e.b)
46 d = self.newTmp() 46 d = self.newTmp()
47 self.move(d, a) 47 self.move(d, a)
48 self.emit(Orr, dst=[], src=[b, d]) 48 self.emit(Orr, dst=[], src=[d, b])
49 return d 49 return d
50 elif isinstance(e, ir.Binop) and e.operation == '<<': 50 elif isinstance(e, ir.Binop) and e.operation == '<<':
51 a = self.munchExpr(e.a) 51 a = self.munchExpr(e.a)
52 b = self.munchExpr(e.b) 52 b = self.munchExpr(e.b)
53 d = self.newTmp() 53 d = self.newTmp()
54 self.move(d, a) 54 self.move(d, a)
55 self.emit(Lsl, dst=[], src=[b, d]) # TODO: is d a source variable? 55 self.emit(Lsl, dst=[], src=[d, b]) # TODO: is d a source variable?
56 return d 56 return d
57 elif isinstance(e, ir.Binop) and e.operation == '*': 57 elif isinstance(e, ir.Binop) and e.operation == '*':
58 a = self.munchExpr(e.a) 58 a = self.munchExpr(e.a)
59 b = self.munchExpr(e.b) 59 b = self.munchExpr(e.b)
60 d = self.newTmp() 60 d = self.newTmp()