x86reference icon indicating copy to clipboard operation
x86reference copied to clipboard

instructions 0F AE has mod attribute on entry level and not on syntax level in the xml referefence

Open Kashio opened this issue 2 years ago • 1 comments

If we want it to be structured and not random where at times the mod attribute can be on entry level (most if not all are on the syntax level) then this should be moved to be an attribute of the syntax tag.

Kashio avatar Apr 25 '23 16:04 Kashio

Intel abused the mod field because it wasn't meant to be used this way originally. The mod actually sometimes works also like an opcode extension because it doesn't only switch r/m operand but changes the meaning of the primary opcode. However, the syntax level in the XML reference means the primary opcode maps to a specific instruction but it can have more syntaxes.

For example in case of 0FAE /5 LFENCE vs. 0FAE /5 XRSTOR, the whole entry must be indicated as depending on mod because the mod completely changes the meaning of the opcode, not just the instruction syntax.

So the use of entry@mod vs. syntax@mod is not arbitrary in reference. They are used for different purposes. (Of course, there can be bugs but 0FAE looks correct in this regard.)

BarebitOpenSource avatar Dec 22 '23 10:12 BarebitOpenSource

I should document this somewhere.

BarebitOpenSource avatar May 13 '24 12:05 BarebitOpenSource

Moved to https://github.com/mazegen/x86reference/wiki/Quick-XML-notes

BarebitOpenSource avatar Jun 05 '24 15:06 BarebitOpenSource