about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2018-03-09 17:23:40 +0100
committerGitHub <noreply@github.com>2018-03-09 17:23:40 +0100
commit6f43586f6e4e8314861b2ddadaba452b829be4c3 (patch)
tree26e40a15fd416950ddae1aaa2a504d5f59d25117
parentaffee860ec9c16a1a7724f78021ea8015a1b6896 (diff)
parentd2882bc0b366b8360fa909911fd25579f8894266 (diff)
downloadmiasm-6f43586f6e4e8314861b2ddadaba452b829be4c3.tar.gz
miasm-6f43586f6e4e8314861b2ddadaba452b829be4c3.zip
Merge pull request #697 from a-vincent/ppc-fix-neg
Fix NEG: write to the destination register
-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