diff options
author | Peter Wu <lekensteyn@gmail.com> | 2011-12-07 09:55:18 +0000 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2011-12-07 09:55:18 +0000 |
commit | 14c7b8af3a04f739ebd192b9efd22cd5422525c1 (patch) | |
tree | 8b7b92913d73bdf23452f6874bb20dd5e956c392 | |
parent | 97d67c978678ea6009212ec2b868ebc7bc543585 (diff) | |
download | pp2cc-14c7b8af3a04f739ebd192b9efd22cd5422525c1.tar.gz |
Fix the result of a >> expression
-rwxr-xr-x | pp2cc.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -444,6 +444,10 @@ class Parse(object): # we can safe another NOOP by adding the label here lines.append(self.asm.branch_op("BGT", lbl_shift, label=lbl_shift_end)) + # expression rely on the fact that the result of an expression is + # available in the last register. Without the below line, it'd look + # in reg_shift + lines.append(self.asm.binary_op("LOAD", reg_number, reg_number)) else: shift_bits = self.convertStrToInteger(operand_shift) if shift_bits <= 0: |