local($thing);
chop($thing = $_);
$thing =~ s/:$//;
- print STDERR "Warning: retaining unknown function \`$thing' in output from C compiler\n"
- unless # $KNOWN_FUNNY_THING{$thing}
+ $chk[++$i] = $_;
+ $chksymb[$i] = '';
+ if (
/^${T_US}stg_.*${T_POST_LBL}$/o # RTS internals
|| /^${T_US}__stg_.*${T_POST_LBL}$/o # more RTS internals
|| /^${T_US}__fexp_.*${T_POST_LBL}$/o # foreign export
|| /^${T_US}.*_srtd${T_POST_LBL}$/o # large bitmaps
|| /^${T_US}.*_fast${T_POST_LBL}$/o # primops
|| /^${T_US}.*_closure_tbl${T_POST_LBL}$/o # closure tables
- || /^_uname:/o; # x86/Solaris2
- $chk[++$i] = $_;
- $chkcat[$i] = 'misc';
- $chksymb[$i] = '';
+ || /^_uname:/o # x86/Solaris2
+ ) {
+ $chkcat[$i] = 'misc';
+ } else {
+ print STDERR "Warning: retaining unknown function \`$thing' in output from C compiler\n";
+ $chkcat[$i] = 'unknown';
+ }
} elsif ( $TargetPlatform =~ /^powerpc-apple-.*/ && (
/^\.picsymbol_stub/
# On SPARCs, we don't do --- BEGIN/END ---, we just
# toss the register-windowing save/restore/ret* instructions
- # directly:
+ # directly unless they've been generated by function definitions in header
+ # files on Solaris:
if ( $TargetPlatform =~ /^sparc-/ ) {
- $c =~ s/^\t(save.*|restore.*|ret|retl)\n//g;
+ if ( ! ( $TargetPlatform =~ /solaris2$/ && $chkcat[$i] eq 'unknown' )) {
+ $c =~ s/^\t(save.*|restore.*|ret|retl)\n//g;
+ }
# throw away PROLOGUE comments
$c =~ s/^\t!#PROLOGUE# 0\n\t!#PROLOGUE# 1\n//;
}
next if $chkcat[$i] eq 'DONE ALREADY';
- if ( $chkcat[$i] eq 'misc' ) {
+ if ( $chkcat[$i] eq 'misc' || $chkcat[$i] eq 'unknown' ) {
if ($chk[$i] ne '') {
print OUTASM $T_HDR_misc;
&print_doctored($chk[$i], 0);