[project @ 2005-06-03 10:20:34 by simonmar]
authorsimonmar <unknown>
Fri, 3 Jun 2005 10:20:34 +0000 (10:20 +0000)
committersimonmar <unknown>
Fri, 3 Jun 2005 10:20:34 +0000 (10:20 +0000)
Allow calls to __alloca in the prologue on mingw32 (previously only
allowed for cygwin32, I guess it hasn't happened for a while).

ghc/driver/mangler/ghc-asm.lprl

index 493c6e3..007acca 100644 (file)
@@ -790,7 +790,7 @@ sub mangle_asm {
                    $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/);
+                    $p =~ s/^\tmovl\s+\$\d+,\s*\%eax\n\tcall\s+__alloca\n// if ($TargetPlatform =~ /^.*-(cygwin32|mingw32)/);
 
                    # GCC 3.1 is in the habit of adding spurious writes to the
                    # stack in the prologue.  Just to be on the safe side,