[project @ 1997-01-03 03:08:51 by sof]
authorsof <unknown>
Fri, 3 Jan 1997 03:08:51 +0000 (03:08 +0000)
committersof <unknown>
Fri, 3 Jan 1997 03:08:51 +0000 (03:08 +0000)
Groks output from cygwin32-gcc

ghc/driver/ghc-asm.lprl

index eded9b3..caea5ea 100644 (file)
@@ -104,7 +104,7 @@ sub init_TARGET_STUFF {
     $T_HDR_direct   = "\t.SPACE \$TEXT\$\n\t.SUBSPA \$CODE\$\n\t\.align 4\n";
 
     #--------------------------------------------------------#
-    } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd)/ ) {
+    } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd|cygwin32)/ ) {
 
     $T_STABBY      = 1; # 1 iff .stab things (usually if a.out format)
     $T_US          = '_'; # _ if symbols have an underscore on the front
@@ -119,6 +119,7 @@ sub init_TARGET_STUFF {
     $T_MOVE_DIRVS   = '^(\s*(\.align\s+\d+(,0x90)?|\.globl\s+\S+|\.text|\.data|\.stab[^n].*|\.type\s+.*|\.size\s+.*)\n)';
     $T_COPY_DIRVS   = '\.(globl|stab)';
     $T_hsc_cc_PAT   = '\.ascii.*\)(hsc|cc) (.*)\\\\11"\n\t\.ascii\s+"(.*)\\\\0"';
+    $T_hsc_cc_PAT   = '\.ascii.*\)(hsc|cc) (.*)\\11"\n\t\.ascii\s+"(.*)\\0"' if ($TargetPlatform =~ /^.*-cygwin32/ );
     $T_DOT_WORD            = '\.long';
     $T_DOT_GLOBAL   = '\.globl';
     $T_HDR_literal  = "\.text\n\t\.align 2\n";
@@ -567,6 +568,7 @@ sub mangle_asm {
                    $p =~ s/^\tpushl \%edi\n//;
                    $p =~ s/^\tpushl \%esi\n//;
                    $p =~ s/^\tsubl \$\d+,\%esp\n//;
+                    $p =~ s/^\tmovl \$\d+,\%eax\n\tcall __alloca\n// if ($TargetPlatform =~ /^.*-cygwin32/);
                } elsif ($TargetPlatform =~ /^m68k-/) {
                    $p =~ s/^\tlink a6,#-?\d.*\n//;
                    $p =~ s/^\tmovel d2,sp\@-\n//;