Skip to content

Potential missing metadata attribute for REX.W prefix and no prefix needed #57

Closed as not planned
@Kashio

Description

@Kashio

There are some instructions where a rex prefix is used to change the instruction but not affect any of the operands, so one cannot use operand types like qp, dqp, vqp, ptp, for exmaple the instruction XRSTOR64 which is encoded as such (Taken from Intel's manual):

NP REX.W + 0F AE /5
XRSTOR64 mem

I think as far as my understanding it's doing the same operation as XRSTOR but saving different register data to the XSAVE AREA so one can argue it could have it's own syntax, even tho right now the XML reference doesn't mention any of these FPU registers besides the normal ST(i), MMX, XMM, etc...
*There're couple more related instructions like this like XSAVE etc..

So I'm wondering if we would like to support this different mnemonic we would need to think of a way to enforce REX.W prefix on a syntax element.
We can't use the pref attribute since it only covers one prefix and REX.W could be several, but we could make pref either a string or a list of strings in the xml for such cases or even a new attribute. If no instructions like this exists that actually does something different besides having 64 in the name of the mnemonic and just fiddling a bit different with some special registers, I think this feature is not a must.

Something else that bothers me more is the disregardance of the NP (no prefix allowed) encoding of alot of the instructions in the manual, if a parser would want to use the XML it would assume prefixes are allowed if no indication is given. I think a proper solution to this would be to add some attribute like np to the syntax element.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions