Commit efda1076 authored by sof's avatar sof
Browse files

[project @ 1997-03-25 21:26:21 by sof]

m68k-*-nextstep3 updates
parent 19121201
...@@ -104,7 +104,8 @@ sub init_TARGET_STUFF { ...@@ -104,7 +104,8 @@ sub init_TARGET_STUFF {
$T_HDR_direct = "\t.SPACE \$TEXT\$\n\t.SUBSPA \$CODE\$\n\t\.align 4\n"; $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_STABBY = 1; # 1 iff .stab things (usually if a.out format)
$T_US = '_'; # _ if symbols have an underscore on the front $T_US = '_'; # _ if symbols have an underscore on the front
...@@ -580,6 +581,11 @@ sub mangle_asm { ...@@ -580,6 +581,11 @@ sub mangle_asm {
$p =~ s/^\tmovl \$\d+,\%eax\n\tcall __alloca\n// if ($TargetPlatform =~ /^.*-cygwin32/); $p =~ s/^\tmovl \$\d+,\%eax\n\tcall __alloca\n// if ($TargetPlatform =~ /^.*-cygwin32/);
} elsif ($TargetPlatform =~ /^m68k-/) { } elsif ($TargetPlatform =~ /^m68k-/) {
$p =~ s/^\tlink a6,#-?\d.*\n//; $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 d2,sp\@-\n//;
$p =~ s/^\tmovel d5,sp\@-\n//; # SMmark.* only? $p =~ s/^\tmovel d5,sp\@-\n//; # SMmark.* only?
$p =~ s/^\tmoveml \#0x[0-9a-f]+,sp\@-\n//; # SMmark.* only? $p =~ s/^\tmoveml \#0x[0-9a-f]+,sp\@-\n//; # SMmark.* only?
......
...@@ -1126,7 +1126,12 @@ sub setupMachOpts { ...@@ -1126,7 +1126,12 @@ sub setupMachOpts {
} elsif ($TargetPlatform =~ /^i386-/) { } elsif ($TargetPlatform =~ /^i386-/) {
# we know how to *mangle* asm for X86 # we know how to *mangle* asm for X86
unshift(@CcRegd_flags, ('-D__STG_REV_TBLS__')); 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 # -fno-defer-pop : basically the same game as for m68k
# #
...@@ -1141,8 +1146,13 @@ sub setupMachOpts { ...@@ -1141,8 +1146,13 @@ sub setupMachOpts {
} elsif ($TargetPlatform =~ /^m68k-/) { } elsif ($TargetPlatform =~ /^m68k-/) {
# we know how to *mangle* asm for m68k # we know how to *mangle* asm for m68k
unshift (@CcRegd_flags, ('-D__STG_REV_TBLS__')); 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/ # -fno-defer-pop : for the .hc files, we want all the pushing/
# popping of args to routines to be explicit; if we let things # popping of args to routines to be explicit; if we let things
# be deferred 'til after an STGJUMP, imminent death is certain! # be deferred 'til after an STGJUMP, imminent death is certain!
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment