diff options
author | Peter Wu <lekensteyn@gmail.com> | 2011-12-09 15:22:48 +0000 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2011-12-09 15:22:48 +0000 |
commit | a2e9eaa837bde1d0a35f8c18b8e31f7e5398f3bc (patch) | |
tree | b8f1f80f1e970cc85cc94140c6b6b455b721770c /pp2cc.py | |
parent | 284c27d4e7b1f6650217522d59c3c7a9ee963f5f (diff) | |
download | pp2cc-a2e9eaa837bde1d0a35f8c18b8e31f7e5398f3bc.tar.gz |
Fix value of logical not (!) expression
Diffstat (limited to 'pp2cc.py')
-rwxr-xr-x | pp2cc.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -568,9 +568,9 @@ class Parse(object): # assume that the status words of the registers describes the value # of the expression lines.append(self.asm.branch_op("BEQ", lbl_false)) - lines.append(self.asm.binary_op("LOAD", reg, 1, label=lbl_true)) + lines.append(self.asm.binary_op("LOAD", reg, 0, label=lbl_true)) lines.append(self.asm.branch_op("BRA", lbl_end)) - lines.append(self.asm.binary_op("LOAD", reg, 0, label=lbl_false)) + lines.append(self.asm.binary_op("LOAD", reg, 1, label=lbl_false)) lines.append(self.asm.noop(lbl_end, register=reg)) elif op == "sizeof": self.logger.error("Sizeof operator 'sizeof' is not supported.", |