$T_HDR_direct = "\t.SPACE \$TEXT\$\n\t.SUBSPA \$CODE\$\n\t\.align 4\n";
#--------------------------------------------------------#
- } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd|cygwin32)/ ) {
+ } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd|nextstep3|cygwin32)/ ) {
+ # NeXT added but not tested. CaS
$T_STABBY = 1; # 1 iff .stab things (usually if a.out format)
$T_US = '_'; # _ if symbols have an underscore on the front
$p =~ s/^\tmovl \$\d+,\%eax\n\tcall __alloca\n// if ($TargetPlatform =~ /^.*-cygwin32/);
} elsif ($TargetPlatform =~ /^m68k-/) {
$p =~ s/^\tlink a6,#-?\d.*\n//;
+ $p =~ s/^\tpea a6@\n\tmovel sp,a6\n//;
+ # The above showed up in the asm code,
+ # so I added it here.
+ # I hope it's correct.
+ # CaS
$p =~ s/^\tmovel d2,sp\@-\n//;
$p =~ s/^\tmovel d5,sp\@-\n//; # SMmark.* only?
$p =~ s/^\tmoveml \#0x[0-9a-f]+,sp\@-\n//; # SMmark.* only?
} elsif ($TargetPlatform =~ /^i386-/) {
# we know how to *mangle* asm for X86
unshift(@CcRegd_flags, ('-D__STG_REV_TBLS__'));
- unshift(@CcRegd_flags, ('-DSTACK_CHECK_BY_PAGE_FAULT=1')) if $StkChkByPageFaultOK;
+ unshift(@CcRegd_flags, ('-DSTACK_CHECK_BY_PAGE_FAULT=1'))
+ if $StkChkByPageFaultOK;
+ && $TargetPlatform !~ /nextstep/;
+ # I do not know how to do STACK_CHECK_BY_PAGE_FAULT
+ # on NeXTs (my fault, not theirs), so I don't.
+ # CaS
# -fno-defer-pop : basically the same game as for m68k
#
} elsif ($TargetPlatform =~ /^m68k-/) {
# we know how to *mangle* asm for m68k
unshift (@CcRegd_flags, ('-D__STG_REV_TBLS__'));
- unshift (@CcRegd_flags, ('-DSTACK_CHECK_BY_PAGE_FAULT=1')) if $StkChkByPageFaultOK;
-
+ unshift (@CcRegd_flags, ('-DSTACK_CHECK_BY_PAGE_FAULT=1'))
+ if $StkChkByPageFaultOK;
+ && $TargetPlatform !~ /nextstep/;
+ # I do not know how to do STACK_CHECK_BY_PAGE_FAULT
+ # on NeXTs (my fault, not theirs), so I don't.
+ # CaS
+ &&
# -fno-defer-pop : for the .hc files, we want all the pushing/
# popping of args to routines to be explicit; if we let things
# be deferred 'til after an STGJUMP, imminent death is certain!