instrs: Fix mandatory prefixes of CMPXCHG8B/16B

This commit is contained in:
Alexis Engelke
2021-01-23 14:30:45 +01:00
parent 7919b8115a
commit ab63a3c921
2 changed files with 7 additions and 1 deletions

View File

@@ -464,7 +464,7 @@ F3.0fbd RM GP GP - - LZCNT USE66
0fc0 MR GP GP - - XADD SIZE_8 LOCK 0fc0 MR GP GP - - XADD SIZE_8 LOCK
0fc1 MR GP GP - - XADD LOCK 0fc1 MR GP GP - - XADD LOCK
NP.0fc3/m MR MEM GP - - MOVNTI NP.0fc3/m MR MEM GP - - MOVNTI
NP.0fc7/1m M MEMZ - - - CMPXCHGD LOCK INSTR_WIDTH 0fc7/1m M MEMZ - - - CMPXCHGD LOCK IGN66 INSTR_WIDTH
0fc8+ O GP - - - BSWAP 0fc8+ O GP - - - BSWAP
0fff RM GP GP - - UD0 0fff RM GP GP - - UD0
# #

View File

@@ -83,7 +83,13 @@ main(int argc, char** argv)
TEST64("\x66\x90", "nop"); TEST64("\x66\x90", "nop");
TEST32("\x0f\xc7\x0f", "cmpxchg8b qword ptr [edi]"); TEST32("\x0f\xc7\x0f", "cmpxchg8b qword ptr [edi]");
TEST64("\x0f\xc7\x0f", "cmpxchg8b qword ptr [rdi]"); TEST64("\x0f\xc7\x0f", "cmpxchg8b qword ptr [rdi]");
TEST32("\x66\x0f\xc7\x0f", "cmpxchg8b qword ptr [edi]"); // 66h is ignored
TEST64("\x66\x0f\xc7\x0f", "cmpxchg8b qword ptr [rdi]"); // 66h is ignored
TEST64("\x48\x0f\xc7\x0f", "cmpxchg16b xmmword ptr [rdi]"); TEST64("\x48\x0f\xc7\x0f", "cmpxchg16b xmmword ptr [rdi]");
TEST32("\xf2\x0f\xc7\x0f", "cmpxchg8b qword ptr [edi]");
TEST64("\xf2\x0f\xc7\x0f", "cmpxchg8b qword ptr [rdi]");
TEST32("\xf3\x0f\xc7\x0f", "cmpxchg8b qword ptr [edi]");
TEST64("\xf3\x0f\xc7\x0f", "cmpxchg8b qword ptr [rdi]");
TEST("\x66", "PARTIAL"); TEST("\x66", "PARTIAL");
TEST("\xf0", "PARTIAL"); TEST("\xf0", "PARTIAL");
TEST("\x0f", "PARTIAL"); TEST("\x0f", "PARTIAL");