summaryrefslogtreecommitdiff
path: root/pp2cc.py
diff options
context:
space:
mode:
Diffstat (limited to 'pp2cc.py')
-rwxr-xr-xpp2cc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp2cc.py b/pp2cc.py
index 2f58f9b..81f6a79 100755
--- a/pp2cc.py
+++ b/pp2cc.py
@@ -1317,7 +1317,8 @@ class Parse(object):
linked_node))
if op == "-":
# negating a value in PP2 is flipping the WORDSIZE-th bit
- value = operand ^ msb
+ value = -operand
+ #(operand ^ (pow(2, self.WORDSIZE) - 1)) + 1
elif op == "~":
# invert all bits
value = operand ^ (pow(2, self.WORDSIZE) - 1)