summaryrefslogtreecommitdiff
path: root/doc/inslist.pl
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2017-04-07 09:51:24 -0700
committerH. Peter Anvin <hpa@zytor.com>2017-04-07 09:51:24 -0700
commitbdbaaa207c23ddad6c6334286366f0f0c6b528a0 (patch)
tree2e8f9946ebe900c0d42d0eecf79f5a55cb473a47 /doc/inslist.pl
parent9d045cd7870037366ac749e25342ad0c89e1693a (diff)
downloadnasm-bdbaaa207c23ddad6c6334286366f0f0c6b528a0.tar.gz
doc: clean up the instruction list in the documentation slightly
Compactify the instruction list in the documentation to have fewer margin violations, and fix some of the headings (;#). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'doc/inslist.pl')
-rw-r--r--doc/inslist.pl34
1 files changed, 22 insertions, 12 deletions
diff --git a/doc/inslist.pl b/doc/inslist.pl
index f3d160d7..c7d7da40 100644
--- a/doc/inslist.pl
+++ b/doc/inslist.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
## --------------------------------------------------------------------------
##
-## Copyright 1996-2009 The NASM Authors - All Rights Reserved
+## Copyright 1996-2017 The NASM Authors - All Rights Reserved
## See the file AUTHORS included with the NASM distribution for
## the specific copyright holders.
##
@@ -36,10 +36,6 @@
# inslist.pl produce inslist.src
#
-# Opcode prefixes which need their own opcode tables
-# LONGER PREFIXES FIRST!
-@disasm_prefixes = qw(0F24 0F25 0F38 0F3A 0F7A 0FA6 0FA7 0F);
-
print STDERR "Reading insns.dat...\n";
@args = ();
@@ -82,13 +78,27 @@ while (<F>) {
$entry[1] =~ s/ignore//;
$entry[1] =~ s/void//;
- $entry[3] =~ s/ignore//;
- $entry[3] =~ s/,SB//;
- $entry[3] =~ s/,SM//;
- $entry[3] =~ s/,SM2//;
- $entry[3] =~ s/,SQ//;
- $entry[3] =~ s/,AR2//;
- printf S "\\c %-16s %-24s %s\n",$entry[0],$entry[1],$entry[3];
+
+ my @flags = split(/,/, $entry[3]);
+ my @nflags;
+ undef $isavx512;
+ undef @avx512fl;
+ for my $fl (@flags) {
+ next if ($fl =~ /^(ignore|SB|SM|SM2|SQ|AR2|FUTURE)$/);
+
+ if ($fl =~ /^AVX512(.*)$/) {
+ $isavx512 = 1;
+ push(@avx512fl, $1) unless ($1 eq '');
+ } else {
+ push(@nflags,$fl);
+ }
+ }
+
+ if ($isavx512) {
+ unshift(@nflags, "AVX512".join('/', @avx512fl));
+ }
+
+ printf S "\\c %-16s %-24s %s\n",$entry[0],$entry[1], join(',', @nflags);
$insns++;
}
print S "\n";