$ofile = $ARGV[1];
if ( $TargetPlatform =~ /^i386-/ ) {
- $StolenX86Regs = $ARGV[2];
+ if ($ARGV[2] eq '') {
+ $StolenX86Regs = 4;
+ } else {
+ $StolenX86Regs = $ARGV[2];
+ }
}
&mangle_asm($ifile,$ofile);
$T_HDR_direct = "\t.SPACE \$TEXT\$\n\t.SUBSPA \$CODE\$\n\t\.align 4\n";
#--------------------------------------------------------#
- } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd2|netbsd|openbsd|nextstep3|cygwin32|mingw32)$/ ) {
+ } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd2|netbsd_aout|openbsd|nextstep3|cygwin32|mingw32)$/ ) {
# NeXT added but not tested. CaS
$T_STABBY = 1; # 1 iff .stab things (usually if a.out format)
$T_HDR_direct = "\.text\n\t\.align 2,0x90\n";
#--------------------------------------------------------#
- } elsif ( $TargetPlatform =~ /^i386-.*-(solaris2|linux|freebsd|netbsd_elf)$/ ) {
+ } elsif ( $TargetPlatform =~ /^i386-.*-(solaris2|linux|freebsd|netbsd)$/ ) {
$T_STABBY = 0; # 1 iff .stab things (usually if a.out format)
$T_US = ''; # _ if symbols have an underscore on the front
$i = 0; $chkcat[0] = 'misc'; $chk[0] = '';
while (<INASM>) {
+ tr/\r//d if $TargetPlatform =~ /-mingw32$/;
next if $T_STABBY && /^\.stab.*${T_US}__stg_split_marker/o;
next if $T_STABBY && /^\.stab.*ghc.*c_ID/;
next if /^\t\.def.*endef$/;
print STDERR "$Pgm: unknown epilogue mangling? $TargetPlatform\n";
}
- # --- Can't test for residual epilogue junk reliably because
- # --- there might be some directives left over that we're going
- # --- to move to the next chunk (see below).
- # die "Epilogue junk?: $e\n" if $e =~ /^\t[^\.\n]/
- # && $TargetPlatform !~ /^powerpc-/; #ToDo: remove test
+ print "WARNING: Epilogue junk?: $e\n" if $e =~ /^\t\s*[^\.\s\n]/
+ && $TargetPlatform !~ /^powerpc-/; #ToDo: remove test
# glue together what's left
$c = $r . $e;
# references to fast-entry point.
# (questionable re hppa and mips...)
print STDERR "still has jump to fast entry point:\n$c"
- if $c =~ /${T_US}${symb}_fast/;
+ if $c =~ /\b${T_US}${symb}_fast/;
}
print OUTASM $T_HDR_entry;