diff options
| -rw-r--r-- | miasm2/arch/x86/arch.py | 6 | ||||
| -rw-r--r-- | miasm2/arch/x86/sem.py | 15 | ||||
| -rw-r--r-- | test/arch/x86/arch.py | 5 |
3 files changed, 26 insertions, 0 deletions
diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py index 71f4409d..98e29b63 100644 --- a/miasm2/arch/x86/arch.py +++ b/miasm2/arch/x86/arch.py @@ -4472,6 +4472,12 @@ addop("packuswb", [bs8(0x0f), bs8(0x67), no_xmm_pref] + addop("packuswb", [bs8(0x0f), bs8(0x67), pref_66] + rmmod(xmm_reg, rm_arg_xmm_m128)) +addop("pmullw", [bs8(0x0f), bs8(0xd5), no_xmm_pref] + + rmmod(mm_reg, rm_arg_mm_m64)) +addop("pmullw", [bs8(0x0f), bs8(0xd5), pref_66] + + rmmod(xmm_reg, rm_arg_xmm_m128)) + + mn_x86.bintree = factor_one_bit(mn_x86.bintree) # mn_x86.bintree = factor_fields_all(mn_x86.bintree) """ diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 57716447..7c990199 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -3398,6 +3398,15 @@ psubw = vec_vertical_instr('-', 16) psubd = vec_vertical_instr('-', 32) psubq = vec_vertical_instr('-', 64) +# Multiplications +# + +# SSE +pmullb = vec_vertical_instr('*', 8) +pmullw = vec_vertical_instr('*', 16) +pmulld = vec_vertical_instr('*', 32) +pmullq = vec_vertical_instr('*', 64) + # Floating-point arithmetic # @@ -4645,6 +4654,12 @@ mnemo_func = {'mov': mov, "psubd": psubd, "psubq": psubq, + # SSE + "pmullb": pmullb, + "pmullw": pmullw, + "pmulld": pmulld, + "pmullq": pmullq, + # Arithmetic (floating-point) # diff --git a/test/arch/x86/arch.py b/test/arch/x86/arch.py index 284bb40c..9f3256f3 100644 --- a/test/arch/x86/arch.py +++ b/test/arch/x86/arch.py @@ -2984,6 +2984,11 @@ reg_tests = [ "0f67cf"), (m32, "00000000 PACKUSWB XMM0, XMM6", "660f67c6"), + + (m32, "00000000 PMULLW MM4, MM2", + "0fd5e2"), + (m32, "00000000 PMULLW XMM0, XMM3", + "660fd5c3"), ] |