X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=opcode.pl;h=fddf6462a94aa80892727f9f361bf241d1ce2afc;hb=f1387719c66d49522b38f85cae0c68334115d46b;hp=f1da5b6cc62c27b31c742464d7908c030d04a8b3;hpb=4633a7c4bad06b471d9310620b7fe8ddd158cccd;p=p5sagit%2Fp5-mst-13.2.git diff --git a/opcode.pl b/opcode.pl index f1da5b6..fddf646 100755 --- a/opcode.pl +++ b/opcode.pl @@ -9,9 +9,15 @@ while () { chop; next unless $_; next if /^#/; - ($key, $name, $check, $flags, $args) = split(/\t+/, $_, 5); + ($key, $desc, $check, $flags, $args) = split(/\t+/, $_, 5); + + warn qq[Description "$desc" duplicates $seen{$desc}\n] if $seen{$desc}; + die qq[Opcode "$key" duplicates $seen{$key}\n] if $seen{$key}; + $seen{$desc} = qq[description of opcode "$key"]; + $seen{$key} = qq[opcode "$key"]; + push(@ops, $key); - $name{$key} = $name; + $desc{$key} = $desc; $check{$key} = $check; $ckname{$check}++; $flags{$key} = $flags; @@ -36,7 +42,7 @@ print "\t", &tab(3,"OP_max"), "\n"; print "} opcode;\n"; print "\n#define MAXO ", scalar @ops, "\n\n"; -# Emit opnames. +# Emit op names and descriptions. print <