about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAymeric Vincent <aymeric.vincent@cea.fr>2018-03-09 16:46:47 +0100
committerAymeric Vincent <aymeric.vincent@cea.fr>2018-03-09 16:49:39 +0100
commitd2882bc0b366b8360fa909911fd25579f8894266 (patch)
tree26e40a15fd416950ddae1aaa2a504d5f59d25117
parentaffee860ec9c16a1a7724f78021ea8015a1b6896 (diff)
downloadmiasm-d2882bc0b366b8360fa909911fd25579f8894266.tar.gz
miasm-d2882bc0b366b8360fa909911fd25579f8894266.zip
Fix NEG: write to the destination register
From @commial, thanks.
-rw-r--r--miasm2/arch/ppc/sem.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/miasm2/arch/ppc/sem.py b/miasm2/arch/ppc/sem.py
index 69e315d4..4923e3a8 100644
--- a/miasm2/arch/ppc/sem.py
+++ b/miasm2/arch/ppc/sem.py
@@ -428,7 +428,7 @@ def mn_do_nand(ir, instr, ra, rs, rb):
 
 def mn_do_neg(ir, instr, rd, ra):
     rvalue = -ra
-    ret = [ ExprAff(ra, rvalue) ]
+    ret = [ ExprAff(rd, rvalue) ]
     has_o = False
 
     over_expr = None