Barebit / x86reference

X86 Opcode and Instruction Reference
http://ref.x86asm.net
GNU Lesser General Public License v3.0
238 stars 54 forks source link

LFENCE wrong opcode extension #55

Closed Kashio closed 1 year ago

Kashio commented 1 year ago

Right now LFENCE encoded with opcode 0F AE use opcode extension of 5 which according to the intel docs it should only be encoded with:

NP 0F AE E8 LFENCE

Kashio commented 1 year ago

I missed this part:

Specification of the instruction's opcode above indicates a ModR/M byte of E8. For this instruction, the processor ignores the r/m field of the ModR/M byte. Thus, LFENCE is encoded by any opcode of the form 0F AE Ex, where x is in the range 8-F.