about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2020-09-23 16:13:13 +0200
committerGitHub <noreply@github.com>2020-09-23 16:13:13 +0200
commit883f886025edcebe7aa18d43bee8bc01a19d354c (patch)
treeba3656c008d17a9aa9a8631d2c282a323c803cea
parent26cf692d33dff9e2b42475d2f735d4891e664c5f (diff)
parent5d54c25dca64df03ee9ea95ecbfc6e4270cdd837 (diff)
downloadmiasm-883f886025edcebe7aa18d43bee8bc01a19d354c.tar.gz
miasm-883f886025edcebe7aa18d43bee8bc01a19d354c.zip
Merge pull request #1284 from IridiumXOR/bugfix
Fix error in semantic implementations
-rw-r--r--miasm/arch/mips32/sem.py2
-rw-r--r--miasm/arch/ppc/sem.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/miasm/arch/mips32/sem.py b/miasm/arch/mips32/sem.py
index 20ef007a..c7d21aee 100644
--- a/miasm/arch/mips32/sem.py
+++ b/miasm/arch/mips32/sem.py
@@ -524,7 +524,7 @@ def mtlo(arg1):
 
 def clz(ir, instr, rs, rd):
     e = []
-    e.append(ExprAssign(rd, ExprOp('cntleadzeros', rs)))
+    e.append(m2_expr.ExprAssign(rd, m2_expr.ExprOp('cntleadzeros', rs)))
     return e, []
 
 def teq(ir, instr, arg1, arg2):
diff --git a/miasm/arch/ppc/sem.py b/miasm/arch/ppc/sem.py
index b05348f7..6d18777c 100644
--- a/miasm/arch/ppc/sem.py
+++ b/miasm/arch/ppc/sem.py
@@ -418,7 +418,7 @@ def mn_mtspr(ir, instr, arg1, arg2):
                  ExprAssign(exception_flags, ExprInt(EXCEPT_SPR_ACCESS, 32)) ], []
 
 def mn_mtsr(ir, instr, sr, rs):
-    srid = sr.arg.arg
+    srid = sr.arg
     return [ ExprAssign(sr_dict[srid], rs) ], []
 
 # TODO
@@ -426,7 +426,7 @@ def mn_mtsr(ir, instr, sr, rs):
 #    return [ ExprAssign(sr_dict[rb[0:3]], rs) ], []
 
 def mn_mfsr(ir, instr, rd, sr):
-    srid = sr.arg.arg
+    srid = sr.arg
     return [ ExprAssign(rd, sr_dict[srid]) ], []
 
 # TODO