summaryrefslogtreecommitdiff
path: root/insns.pl
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-08-19 17:20:18 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-08-19 17:20:18 -0700
commite7854b98fd7ab875e948b7faf26a12701c306fc4 (patch)
treec88e288538816519e8eeb538c4f46409bd127f9e /insns.pl
parent5d62e57a0c8fd4b2aa9c9b671ba43be2817d789f (diff)
downloadnasm-e7854b98fd7ab875e948b7faf26a12701c306fc4.tar.gz
nasm-e7854b98fd7ab875e948b7faf26a12701c306fc4.tar.bz2
nasm-e7854b98fd7ab875e948b7faf26a12701c306fc4.zip
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>
Diffstat (limited to 'insns.pl')
-rwxr-xr-xinsns.pl19
1 files changed, 8 insertions, 11 deletions
diff --git a/insns.pl b/insns.pl
index adc1814..5ffdce2 100755
--- a/insns.pl
+++ b/insns.pl
@@ -308,12 +308,12 @@ if ( !defined($output) || $output eq 'd' ) {
if ($is_prefix{$nn}) {
die "$fname: ambiguous decoding of $nn\n"
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})) {
- printf D " { itable_%s, %u },\n",
- $nn, scalar(@{$dinstables{$nn}});
+ printf D " /* 0x%02x */ { itable_%s, %u },\n", $c,
+ $nn, scalar(@{$dinstables{$nn}});
} else {
- printf D " { NULL, 0 },\n";
+ printf D " /* 0x%02x */ { NULL, 0 },\n", $c;
}
}
print D "};\n";
@@ -325,16 +325,13 @@ if ( !defined($output) || $output eq 'd' ) {
for ($c = 0; $c < $vex_classes; $c++) {
print D " {\n";
for ($m = 0; $m < 32; $m++) {
- print D " {\n";
+ print D " { ";
for ($p = 0; $p < 4; $p++) {
$vp = sprintf("%s%02X%01X", $vex_class[$c], $m, $p);
- if ($is_prefix{$vp}) {
- printf D " itable_%s,\n", $vp;
- } else {
- print D " NULL,\n";
- }
+ printf D "%-15s",
+ ($is_prefix{$vp} ? sprintf("itable_%s,", $vp) : 'NULL,');
}
- print D " },\n";
+ print D "},\n";
}
print D " },\n";
}