Commit bd3ac0d7 authored by simonmar's avatar simonmar
Browse files

[project @ 2005-02-09 15:25:12 by simonmar]

Keep .type/.size directives for _entry symbols, but rename them to
_info.  This helps cachegrind to find where my instructions are going.
parent d032a372
......@@ -1216,8 +1216,23 @@ sub mangle_asm {
# If this is an entry point with an info table,
# eliminate the entry symbol and all directives involving it.
if (defined($infochk{$symb}) && $TargetPlatform !~ /^ia64-/) {
$c =~ s/^.*$symb_(entry|ret)${T_POST_LBL}\n//;
$c =~ s/^\s*\..*$symb.*\n//g;
@o = ();
foreach $l (split(/\n/,$c)) {
next if $l =~ /^.*$symb_(entry|ret)${T_POST_LBL}/;
# If we have .type/.size direrctives involving foo_entry,
# then make them refer to foo_info instead. The information
# in these directives is used by the cachegrind annotator,
# so it is worthwhile keeping.
if ($l =~ /^\s*\.(type|size).*$symb_(entry|ret)/) {
$l =~ s/$symb(_entry|_ret)/${symb}_info/g;
push(@o,$l);
next;
}
next if $l =~ /^\s*\..*$symb.*\n/;
push(@o,$l);
}
$c = join("\n",@o) . "\n";
}
print OUTASM $T_HDR_entry;
......
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