Oops, back out most of last revision. Other changes crept in by mistake.
$T_X86_PRE_LLBL = '.L';
$T_X86_BADJMP = '^\tjmp [^\.\*]';
$T_X86_PRE_LLBL = '.L';
$T_X86_BADJMP = '^\tjmp [^\.\*]';
- $T_MOVE_DIRVS = '^(\s*(\.(p2)?align\s+\d+(,0x90)?|\.globl\s+\S+|\.text|\.data|\.section\s+.*|\.size\s+.*|\.type\s+.*|\.Lfe.*\n\t\.size\s+.*|\.ident.*)\n)';
+ $T_MOVE_DIRVS = '^(\s*(\.(p2)?align\s+\d+(,0x90)?|\.globl\s+\S+|\.text|\.data|\.section\s+.*|\.type\s+.*|\.Lfe.*\n\t\.size\s+.*|\.size\s+.*|\.ident.*)\n)';
$T_COPY_DIRVS = '\.(globl)';
if ( $TargetPlatform =~ /freebsd3/ ) {
$T_COPY_DIRVS = '\.(globl)';
if ( $TargetPlatform =~ /freebsd3/ ) {
}
die "Prologue junk?: $p\n" if $p =~ /^\t[^\.]/
}
die "Prologue junk?: $p\n" if $p =~ /^\t[^\.]/
- && $TargetPlatform !~ /^(powerpc-|i386-)/; #ToDo: remove test
+ && $TargetPlatform !~ /^powerpc-/; #ToDo: remove test
# glue together what's left
$c = $p . $r;
# glue together what's left
$c = $p . $r;
$e =~ s/^\tret\n//;
$e =~ s/^\tpopl \%edi\n//;
$e =~ s/^\tpopl \%esi\n//;
$e =~ s/^\tret\n//;
$e =~ s/^\tpopl \%edi\n//;
$e =~ s/^\tpopl \%esi\n//;
- $e =~ s/^\tpopl \%ebx\n//;
$e =~ s/^\tpopl \%ecx\n//;
$e =~ s/^\taddl \$\d+,\%esp\n//;
} elsif ($TargetPlatform =~ /^m68k-/) {
$e =~ s/^\tpopl \%ecx\n//;
$e =~ s/^\taddl \$\d+,\%esp\n//;
} elsif ($TargetPlatform =~ /^m68k-/) {
# On Alphas, the prologue mangling is done a little later (below)
# toss all calls to __DISCARD__
# On Alphas, the prologue mangling is done a little later (below)
# toss all calls to __DISCARD__
- $c =~ s/^\t(call|jbsr|jal)\s+$TUS[@]?__DISCARD__(\@PLT)?\n//go;
+ $c =~ s/^\t(call|jbsr|jal)\s+$TUS[@]?__DISCARD__\n//go;
# MIPS: that may leave some gratuitous asm macros around
# (no harm done; but we get rid of them to be tidier)
# MIPS: that may leave some gratuitous asm macros around
# (no harm done; but we get rid of them to be tidier)
$chk[$infochk{$symb}] =~ s/\.long ([A-Za-z]\S+_upd)/\.long \.\1/;
print OUTASM $chk[$infochk{$symb}];
} else {
$chk[$infochk{$symb}] =~ s/\.long ([A-Za-z]\S+_upd)/\.long \.\1/;
print OUTASM $chk[$infochk{$symb}];
} else {
-# for shared libs --SDM
- print OUTASM $chk[$infochk{$symb}];
-# print OUTASM &rev_tbl($symb, $chk[$infochk{$symb}], 1);
+ print OUTASM &rev_tbl($symb, $chk[$infochk{$symb}], 1);
}
# entry code will be put here!
}
# entry code will be put here!
# 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);
# 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);
- # for PIC code
- $c =~ s/^\tleal ${T_US}${symb}_fast\d*\@GOTOFF\(\%ebx\),\%eax\n\tjmp \*\%eax\n//;
- $c =~ s/^\tjmp \*${T_US}${symb}_fast\d*\@GOT\(\%ebx\)\n//;
- $c =~ s/^\.LPR\d+\:\n\tmovl \(\%esp\),\%ebx\n\tret\n//;
} 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-/ ) {
} 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-/ ) {
print OUTASM ".${symb}_vtbl:\n";
print OUTASM $chk[$vectorchk{$symb}];
} else {
print OUTASM ".${symb}_vtbl:\n";
print OUTASM $chk[$vectorchk{$symb}];
} else {
-# for shared libs --SDM print OUTASM $chk[$vectorchk{$symb}];
- print OUTASM $chk[$vectorchk{$symb}];
-# print OUTASM &rev_tbl($symb, $chk[$vectorchk{$symb}], 0);
+ print OUTASM &rev_tbl($symb, $chk[$vectorchk{$symb}], 0);
}
# direct return code will be put here!
$chkcat[$vectorchk{$symb}] = 'DONE ALREADY';
}
# direct return code will be put here!
$chkcat[$vectorchk{$symb}] = 'DONE ALREADY';