Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: What is the meaning of the datafiles PATTERN content? #267

Open
lancejpollard opened this issue Jan 30, 2021 · 0 comments
Open
Labels

Comments

@lancejpollard
Copy link

lancejpollard commented Jan 30, 2021

Take for instance these examples:

0xDF MOD[0b11] MOD=3 REG[0b001] RM[nnn]
0xDD MOD[mm] MOD!=3 REG[0b110] RM[nnn] mode16 66_prefix MODRM()
EVV 0x52 VF2 V0F38 MOD[mm] MOD!=3 REG[rrr] RM[nnn] MODRM() BCRC=0  
0x0F 0xAE MOD[mm] MOD!=3 REG[0b110] RM[nnn]  f3_refining_prefix     MODRM()  
VV1 0x44  V66 V0F3A  MOD[mm]  MOD!=3 REG[rrr] RM[nnn] MODRM() VL128 UIMM8()
0x0F 0x1C MOD[mm] MOD!=3 REG[0b000] RM[nnn]  MODRM()  no_refining_prefix     CLDEMOTE=1
EVV 0x8A V66 V0F38 MOD[mm] MOD!=3 REG[rrr] RM[nnn] BCRC=0 MODRM()  VL512  W1  NOEVSR  ZEROING=0  ESIZE_64_BITS() NELEM_GSCAT()
EVV 0x2D VF2 V0F MOD[0b11] MOD=3 BCRC=0 REG[rrr] RM[nnn]  not64  NOEVSR  ZEROING=0 MASK=0  FIX_ROUND_LEN128()
0x0F 0x38 0xC9 MOD[mm] MOD!=3 REG[rrr] RM[nnn]  MODRM()  no_refining_prefix     

Where can I find in the code (or other docs) the meaning of all these things?

I understand what REG[0b110] means, and it seems that just calling MODRM() means "this has a ModR/M byte". But not sure.

  • What MOD!=3 and MOD=3 mean.
  • What the mm in MOD[mm] means. Same with REG[rrr] and RM[nnn].
  • What the various flags mean, like not64 NOEVSR ZEROING=0 MASK=0.
  • What the EVV and VV1 (and others) mean (not here in the code or in the Intel docs either).

The xed-state-bits.txt seems to encode the meaning of no_refining_prefix and others.

I've been looking through the generator.py for some hints, but not so much luck. The functions like NELEM_GSCAT() I am not sure what to make of (found in *-disp8.txt):

NELEM_GSCAT()::
otherwise -> nothing

Finally, is this PATTERN literally the order of bits to-be-found (or generated)? Or what should I be reading this as?

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants