[PATCH v2 2/5] ppc/svp64: support setvl instructions
Peter Bergner
bergner@linux.ibm.com
Tue Jun 21 18:39:08 GMT 2022
On 6/21/22 1:25 PM, Peter Bergner via Binutils wrote:
> One or more of the following files ( byte-swap-test.pl ) violates ...
WT*? :-(
Here it is inline.
Peter
#!/usr/bin/perl -w
use File::Basename;
use FileHandle;
use strict;
die "Usage: ", basename ($0), " <asm file>\n" unless (@ARGV);
my $file = shift ();
my $fh = new FileHandle;
$fh->open ($file) or
die "Error opening '$file' for reading: $!\n";
print "#as: -m<cpu>\n",
"#objdump: -dr -M<cpu>\n",
"#name: <CPU> tests\n";
my $found = 0;
while (my $insn = <$fh>)
{
chomp ($insn);
if ($insn =~ m/^.*:\W+file format.*/)
{
print ".*\n";
}
elsif ($insn =~ m/^[0-9a-fA-F]+ <([^>]+)>:(.*)/)
{
print "0+0 <$1>:$2\n";
last;
}
else
{
$insn =~ s#\.#\\\.#g;
$insn =~ s#\(#\\\(#g;
$insn =~ s#\)#\\\)#g;
print "$insn\n";
}
}
while (my $insn = <$fh>)
{
chomp ($insn);
if ($insn =~ m/^\W*([0-9a-fA-F]+):\t([0-9a-f][0-9a-f]) ([0-9a-f][0-9a-f]) ([0-9a-f][0-9a-f]) ([0-9a-f][0-9a-f])(.*)/)
{
my ($offset,$b0,$b1,$b2,$b3,$end) = ($1,$2,$3,$4,$5,$6);
$offset = '.*';
$end =~ s#\.#\\\.#g;
$end =~ s#\(#\\\(#g;
$end =~ s#\)#\\\)#g;
$end =~ s#\+#\\\+#g;
$end =~ s#\*#\\\*#g;
$insn = sprintf ("%s:\t($b0 $b1 $b2 $b3|$b3 $b2 $b1 $b0)$end", $offset);
}
elsif ($insn =~ m/^\s+[0-9a-fA-F]+: R_PPC64_.*/)
{
$insn =~ s#R_PPC64_#R_PPC\(|64\)_#g;
}
print "$insn\n";
}
print "#pass\n";
More information about the Binutils
mailing list