summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fbdb636)
Just hit a problem caused by gcc 3.1+: it uses instructions like
movl %esi, 4(%esp)
in the prologue, which the mangler wasn't expecting. This might fix
problems that other people have been seeing with gcc 3.1 on x86.
MERGE TO STABLE
$p =~ s/^\tpushl\s+\%edi\n//;
$p =~ s/^\tpushl\s+\%esi\n//;
$p =~ s/^\tpushl\s+\%ebx\n//;
$p =~ s/^\tpushl\s+\%edi\n//;
$p =~ s/^\tpushl\s+\%esi\n//;
$p =~ s/^\tpushl\s+\%ebx\n//;
+ $p =~ s/^\tmovl\s+\%esi,\s*\d*\(\%esp\)\n//;
+ $p =~ s/^\tmovl\s+\%edi,\s*\d*\(\%esp\)\n//;
$p =~ s/^\tsubl\s+\$\d+,\s*\%esp\n//;
$p =~ s/^\tmovl\s+\$\d+,\s*\%eax\n\tcall\s+__alloca\n// if ($TargetPlatform =~ /^.*-cygwin32/);
# GCC 3.1 is in the habit of adding spurious writes to the
# stack in the prologue. Just to be on the safe side,
# chuck these over the fence into the main code.
$p =~ s/^\tsubl\s+\$\d+,\s*\%esp\n//;
$p =~ s/^\tmovl\s+\$\d+,\s*\%eax\n\tcall\s+__alloca\n// if ($TargetPlatform =~ /^.*-cygwin32/);
# GCC 3.1 is in the habit of adding spurious writes to the
# stack in the prologue. Just to be on the safe side,
# chuck these over the fence into the main code.
- while ($p =~ /^\tmovl\s+(\$\d+|\%edi),\s*\d*\(\%esp\)\n/) {
+ while ($p =~ /^\tmovl\s+\$\d+,\s*\d*\(\%esp\)\n/) {
# print "Spurious instruction: $&";
$p = $` . $';
$r = $& . $r;
# print "Spurious instruction: $&";
$p = $` . $';
$r = $& . $r;