diff options
Diffstat (limited to 'miasm/arch/x86/sem.py')
| -rw-r--r-- | miasm/arch/x86/sem.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/miasm/arch/x86/sem.py b/miasm/arch/x86/sem.py index 81e45e7e..fb5ee7d5 100644 --- a/miasm/arch/x86/sem.py +++ b/miasm/arch/x86/sem.py @@ -4368,6 +4368,23 @@ def ucomisd(_, instr, src1, src2): return e, [] +def blsi(_, instr, dst, src): + e = [] + + arg1 = m2_expr.ExprInt(0, src.size) + result = arg1 - src + + e += update_flag_zf(result) + e += update_flag_nf(result) + e.append(m2_expr.ExprAssign(of, m2_expr.ExprInt(0, of.size))) + + if src == 0: + e.append(m2_expr.ExprAssign(cf, m2_expr.ExprInt(0, cf.size))) + else: + e.append(m2_expr.ExprAssign(cf, m2_expr.ExprInt(1, cf.size))) + + e.append(m2_expr.ExprAssign(dst, result)) + return e, [] def pshufb(_, instr, dst, src): e = [] @@ -5499,6 +5516,9 @@ mnemo_func = {'mov': mov, "ucomiss": ucomiss, "ucomisd": ucomisd, + # BMI operations + "blsi": blsi, + # # MMX/AVX/SSE operations |