[project @ 2005-06-03 10:08:55 by simonmar]
authorsimonmar <unknown>
Fri, 3 Jun 2005 10:08:55 +0000 (10:08 +0000)
committersimonmar <unknown>
Fri, 3 Jun 2005 10:08:55 +0000 (10:08 +0000)
Check for reserved stack space blown.

ghc/driver/mangler/ghc-asm.lprl

index 935b2a4..493c6e3 100644 (file)
@@ -778,6 +778,12 @@ sub mangle_asm {
                $r =~ s/^\s*\n//;
 
                if ($TargetPlatform =~ /^i386-/) {
+                   if ($p =~ /^\tsubl\s+\$(\d+),\s*\%esp\n/) {
+                       if ($1 >= 8192) {
+                           die "Error: reserved stack space exceeded!\n  Possible workarounds: compile with -fasm, or try another version of gcc.\n"
+                       }
+                   }
+
                    $p =~ s/^\tpushl\s+\%edi\n//;
                    $p =~ s/^\tpushl\s+\%esi\n//;
                    $p =~ s/^\tpushl\s+\%ebx\n//;