From: wolfgang Date: Fri, 24 Sep 2004 16:29:33 +0000 (+0000) Subject: [project @ 2004-09-24 16:29:33 by wolfgang] X-Git-Tag: Initial_conversion_from_CVS_complete~1579 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=d190e1a165a38867159b6630d4f86e17ba59c7e2 [project @ 2004-09-24 16:29:33 by wolfgang] PowerPC/Mac OS X: Improve epilogue mangling. This became necesssary because the new CG may "fall through" for cases in a switch that are known to never happen, so GCC generates the epilogue code again. With the previous CG, GCC never generated any epilog code, because every function ended with an unconditional tail jump. --- diff --git a/ghc/driver/mangler/ghc-asm.lprl b/ghc/driver/mangler/ghc-asm.lprl index 20c6268..be72f7f 100644 --- a/ghc/driver/mangler/ghc-asm.lprl +++ b/ghc/driver/mangler/ghc-asm.lprl @@ -851,8 +851,8 @@ sub mangle_asm { $e =~ s/^\tj\t\$31\n//; } elsif ($TargetPlatform =~ /^powerpc-apple-.*/) { $e =~ s/^\taddi r1,r1,\d+\n//; - $e =~ s/^\tcal r1,\d+\(r1\)\n//; - $e =~ s/^\tlw?z? r\d+,\d+\(r1\)\n//; + $e =~ s/^\tlwz r\d+,\d+\(r1\)\n//; + $e =~ s/^\tlmw r\d+,-\d+\(r1\)\n//; $e =~ s/^\tmtlr r0\n//; $e =~ s/^\tblr\n//; $e =~ s/^\tb restFP ;.*\n//;