- # STD ENTRY POINT
- if ( defined($slowchk{$symb}) ) {
-
- # teach it to drop through to the fast entry point:
- $c = $chk[$slowchk{$symb}];
-
- if ($TargetPlatform =~ /^powerpc-|^rs6000-/) {
- ($p, $r) = split(/TOC\[tc0\], 0\n/, $c);
- if ($symb =~ /^[_A-Z]/)
- {
- print OUTASM "\t\.globl \.${chksymb[$i]}_entry\n";
- print OUTASM "\.csect ${symb}_entry[DS]\n";
- print OUTASM "${p}TOC[tc0], 0\n";
- };
- $r =~ s/\.csect \.text\[PR\]\n//; # todo: properly - andre
- $c = &mangle_powerpc_tailjump($r);
- };
-
- if ( defined($fastchk{$symb}) ) {
- if ( $TargetPlatform =~ /^alpha-/ ) {
- $c =~ s/^\tjmp \$31,\(\$27\),0\n\t\.align 4\n\t\.end/\t.align 4\n\t.end/;
- } elsif ( $TargetPlatform =~ /^hppa/ ) {
- $c =~ s/^\s+ldil.*\n\s+ldo.*\n\s+bv.*\n(.*\n)?\s+\.EXIT/$1\t.EXIT/;
- } elsif ( $TargetPlatform =~ /^i386-/ ) {
- # Reg alloc depending, gcc generated code may jump to the fast entry point via
- # a number of registers.
- $c =~ s/^\tmovl \$${T_US}${symb}_fast\d*,\%edx\n\tjmp \*\%edx\n//;
- $c =~ s/^\tmovl \$${T_US}${symb}_fast\d*,\%ecx\n\tjmp \*\%ecx\n//;
- $c =~ s/^\tmovl \$${T_US}${symb}_fast\d*,\%eax\n\tjmp \*\%eax\n//;
- # The next two only apply if we're not stealing %esi or %edi.
- $c =~ s/^\tmovl \$${T_US}${symb}_fast\d*,\%esi\n\tjmp \*\%esi\n// if ($StolenX86Regs < 3);
- $c =~ s/^\tmovl \$${T_US}${symb}_fast\d*,\%edi\n\tjmp \*\%edi\n// if ($StolenX86Regs < 4);
- } elsif ( $TargetPlatform =~ /^mips-/ ) {
- $c =~ s/^\tjmp \$31,\(\$27\),0\n\t\.align 4\n\t\.end/\t.align 4\n\t.end/;
- } elsif ( $TargetPlatform =~ /^m68k-/ ) {
- $c =~ s/^\tjmp ${T_US}${symb}_fast\d+.*\n\tnop\n//;
- $c =~ s/^\tjmp ${T_US}${symb}_fast\d+.*\n//;
- } elsif ( $TargetPlatform =~ /^powerpc-|^rs6000-/ ) {
- $c =~ s/^\tb \.${T_US}${symb}_fast\d+\n//;
- } elsif ( $TargetPlatform =~ /^sparc-/ ) {
- $c =~ s/^\tcall\s+${T_US}${symb}_fast\d+,.*\n\t\s*nop\n//;
- $c =~ s/^\tcall\s+${T_US}${symb}_fast\d+,.*\n(\t\s*[a-z].*\n)/$1/;
- } else {
- print STDERR "$Pgm: mystery slow-fast dropthrough: $TargetPlatform\n";
- }
- }