about summary refs log tree commit diff stats
path: root/miasm2/arch/ppc/sem.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2018-05-15 11:19:41 +0200
committerGitHub <noreply@github.com>2018-05-15 11:19:41 +0200
commit4dae0d5df51165d2c535f0812761dc6bdadfe88e (patch)
tree392c861b580d89bb8be80856fd8403d1d7c0e2bf /miasm2/arch/ppc/sem.py
parent833524bb7291e82613afba2184b3c0c9801445f5 (diff)
parentde4295331794e81937a5c4073c37808ec63beaa4 (diff)
downloadmiasm-4dae0d5df51165d2c535f0812761dc6bdadfe88e.tar.gz
miasm-4dae0d5df51165d2c535f0812761dc6bdadfe88e.zip
Merge pull request #740 from commial/refactor/bsr-bsf
Refactor/bsr bsf
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)