Skip to content

Commit

Permalink
Bug solved: SSE variant of MOVSD incorrectly decoded as REPNE MOVSD (c…
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDerumigny authored and aquynh committed Feb 21, 2020
1 parent 2596f3b commit e7d2715
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/X86/X86Mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -3099,7 +3099,6 @@ static bool valid_repne(cs_struct *h, unsigned int opcode)

case X86_INS_MOVSB:
case X86_INS_MOVSW:
case X86_INS_MOVSD:
case X86_INS_MOVSQ:

case X86_INS_LODSB:
Expand All @@ -3122,6 +3121,11 @@ static bool valid_repne(cs_struct *h, unsigned int opcode)

return true;

case X86_INS_MOVSD:
if (opcode == X86_MOVSW) // REP MOVSB
return true;
return false;

case X86_INS_CMPSD:
if (opcode == X86_CMPSL) // REP CMPSD
return true;
Expand Down

0 comments on commit e7d2715

Please sign in to comment.