Lines Matching +full:line +full:- +full:name
2 # SPDX-License-Identifier: GPL-2.0
18 my $name = shift;
19 my $global = \$GLOBALS{$name};
22 $name =~ s|^[\.\_]||;
25 /aix/ && do { $name = ".$name";
28 /osx/ && do { $name = "_$name";
32 && do { $ret = "_GLOBAL($name)";
37 $ret = ".globl $name\nalign 5\n$name:" if (!$ret);
38 $$global = $name;
51 $arch = ($flavour=~/64/) ? "ppc970-64" : "ppc970" if ($arch eq "any");
58 my $name = shift; $name =~ s|^[\.\_]||;
59 my $ret = ".size $name,.-".($flavour=~/64$/?".":"").$name;
60 $ret .= "\n.size .$name,.-.$name" if ($flavour=~/64$/);
68 my $line = join(",",@_);
69 if ($line =~ /^"(.*)"$/)
79 if (/^0x([0-9a-f]*?)([0-9a-f]{1,8})$/io)
81 elsif (/^([0-9]+)$/o)
82 { $hi=$1>>32; $lo=$1&0xffffffff; } # error-prone with 32-bit perl
100 # Some out-of-date 32-bit GNU assembler just can't handle cmplw...
107 my $bo = $f=~/[\+\-]/ ? 16+9 : 16; # optional "to be taken" hint
112 my $bo = $f=~/\-/ ? 12+2 : 12; # optional "not to be taken" hint
119 my $bo = $f=~/\-/ ? 4+2 : 4; # optional "not to be taken" hint
126 my $bo = $f=~/-/ ? 12+2 : 12; # optional "not to be taken" hint
135 $b = ($b+$n)&63; $n = 64-$n;
143 # Some ABIs specify vrsave, special-purpose register #256, as reserved
145 my $no_vrsave = ($flavour =~ /linux-ppc64le/);
157 " li $rd,-1";
168 # made-up unaligned memory reference AltiVec/VMX instructions
186 my $vshasigmad = sub { my ($st,$six)=splice(@_,-2); vcrypto_op(@_, $st<<4|$six, 1730); };
187 my $vshasigmaw = sub { my ($st,$six)=splice(@_,-2); vcrypto_op(@_, $st<<4|$six, 1666); };
202 while($line=<>) {
204 $line =~ s|[#!;].*$||; # get rid of asm-style comments...
205 $line =~ s|/\*.*\*/||; # ... and C-style comments...
206 $line =~ s|^\s+||; # ... and skip white spaces in beginning...
207 $line =~ s|\s+$||; # ... and at the end
210 $line =~ s|\b\.L(\w+)|L$1|g; # common denominator for Locallabel
211 $line =~ s|\bL(\w+)|\.L$1|g if ($dotinlocallabels);
215 $line =~ s|^\s*(\.?)(\w+)([\.\+\-]?)\s*||;
220 $line =~ s/\b(c?[rf]|v|vs)([0-9]+)\b/$2/g if ($c ne "." and $flavour !~ /osx/);
221 if (ref($opcode) eq 'CODE') { $line = &$opcode($f,split(',',$line)); }
222 elsif ($mnemonic) { $line = $c.$mnemonic.$f."\t".$line; }
225 print $line if ($line);