diff options
| author | Ajax <commial@gmail.com> | 2018-02-08 13:30:21 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2018-02-09 17:34:35 +0100 |
| commit | a328d6d33ce0b513bf41883380025ce8284f26d3 (patch) | |
| tree | 1f4f3a699b6c19a211e35c036393795b12578b23 /miasm2/arch/x86/sem.py | |
| parent | 615ee255906c0fe036e9dc87ee65ed27e0b6f88d (diff) | |
| download | miasm-a328d6d33ce0b513bf41883380025ce8284f26d3.tar.gz miasm-a328d6d33ce0b513bf41883380025ce8284f26d3.zip | |
Add PACKSSDW instruction
0F 6B /r PACKSSDW mm1, mm2/m64 66 0F 6B /r PACKSSDW xmm1, xmm2/m128
Diffstat (limited to '')
| -rw-r--r-- | miasm2/arch/x86/sem.py | 9 |
1 files changed, 9 insertions, 0 deletions
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, |