From d622f56211094a913fb2a9ed88a1967c7013a565 Mon Sep 17 00:00:00 2001 From: Andrei Vlad LUTAS Date: Sat, 25 Jul 2020 20:32:06 +0300 Subject: [PATCH] Added SERIAL flag to the SERIALIZE instruction. CLWB memory operand is subject to load access checks, while CLDEMOTE does not access memory at all (similar to PREFETCH). --- bddisasm/include/instructions.h | 6 +++--- inc/version.h | 2 +- isagenerator/instructions/table_0F.dat | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bddisasm/include/instructions.h b/bddisasm/include/instructions.h index 9fbc072..263fa83 100644 --- a/bddisasm/include/instructions.h +++ b/bddisasm/include/instructions.h @@ -1505,7 +1505,7 @@ const ND_INSTRUCTION gInstructions[2557] = 0, 0, 0, - OP(ND_OPT_M, ND_OPS_b, 0, ND_OPA_W, 0, 0), + OP(ND_OPT_M, ND_OPS_b, 0, ND_OPA_R, 0, 0), }, // Pos:111 Instruction:"CLEVICT0 M?" Encoding:"vex m:1 p:3 0xAE /7:mem"/"M" @@ -1613,7 +1613,7 @@ const ND_INSTRUCTION gInstructions[2557] = 0, 0, 0, - OP(ND_OPT_M, ND_OPS_b, 0, ND_OPA_W, 0, 0), + OP(ND_OPT_M, ND_OPS_b, 0, ND_OPA_R, 0, 0), }, // Pos:120 Instruction:"CLZERO" Encoding:"0x0F 0x01 /0xFC"/"" @@ -16108,7 +16108,7 @@ const ND_INSTRUCTION gInstructions[2557] = { ND_INS_SERIALIZE, ND_CAT_MISC, ND_SET_SERIALIZE, 697, ND_MOD_ANY, - 0, 0, ND_OPS_CNT(0, 0), 0, 0, 0, 0, 0, 0, ND_FLAG_MODRM, ND_CFF_SERIALIZE, + 0, 0, ND_OPS_CNT(0, 0), 0, 0, 0, 0, 0, 0, ND_FLAG_SERIAL|ND_FLAG_MODRM, ND_CFF_SERIALIZE, 0, 0, 0, diff --git a/inc/version.h b/inc/version.h index 5000e95..ecd870f 100644 --- a/inc/version.h +++ b/inc/version.h @@ -7,6 +7,6 @@ #define DISASM_VERSION_MAJOR 1 #define DISASM_VERSION_MINOR 26 -#define DISASM_VERSION_REVISION 2 +#define DISASM_VERSION_REVISION 3 #endif // _DISASM_VER_H_ diff --git a/isagenerator/instructions/table_0F.dat b/isagenerator/instructions/table_0F.dat index 8c1d86e..9f01f70 100644 --- a/isagenerator/instructions/table_0F.dat +++ b/isagenerator/instructions/table_0F.dat @@ -36,7 +36,7 @@ VMFUNC nil nil [ NP 0x0F 0x01 /0 XEND nil nil [ NP 0x0F 0x01 /0xD5] s:TSX, t:COND_BR, i:RTM XTEST nil Fv [ NP 0x0F 0x01 /0xD6] s:TSX, t:LOGIC, w:W, i:RTM, f:CF=0|PF=0|AF=0|ZF=m|SF=0|OF=0 ENCLU nil EAX,RBX,RCX,RDX [ NP 0x0F 0x01 /0xD7] s:SGX, t:SGX, w:R|CRW|CRW|CRW, m:USER|NOSMM|NOTSX -SERIALIZE nil nil [ NP 0x0F 0x01 /0xE8] s:SERIALIZE, t:MISC +SERIALIZE nil nil [ NP 0x0F 0x01 /0xE8] s:SERIALIZE, t:MISC, a:SERIAL XSUSLDTRK nil nil [ 0xF2 0x0F 0x01 /0xE8] s:TSXLDTRK, t:MISC XRESLDTRK nil nil [ 0xF2 0x0F 0x01 /0xE9] s:TSXLDTRK, t:MISC SAVEPREVSSP nil SHSS,SSP [ 0xF3 0x0F 0x01 /0xEA] s:CET_SS, t:CET, w:RW|R, f:CF=t @@ -155,7 +155,7 @@ BNDMK rBl,My nil [ 0xF3 0x0F 0x1B /r NOP Gv,Ev nil [ 0xF3 0x0F 0x1B /r:reg] s:PPRO, t:WIDENOP, w:R|R BNDCN rBl,Ey nil [ 0xF2 0x0F 0x1B /r] s:MPX, t:MPX, w:R|R, a:AG|F64|I67 -CLDEMOTE Mb nil [ NP 0x0F 0x1C /0:mem] s:CLDEMOTE, t:CLDEMOTE, w:W +CLDEMOTE Mb nil [ NP 0x0F 0x1C /0:mem] s:CLDEMOTE, t:CLDEMOTE, w:P NOP Ev,Gv nil [ 0x66 0x0F 0x1C /0:mem] s:PPRO, t:WIDENOP, w:R|R NOP Ev,Gv nil [ 0xF3 0x0F 0x1C /0:mem] s:PPRO, t:WIDENOP, w:R|R NOP Ev,Gv nil [ 0xF2 0x0F 0x1C /0:mem] s:PPRO, t:WIDENOP, w:R|R @@ -477,7 +477,7 @@ XRSTOR M? EDX,EAX,XCR0,BANK [ NP 0x0F 0xAE /5 XRSTOR64 M? EDX,EAX,XCR0,BANK [ rexw NP 0x0F 0xAE /5:mem] s:XSAVE, t:XSAVE, c:XRSTOR, w:R|R|R|R|W XSAVEOPT M? EDX,EAX,XCR0,BANK [ NP 0x0F 0xAE /6:mem] s:XSAVE, t:XSAVE, c:XSAVEOPT, w:W|R|R|R|R XSAVEOPT64 M? EDX,EAX,XCR0,BANK [ rexw NP 0x0F 0xAE /6:mem] s:XSAVE, t:XSAVE, c:XSAVEOPT, w:W|R|R|R|R -CLWB Mb nil [ 0x66 0x0F 0xAE /6:mem] s:CLWB, t:MISC, w:W +CLWB Mb nil [ 0x66 0x0F 0xAE /6:mem] s:CLWB, t:MISC, w:R CLRSSBSY Mq SSP [ 0xF3 0x0F 0xAE /6:mem] s:CET_SS, t:CET, a:SHS, w:RW|RW, f:CF=m|ZF=0|PF=0|AF=0|OF=0|SF=0 CLFLUSH Mb nil [ NP 0x0F 0xAE /7:mem] s:CLFSH, t:MISC, w:R CLFLUSHOPT Mb nil [ 0x66 0x0F 0xAE /7:mem] s:CLFSHOPT, t:MISC, w:R