about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAymeric Vincent <aymeric.vincent@cea.fr>2018-03-15 09:43:19 +0100
committerAymeric Vincent <aymeric.vincent@cea.fr>2018-03-15 09:57:34 +0100
commit2e2dc2a14de6f0e181fa730cc1eb959b44ca5f75 (patch)
tree9bbc5a80ce59f49e1a20a46dc269066e45d347e4
parentc1c36aa2f72b4c19dffaccba5a251843f1b48c9a (diff)
downloadmiasm-2e2dc2a14de6f0e181fa730cc1eb959b44ca5f75.tar.gz
miasm-2e2dc2a14de6f0e181fa730cc1eb959b44ca5f75.zip
Fix the 011111 group of store instructions wrt r0
The 011111 group of store instructions is split in two sets: one in
which r0 has value 0, and another where r0 mustn't be used.
A "typographical inversion" interverted the two sets, leading to
a semantics error when r0 is used with the subset which expects a
hardcoded 0 value.

Found by @commial, thanks!
-rw-r--r--miasm2/arch/ppc/arch.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/miasm2/arch/ppc/arch.py b/miasm2/arch/ppc/arch.py
index 87147f1c..672c0c6a 100644
--- a/miasm2/arch/ppc/arch.py
+++ b/miasm2/arch/ppc/arch.py
@@ -653,8 +653,9 @@ ppcop("slogic2", [bs_name(l=6, name=slogic2_name), rs, ra, u16imm],
       [ra, rs, u16imm])
 
 ppcop("store1", [bs('011111'), rs, ra_or_0, rb,
-                 bs_name(l=11, name=store1_name_u)])
-ppcop("store1u", [bs('011111'), rs, ra, rb, bs_name(l=11, name=store1_name)])
+                 bs_name(l=11, name=store1_name)])
+ppcop("store1u", [bs('011111'), rs, ra, rb,
+                  bs_name(l=11, name=store1_name_u)])
 
 ppcop("store2", [bs('10'), bs_name(l=4, name=store2_name), rs,
                     ra_noarg, dregimm])