perlasm/ppc-xlate.pl: add support for AltiVec/VMX and VSX.
Suggested by: Marcello Cerri
This commit is contained in:
parent
f586d97191
commit
26e18383ef
@ -146,6 +146,10 @@ my $extrdi = sub {
|
|||||||
$b = ($b+$n)&63; $n = 64-$n;
|
$b = ($b+$n)&63; $n = 64-$n;
|
||||||
" rldicl $ra,$rs,$b,$n";
|
" rldicl $ra,$rs,$b,$n";
|
||||||
};
|
};
|
||||||
|
my $vmr = sub {
|
||||||
|
my ($f,$vx,$vy) = @_;
|
||||||
|
" vor $vx,$vy,$vy";
|
||||||
|
};
|
||||||
|
|
||||||
while($line=<>) {
|
while($line=<>) {
|
||||||
|
|
||||||
@ -174,7 +178,7 @@ while($line=<>) {
|
|||||||
my $mnemonic = $2;
|
my $mnemonic = $2;
|
||||||
my $f = $3;
|
my $f = $3;
|
||||||
my $opcode = eval("\$$mnemonic");
|
my $opcode = eval("\$$mnemonic");
|
||||||
$line =~ s|\bc?[rf]([0-9]+)\b|$1|g if ($c ne "." and $flavour !~ /osx/);
|
$line =~ s/\b(c?[rf]|v|vs)([0-9]+)\b/$2/g if ($c ne "." and $flavour !~ /osx/);
|
||||||
if (ref($opcode) eq 'CODE') { $line = &$opcode($f,split(',',$line)); }
|
if (ref($opcode) eq 'CODE') { $line = &$opcode($f,split(',',$line)); }
|
||||||
elsif ($mnemonic) { $line = $c.$mnemonic.$f."\t".$line; }
|
elsif ($mnemonic) { $line = $c.$mnemonic.$f."\t".$line; }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user