Finally fix moves from/to CR/DR registers

This commit is contained in:
Alexis Engelke
2019-11-02 21:48:36 +01:00
parent 96ba1a1166
commit 92e104d411
2 changed files with 9 additions and 9 deletions

View File

@@ -212,7 +212,7 @@ decode_modrm(const uint8_t* buffer, int len, DecodeMode mode, FdInstr* instr,
out_o2->reg = reg_idx; out_o2->reg = reg_idx;
} }
if (mod == 3) if (mod == 3 || instr->type == FDI_MOV_CR || instr->type == FDI_MOV_DR)
{ {
uint8_t reg_idx = rm; uint8_t reg_idx = rm;
#if defined(ARCH_X86_64) #if defined(ARCH_X86_64)

View File

@@ -334,14 +334,14 @@ ff/6 M GP - - - PUSH DEF64
0f18/2 M GP8 - - - PREFETCH1 0f18/2 M GP8 - - - PREFETCH1
0f18/3 M GP8 - - - PREFETCH2 0f18/3 M GP8 - - - PREFETCH2
0f1f M GP - - - NOP 0f1f M GP - - - NOP
0f20 MR GP32 CR - - MOV_C2G ONLY32 0f20 MR GP32 CR - - MOV_CR ONLY32
0f20 MR GP64 CR - - MOV_C2G ONLY64 DEF64 0f20 MR GP64 CR - - MOV_CR ONLY64 DEF64
0f21 MR GP32 DR - - MOV_D2G ONLY32 0f21 MR GP32 DR - - MOV_DR ONLY32
0f21 MR GP64 DR - - MOV_D2G ONLY64 DEF64 0f21 MR GP64 DR - - MOV_DR ONLY64 DEF64
0f22 RM CR GP32 - - MOV_G2C ONLY32 0f22 RM CR GP32 - - MOV_CR ONLY32
0f22 RM CR GP64 - - MOV_G2C ONLY64 DEF64 0f22 RM CR GP64 - - MOV_CR ONLY64 DEF64
0f23 RM DR GP32 - - MOV_G2D ONLY32 0f23 RM DR GP32 - - MOV_DR ONLY32
0f23 RM DR GP64 - - MOV_G2D ONLY64 DEF64 0f23 RM DR GP64 - - MOV_DR ONLY64 DEF64
0f30 NP - - - - WRMSR 0f30 NP - - - - WRMSR
0f31 NP - - - - RDTSC 0f31 NP - - - - RDTSC
0f32 NP - - - - RDMSR 0f32 NP - - - - RDMSR