diff options
Diffstat (limited to '')
| -rw-r--r-- | miasm2/arch/x86/arch.py | 4 | ||||
| -rw-r--r-- | miasm2/arch/x86/sem.py | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py index 572c2378..71f4409d 100644 --- a/miasm2/arch/x86/arch.py +++ b/miasm2/arch/x86/arch.py @@ -4462,6 +4462,10 @@ addop("packsswb", [bs8(0x0f), bs8(0x63), no_xmm_pref] + rmmod(mm_reg, rm_arg_mm_m64)) addop("packsswb", [bs8(0x0f), bs8(0x63), pref_66] + rmmod(xmm_reg, rm_arg_xmm_m128)) +addop("packssdw", [bs8(0x0f), bs8(0x6b), no_xmm_pref] + + rmmod(mm_reg, rm_arg_mm_m64)) +addop("packssdw", [bs8(0x0f), bs8(0x6b), pref_66] + + rmmod(xmm_reg, rm_arg_xmm_m128)) addop("packuswb", [bs8(0x0f), bs8(0x67), no_xmm_pref] + rmmod(mm_reg, rm_arg_mm_m64)) diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 6dcc76af..57716447 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -4245,6 +4245,14 @@ def packsswb(ir, instr, dst, src): return [m2_expr.ExprAff(dst, m2_expr.ExprCompose(*out))], [] +def packssdw(ir, instr, dst, src): + out = [] + for source in [dst, src]: + for start in xrange(0, dst.size, 32): + out.append(_signed_saturation(source[start:start + 32], 16)) + return [m2_expr.ExprAff(dst, m2_expr.ExprCompose(*out))], [] + + def packuswb(ir, instr, dst, src): out = [] for source in [dst, src]: @@ -4751,6 +4759,7 @@ mnemo_func = {'mov': mov, "pmovmskb": pmovmskb, "packsswb": packsswb, + "packssdw": packssdw, "packuswb": packuswb, "smsw": smsw, |