insns.pl: make insnsd.c a bit easier to read

Formatting changes (no object code difference) to insnsd.c for
readability.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin 2010-08-19 17:20:18 -07:00
parent 5d62e57a0c
commit e7854b98fd

View File

@ -308,12 +308,12 @@ if ( !defined($output) || $output eq 'd' ) {
if ($is_prefix{$nn}) { if ($is_prefix{$nn}) {
die "$fname: ambiguous decoding of $nn\n" die "$fname: ambiguous decoding of $nn\n"
if (defined($dinstables{$nn})); if (defined($dinstables{$nn}));
printf D " { itable_%s, -1 },\n", $nn; printf D " /* 0x%02x */ { itable_%s, -1 },\n", $c, $nn;
} elsif (defined($dinstables{$nn})) { } elsif (defined($dinstables{$nn})) {
printf D " { itable_%s, %u },\n", printf D " /* 0x%02x */ { itable_%s, %u },\n", $c,
$nn, scalar(@{$dinstables{$nn}}); $nn, scalar(@{$dinstables{$nn}});
} else { } else {
printf D " { NULL, 0 },\n"; printf D " /* 0x%02x */ { NULL, 0 },\n", $c;
} }
} }
print D "};\n"; print D "};\n";
@ -325,16 +325,13 @@ if ( !defined($output) || $output eq 'd' ) {
for ($c = 0; $c < $vex_classes; $c++) { for ($c = 0; $c < $vex_classes; $c++) {
print D " {\n"; print D " {\n";
for ($m = 0; $m < 32; $m++) { for ($m = 0; $m < 32; $m++) {
print D " {\n"; print D " { ";
for ($p = 0; $p < 4; $p++) { for ($p = 0; $p < 4; $p++) {
$vp = sprintf("%s%02X%01X", $vex_class[$c], $m, $p); $vp = sprintf("%s%02X%01X", $vex_class[$c], $m, $p);
if ($is_prefix{$vp}) { printf D "%-15s",
printf D " itable_%s,\n", $vp; ($is_prefix{$vp} ? sprintf("itable_%s,", $vp) : 'NULL,');
} else {
print D " NULL,\n";
}
} }
print D " },\n"; print D "},\n";
} }
print D " },\n"; print D " },\n";
} }