From 183e9e7dff4bae8afe2e0165a7f107a3ba0d8c4a Mon Sep 17 00:00:00 2001 From: Ryan Goulden Date: Wed, 23 Sep 2020 12:57:32 -0700 Subject: [PATCH] Fix Pcmp instruction There's a typo in the disassembler. --- plugins/x86/x86_disasm.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/x86/x86_disasm.ml b/plugins/x86/x86_disasm.ml index a696c8db2..57de18dc4 100644 --- a/plugins/x86/x86_disasm.ml +++ b/plugins/x86/x86_disasm.ml @@ -999,9 +999,9 @@ let parse_instr mode mem addr = (Punpck(prefix.mopsize, elemt, order, r, rm, rv), na) | 0x64 | 0x65 | 0x66 | 0x74 | 0x75 | 0x76 as o -> let r, rm, rv, na = parse_modrm_vec None na in - let elet = match o land 0x6 with | 0x4 -> reg8_t | 0x5 -> reg16_t | 0x6 -> reg32_t | _ -> + let elet = match o land 0x0F with | 0x4 -> reg8_t | 0x5 -> reg16_t | 0x6 -> reg32_t | _ -> disfailwith "impossible" in - let bop, bstr = match o land 0x70 with + let bop, bstr = match o land 0xF0 with | 0x70 -> Bil.EQ, "pcmpeq" | 0x60 -> Bil.SLT, "pcmpgt" | _ -> disfailwith "impossible" in