From 1a007daaba7855a227f6187902651f62ccf2030a Mon Sep 17 00:00:00 2001 From: Toshi Piazza Date: Sun, 20 Oct 2019 12:46:24 -0700 Subject: [PATCH] Adds rex.W prefix encoding of J^cc on x86 Previously ghidra could not parse the following bytes: 48 0f 85 05 00 00 00 (jne 0xc); note the 48 rex.W prefix which appears to be a no-op. --- Ghidra/Processors/x86/data/languages/ia.sinc | 1 + 1 file changed, 1 insertion(+) diff --git a/Ghidra/Processors/x86/data/languages/ia.sinc b/Ghidra/Processors/x86/data/languages/ia.sinc index dfc5e07b90..53a55a2fe9 100644 --- a/Ghidra/Processors/x86/data/languages/ia.sinc +++ b/Ghidra/Processors/x86/data/languages/ia.sinc @@ -3400,6 +3400,7 @@ enterFrames: low5 is low5 { tmp:1 = low5; export tmp; } :J^cc rel8 is vexMode=0 & row=7 & cc; rel8 { if (cc) goto rel8; } :J^cc rel16 is vexMode=0 & bit64=0 & opsize=0 & byte=0xf; row=8 & cc; rel16 { if (cc) goto rel16; } :J^cc rel32 is vexMode=0 & opsize=1 & byte=0xf; row=8 & cc; rel32 { if (cc) goto rel32; } +:J^cc rel32 is vexMode=0 & opsize=2 & byte=0xf; row=8 & cc; rel32 { if (cc) goto rel32; } # The following is vexMode=0 & picked up by the line above. rel32 works for both 32 and 64 bit #@ifdef IA64 #:J^cc rel32 is vexMode=0 & addrsize=2 & byte=0xf; row=8 & cc; rel32 { if (cc) goto rel32; }