summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-06-05 12:28:00 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-06-05 12:28:00 -0700
commitcb6aaa33ce6be45e257404c688a21606fed3abea (patch)
tree9926bdfde395d105a3ed1344536247bfb5b63ec9
parentb2072eacd378eec9304ea2d064bf7172c40a0842 (diff)
downloadnasm-cb6aaa33ce6be45e257404c688a21606fed3abea.tar.gz
insnsd.c: don't generate an inaccessible table
Some pseudo-instructions (RESB and EQU) seem to make it into the instruction table. This also generates an instruction table for zero-length instructions, which of course can never actually be accessed. Quiet a compiler warning by simply not emitting this useless table. Ideally we shouldn't emit the pseudo-instructions either, but that is a bigger change, and it's hardly a lot of memory involved.
-rw-r--r--insns.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/insns.pl b/insns.pl
index 00ab500b..9a8d3ed8 100644
--- a/insns.pl
+++ b/insns.pl
@@ -184,6 +184,7 @@ if ( !defined($output) || $output eq 'd' ) {
print D "};\n";
foreach $h (sort(keys(%dinstables))) {
+ next if ($h eq ''); # Skip pseudo-instructions
print D "\nstatic const struct itemplate * const itable_${h}[] = {\n";
foreach $j (@{$dinstables{$h}}) {
print D " instrux + $j,\n";