dotnet/runtime

Consider reordering the instrsxarch.h encodings to save space

Open

#10.908 geöffnet am 15. Aug. 2018

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)C# (5.445 Forks)batch import
area-CodeGen-coreclrenhancementhelp wanted

Repository-Metriken

Stars
 (17.886 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 12T 11h) (661 gemergte PRs in 30 T)

Beschreibung

The instrsxarch.h encodings are currently ordered as follows:

  • R/M[reg]
  • R/M,icon
  • reg,R/M
  • eax,i32
  • register

This ordering appears to have been done in order to save space, as not all instructions require all encodings However, with the addition of HardwareIntrinsics, a large number of INST3 encodings were added and often, only one or two of the encodings are used.

It may be beneficial to consider reordering these encodings in order to save additional space. Looking briefly at the encodings, I see the following:

encoding # entries # bad_code
R/M[reg] 527 366
R/M,icon 444 390
reg,R/M 421 56
eax,i32 21 10
register 9 1

category:implementation theme:emitter skill-level:beginner cost:medium impact:small

Contributor Guide