From bf20eec2a196c04549d9060a6e7426b4fd28df9f Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Mon, 30 Jul 2012 16:16:24 +0000 Subject: [PATCH] When parsing guest_s390_toIR.c also recognize opcodes with digits in their name. Also add more alternate opcode spellings. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12805 --- auxprogs/s390-check-opcodes.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/auxprogs/s390-check-opcodes.pl b/auxprogs/s390-check-opcodes.pl index ab1aec4351..d38747690e 100755 --- a/auxprogs/s390-check-opcodes.pl +++ b/auxprogs/s390-check-opcodes.pl @@ -52,6 +52,12 @@ while (my $line = ) { next if ($mnemonic eq "jg"); # special case of brcl next if ($mnemonic eq "tmh"); # alternate mnemonic for tmlh next if ($mnemonic eq "tml"); # alternate mnemonic for tmll + next if ($mnemonic eq "lrdr"); # alternate mnemonic for ldxr + next if ($mnemonic eq "lrer"); # alternate mnemonic for ledr + next if ($mnemonic eq "me"); # alternate mnemonic for mde + next if ($mnemonic eq "mer"); # alternate mnemonic for mder + next if ($mnemonic eq "cuutf"); # alternate mnemonic for cu21 + next if ($mnemonic eq "cutfu"); # alternate mnemonic for cu12 $description =~ s/^[\s]+//g; # remove leading blanks $description =~ s/[\s]+$//g; # remove trailing blanks @@ -113,7 +119,7 @@ open(TOIR, "$toir_file") || die "cannot open $toir_file\n"; while (my $line = ) { chomp $line; next if (! ($line =~ /^s390_irgen_[A-Z]/)); - $line =~ /^s390_irgen_([A-Z]+)/; + $line =~ /^s390_irgen_([A-Z][A-Z0-9]*)/; my $op = $1; $op =~ tr/A-Z/a-z/; $toir_implemented{$op} = 1; @@ -135,7 +141,7 @@ foreach my $opc (keys %csv_desc) { } #---------------------------------------------------- -# 2) Make sure opcodes descriptions are the same +# 2) Make sure opcode descriptions are the same #---------------------------------------------------- foreach my $opc (keys %opc_desc) { if ($opc_desc{$opc} ne $csv_desc{$opc}) { -- 2.47.2