From 950bb44e32c5bed4dba7ef77949db86b4d36c5ca Mon Sep 17 00:00:00 2001 From: Ajax Date: Fri, 9 Feb 2018 10:09:21 +0100 Subject: Add PMAXSW instruction 0F EE /r PMAXSW mm1, mm2/m64 66 0F EE /r PMAXSW xmm1, xmm2/m128 --- miasm2/arch/x86/arch.py | 4 ++++ miasm2/arch/x86/sem.py | 2 ++ 2 files changed, 6 insertions(+) (limited to 'miasm2') diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py index 1b181f6f..aaf877fe 100644 --- a/miasm2/arch/x86/arch.py +++ b/miasm2/arch/x86/arch.py @@ -4306,6 +4306,10 @@ addop("pmaxuw", [bs8(0x0f), bs8(0x38), bs8(0x3e), pref_66] + addop("pmaxud", [bs8(0x0f), bs8(0x38), bs8(0x3f), pref_66] + rmmod(xmm_reg, rm_arg_xmm)) +addop("pmaxsw", [bs8(0x0f), bs8(0xee), no_xmm_pref] + + rmmod(mm_reg, rm_arg_mm_m64)) +addop("pmaxsw", [bs8(0x0f), bs8(0xee), pref_66] + + rmmod(xmm_reg, rm_arg_xmm_m128)) addop("pminub", [bs8(0x0f), bs8(0xda), no_xmm_pref] + rmmod(mm_reg, rm_arg_mm)) diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 0bb534e5..5beedede 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -3467,6 +3467,7 @@ pminud = vec_vertical_instr('min', 32, lambda x: _min_max(x, signed=False)) pmaxub = vec_vertical_instr('max', 8, lambda x: _min_max(x, signed=False)) pmaxuw = vec_vertical_instr('max', 16, lambda x: _min_max(x, signed=False)) pmaxud = vec_vertical_instr('max', 32, lambda x: _min_max(x, signed=False)) +pmaxsw = vec_vertical_instr('max', 16, lambda x: _min_max(x, signed=True)) # Floating-point arithmetic # @@ -4783,6 +4784,7 @@ mnemo_func = {'mov': mov, "pmaxub": pmaxub, "pmaxuw": pmaxuw, "pmaxud": pmaxud, + "pmaxsw": pmaxsw, "pminub": pminub, "pminuw": pminuw, -- cgit 1.4.1