Skip to content
Snippets Groups Projects
Commit cd7b1451 authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 2000-06-13 15:35:29 by simonmar]

Make object file splitting simpler, in preparation for conversion to
the new driver.

The "inject split markers" phase is now omitted, instead we generate
the split markers directly.

Driver: also removed now-defunct -fpedantic-bottoms flag.
parent a25cf6cb
No related merge requests found
......@@ -435,7 +435,7 @@ sub mangle_asm {
$chkcat[$i] = 'literal';
$chksymb[$i] = $1;
} elsif ( /^$TUS[@]?__stg_split_marker(\d+)$TPOSTLBL[@]?$/o ) {
} elsif ( /^$TUS[@]?__stg_split_marker(\d*)$TPOSTLBL[@]?$/o ) {
$chk[++$i] = $_;
$chkcat[$i] = 'splitmarker';
$chksymb[$i] = $1;
......@@ -734,7 +734,7 @@ sub mangle_asm {
# HWL HACK: dont die, just print a warning
#print stderr "HWL: this should die! Epilogue junk?: $e\n" if $e =~ /^\t[^\.]/
# && $TargetPlatform !~ /^powerpc-/; #ToDo: remove test
die "Epilogue junk?: $e\n" if $e =~ /^\t[^\.]/
die "Epilogue junk?: $e\n" if $e =~ /^\t[^\.\n]/
&& $TargetPlatform !~ /^powerpc-/; #ToDo: remove test
# glue together what's left
......
......@@ -4,46 +4,6 @@
%* *
%************************************************************************
\begin{code}
sub inject_split_markers {
local($hc_file) = @_;
unlink("$Tmp_prefix.unmkd");
local($to_do) = "$Cp $hc_file $Tmp_prefix.unmkd";
&run_something($to_do, 'Prepare to number split markers');
open(TMPI, "< $Tmp_prefix.unmkd") || &tidy_up_and_die(1,"$Pgm: failed to open `$Tmp_prefix.unmkd' (to read)\n");
open(TMPO, "> $hc_file") || &tidy_up_and_die(1,"$Pgm: failed to open `$hc_file' (to write)\n");
local($marker_no) = 1;
# make sure there is a split marker before any "real" code
$_ = <TMPI>;
while ( $_ ne '' && ( /^$/ || /^#/ ) ) {
print TMPO $_;
$_ = <TMPI>;
}
print TMPO "__STG_SPLIT_MARKER(1)\n";
print TMPO $_ if ! /^\s*\/\* SPLIT \*\/\s*$/;
# Have to be a bit careful detecting /* SPLIT */ comments
# since a progam may use a string containing "/* SPLIT */"
# We check that there is nothing else on the line
while (<TMPI>) {
if (/^\s*\/\* SPLIT \*\/\s*$/) {
$marker_no++;
print TMPO "__STG_SPLIT_MARKER($marker_no)\n";
next;
}
print TMPO $_;
}
close(TMPI) || &tidy_up_and_die(1,"Failed reading $Tmp_prefix.unmkd\n");
close(TMPO) || &tidy_up_and_die(1,"Failed writing $hc_file\n");
}
\end{code}
\begin{code}
sub split_asm_file {
local($asm_file) = @_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment