Debian Codegraph @

x86/rex2.pl

raw
1 #!/usr/bin/perl
2
3 use integer;
4
5 while (<>) {
6 chomp;
7 print $_;
8 if (!/\#/ &&
9 # VEX/XOP is implicit so no need to clutter
10 # the table with it...
11 !/\b(rex2|vex|evex|xop)\b/ &&
12 !/\bNOAPX\b/ &&
13 !/\bNOLONG\b/ &&
14 # Maps 2+ are not REX2 encodable, this is implicit
15 !/\b0f3[a8]\b/ &&
16 !/\b(m|map)([2-9]|[1][0-9])\b/ &&
17 ((!/\b0f\b/ &&
18 !/\b[^47ae][0-9a-f] [47ae][0-9a-f]\b/ &&
19 /\b[47ae][0-9a-f]\b/) ||
20 /\b0f [38][0-9a-f]\b/ ||
21 /^(XSAVE|XRSTOR)/)) {
22 print ",NOAPX";
23 }
24 print "\n";
25 }