|
From: <sv...@va...> - 2012-12-06 05:03:20
|
florian 2012-12-06 05:03:08 +0000 (Thu, 06 Dec 2012)
New Revision: 13157
Log:
Accept blank lines in <binutils>/opcodes/s390-opc.txt.
Bug fix: avoid reading something uninitialised
Modified files:
trunk/auxprogs/s390-check-opcodes.pl
Modified: trunk/auxprogs/s390-check-opcodes.pl (+7 -2)
===================================================================
--- trunk/auxprogs/s390-check-opcodes.pl 2012-12-06 03:56:14 +00:00 (rev 13156)
+++ trunk/auxprogs/s390-check-opcodes.pl 2012-12-06 05:03:08 +00:00 (rev 13157)
@@ -35,6 +35,7 @@
while (my $line = <OPC>) {
chomp $line;
next if ($line =~ "^[ ]*#"); # comments
+ next if ($line =~ /^\s*$/); # blank line
my $description = (split /"/,$line)[1];
my ($encoding,$mnemonic,$format) = split /\s+/,$line;
@@ -144,8 +145,12 @@
# 2) Make sure opcode descriptions are the same
#----------------------------------------------------
foreach my $opc (keys %opc_desc) {
- if ($opc_desc{$opc} ne $csv_desc{$opc}) {
- print "*** opcode $opc differs: $opc_desc{$opc}\n";
+ if (defined $csv_desc{$opc}) {
+ if ($opc_desc{$opc} ne $csv_desc{$opc}) {
+ print "*** opcode $opc differs:\n";
+ print " binutils: $opc_desc{$opc}\n";
+ print " opcodes.csv: $csv_desc{$opc}\n";
+ }
}
}
|