2019-04-18 18:25 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000508Cheat Engine(No Category)public2016-09-29 23:00
Assigned ToDark Byte 
PlatformOSOS VersionWindows 7 x64
Summary0000508: Multiple Auto Assembler errors when encoding CMPXCHG [v6.5.1]
DescriptionThere are several issues related to assembling CMPXCHG instruction operand size (32-bit mode), as well as disassembling its opcode when used with LOCK prefix (32-bit mode):

1. Auto assembler can't assemble `CMPXCHG r8,r8`: error message "Error in line 5 (cmpxchg bl,cl) :This instruction can't be compiled".

2. Auto assembler incorrectly assembles `CMPXCHG r16,r16`: `cmpxchg bx,cx` is assembled to 66.0F.CB `bswap bx`.
2.1. Machine code should be 66.0F.B1.CB.
2.2. Disassembler decodes resulting machine code 66.0F.CB properly as `bswap bx`.

3. Auto assembler incorrectly assembles `CMPXCHG r32,r32`.
3.1. `cmpxchg ebx,ecx` is assembled to 0F.B0.CB `cmpxchg bl,cl`.
3.1.1. Machine code should be 0F.B1.CB.
3.1.2. Disassembler decodes resulting machine code 0F.B0.CB properly as `cmpxchg bl,cl`.

4. Auto assembler can't assemble `CMPXCHG m8,r8`: error message "Error in line 14 (cmpxchg [eax],al) :This instruction can't be compiled".

5. Auto assembler incorrectly assembles `CMPXCHG m16,r16`.
5.1. `cmpxchg [eax],ax` is assembled to 66.0F.00 (incomplete opcode)
5.1.1. Machine code should be 66.0F.B1.00.

6. Auto assembler incorrectly assembles `CMPXCHG m32,r32`.
6.1. `cmpxchg [eax],eax` is assembled to 0F.B0.00 `cmpxchg [eax],al`.
6.1.1. Machine code should be 0F.B1.00.
6.1.2. Disassembler decodes resulting machine code 0F.B0.00 properly as `cmpxchg [eax],al`.
6.2. `cmpxchg [eax],esi` is assembled to 0F.B0.30 `cmpxchg [eax],dh`.
6.2.1. Machine code should be 0F.B1.30.
6.2.2. Disassembler decodes resulting machine code 0F.B0.30 properly as `cmpxchg [eax],dh`.

7. Disassembler disassembles machine code F0.0F.B1.0B as `cmpxchg [ebx],ecx`, which doesn't show the use of LOCK prefix.
Additional Informationglobalalloc(_sxcdmcfbqwareowd,1024)


  //cmpxchg bl,cl

  cmpxchg bx,cx

  cmpxchg ebx,ecx

  //cmpxchg [eax],al
  //cmpxchg [eax],bl
  //cmpxchg [eax],cl
  //cmpxchg [eax],dl

  //cmpxchg [eax],ax

  cmpxchg [eax],eax
  cmpxchg [eax],ebx
  cmpxchg [eax],ecx
  cmpxchg [eax],edx
  cmpxchg [eax],esi
  cmpxchg [eax],edi

  lock cmpxchg [ebx],ecx
TagsNo tags attached.
Attached Files




Dark Byte (developer)

should be fixed now

-Issue History
Date Modified Username Field Change
2016-09-28 22:46 chase0 New Issue
2016-09-29 23:00 Dark Byte Assigned To => Dark Byte
2016-09-29 23:00 Dark Byte Status new => resolved
2016-09-29 23:00 Dark Byte Resolution open => fixed
2016-09-29 23:00 Dark Byte Note Added: 0001105
+Issue History