about summary refs log tree commit diff stats
path: root/miasm2/arch/ppc/sem.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/arch/ppc/sem.py')
-rw-r--r--miasm2/arch/ppc/sem.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/miasm2/arch/ppc/sem.py b/miasm2/arch/ppc/sem.py
index 4923e3a8..741ae24b 100644
--- a/miasm2/arch/ppc/sem.py
+++ b/miasm2/arch/ppc/sem.py
@@ -98,9 +98,7 @@ def mn_do_and(ir, instr, ra, rs, arg2):
     return ret, []
 
 def mn_do_cntlzw(ir, instr, ra, rs):
-    rvalue = ExprCond(rs, ExprInt(31, 32) - ExprOp('bsr', rs), ExprInt(32, 32))
-
-    ret = [ ExprAff(ra, rvalue) ]
+    ret = [ ExprAff(ra, ExprOp('cntleadzeros'), rs) ]
 
     if instr.name[-1] == '.':
         ret += mn_compute_flags(rvalue)