diff options
Diffstat (limited to 'miasm2/arch')
| -rw-r--r-- | miasm2/arch/x86/arch.py | 8 | ||||
| -rw-r--r-- | miasm2/arch/x86/sem.py | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py index 36666ea2..75fa2986 100644 --- a/miasm2/arch/x86/arch.py +++ b/miasm2/arch/x86/arch.py @@ -3879,6 +3879,14 @@ addop("pand", [bs8(0x0f), bs8(0xdb), no_xmm_pref] + addop("pand", [bs8(0x0f), bs8(0xdb), pref_66] + rmmod(xmm_reg, rm_arg_xmm), [xmm_reg, rm_arg_xmm]) +## ANDN +# MMX +addop("pandn", [bs8(0x0f), bs8(0xdf), no_xmm_pref] + + rmmod(mm_reg, rm_arg_mm), [mm_reg, rm_arg_mm]) +# SSE +addop("pandn", [bs8(0x0f), bs8(0xdf), pref_66] + + rmmod(xmm_reg, rm_arg_xmm), [xmm_reg, rm_arg_xmm]) + ## OR # MMX addop("por", [bs8(0x0f), bs8(0xeb), no_xmm_pref] + diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 62b6b6b3..5fb7e34d 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -3248,6 +3248,13 @@ def pand(ir, instr, a, b): e.append(m2_expr.ExprAff(a, c)) return e, [] +def pandn(ir, instr, a, b): + e = [] + c = (a ^ a.mask) & b + # No flag affected + e.append(m2_expr.ExprAff(a, c)) + return e, [] + def por(ir, instr, a, b): e = [] @@ -3861,6 +3868,7 @@ mnemo_func = {'mov': mov, ### "pand": pand, + "pandn": pandn, "por": por, "rdmsr": rdmsr, |