about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--miasm2/arch/x86/sem.py10
-rw-r--r--test/arch/x86/arch.py3
2 files changed, 13 insertions, 0 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py
index ea5830e3..df5a07a0 100644
--- a/miasm2/arch/x86/sem.py
+++ b/miasm2/arch/x86/sem.py
@@ -3627,6 +3627,15 @@ def pslld(ir, instr, a, b):
 def psllq(ir, instr, a, b):
     return ps_rl_ll(ir, instr, a, b, "<<",  64)
 
+def pslldq(ir, instr, a, b):
+    assert b.is_int()
+    e = []
+    count = int(b)
+    if count > 15:
+        return [m2_expr.ExprAff(a, m2_expr.ExprInt(0, a.size))], []
+    else:
+        return [m2_expr.ExprAff(a, a << m2_expr.ExprInt(8*count, a.size))], []
+
 
 def iret(ir, instr):
     """IRET implementation
@@ -4361,6 +4370,7 @@ mnemo_func = {'mov': mov,
               "psllw": psllw,
               "pslld": pslld,
               "psllq": psllq,
+              "pslldq": pslldq,
 
               "pmaxub": pmaxub,
               "pmaxuw": pmaxuw,
diff --git a/test/arch/x86/arch.py b/test/arch/x86/arch.py
index 14e25538..b0ea7cb4 100644
--- a/test/arch/x86/arch.py
+++ b/test/arch/x86/arch.py
@@ -2727,6 +2727,9 @@ reg_tests = [
     (m32, "00000000    PSLLW      XMM6, 0x5",
     "660F71F605"),
 
+    (m64, "00000000    PSLLDQ     XMM2, 0x1",
+    "660F73Fa01"),
+
 
     (m32, "00000000    PSLLQ      MM2, QWORD PTR [EDX]",
     "0FF312"),