about summary refs log tree commit diff stats
path: root/miasm/arch/x86/arch.py
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-09-11 10:11:12 +0200
committerTheofilos Augoustis <theofilos.augoustis@gmail.com>2025-10-09 15:26:04 +0000
commitc4ca7286a6c9e1f48bf35cd9c2d4c0c80987b15d (patch)
tree06e7b1931d1de60a93df6f442f9cfc12a8cf2abc /miasm/arch/x86/arch.py
parent208469b489bde74acdefe7dd625fab47299b5de4 (diff)
downloadfocaccia-miasm-c4ca7286a6c9e1f48bf35cd9c2d4c0c80987b15d.tar.gz
focaccia-miasm-c4ca7286a6c9e1f48bf35cd9c2d4c0c80987b15d.zip
Add BEXTR instruction
Diffstat (limited to 'miasm/arch/x86/arch.py')
-rw-r--r--miasm/arch/x86/arch.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/miasm/arch/x86/arch.py b/miasm/arch/x86/arch.py
index be7c5975..4a8af629 100644
--- a/miasm/arch/x86/arch.py
+++ b/miasm/arch/x86/arch.py
@@ -948,6 +948,11 @@ class mn_x86(cls_mn):
             self.rex_x.value or self.rex_p.value):
             return False
 
+        if self.vex.value == 0 and (hasattr(self, 'pref_0f')
+                                    or hasattr(self, 'pref_0f38')
+                                    or hasattr(self, 'pref_0f3a')):
+            return False
+
         if self.vex_m.value == 1 and not hasattr(self, 'pref_0f'):
             return False
         if self.vex_m.value == 2 and not hasattr(self, 'pref_0f38'):
@@ -3780,6 +3785,7 @@ addop("fincstp", [bs8(0xd9), bs8(0xf7)])
 
 addop("blsi", [pref_0f38, bs8(0xf3), vex_reg] + rmmod(bs("011"), rm_arg), [vex_reg, rm_arg])
 addop("andn", [pref_0f38, bs8(0xf2), vex_reg] + rmmod(rmreg, rm_arg), [rmreg, vex_reg, rm_arg])
+addop("bextr", [pref_0f38, bs8(0xf7), vex_reg] + rmmod(rmreg, rm_arg), [rmreg, rm_arg, vex_reg])
 
 # addop("finit", [bs8(0x9b), bs8(0xdb), bs8(0xe3)])
 addop("fninit", [bs8(0xdb), bs8(0xe3)])