[project @ 2000-08-04 23:31:43 by lewie]
[ghc-hetmet.git] / ghc / driver / mangler / ghc-asm.lprl
index 29a6894..605b6c2 100644 (file)
@@ -126,7 +126,7 @@ sub init_TARGET_STUFF {
     $T_HDR_direct   = "\t.SPACE \$TEXT\$\n\t.SUBSPA \$CODE\$\n\t\.align 4\n";
 
     #--------------------------------------------------------#
-    } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd2|netbsd|nextstep3|cygwin32|mingw32)$/ ) {
+    } elsif ( $TargetPlatform =~ /^i386-.*-(linuxaout|freebsd2|netbsd|openbsd|nextstep3|cygwin32|mingw32)$/ ) {
                                # NeXT added but not tested. CaS
 
     $T_STABBY      = 1; # 1 iff .stab things (usually if a.out format)
@@ -733,6 +733,7 @@ sub mangle_asm {
                    $e =~ s/^\tret\n//;
                    $e =~ s/^\tpopl \%edi\n//;
                    $e =~ s/^\tpopl \%esi\n//;
+                   $e =~ s/^\tpopl \%edx\n//;
                    $e =~ s/^\tpopl \%ecx\n//;
                    $e =~ s/^\taddl \$\d+,\%esp\n//;
                    $e =~ s/^\tsubl \$-\d+,\%esp\n//;
@@ -815,7 +816,7 @@ sub mangle_asm {
            #    blah_closure:
            #           ...
             #
-           if ( $TargetPlatform =~ /^i386/ && $to_move =~ /$TCOPYDIRVS/ ) {
+           if ( $TargetPlatform =~ /^(i386|sparc)/ && $to_move =~ /$TCOPYDIRVS/ ) {
                $j = $i + 1;
                while ( $j < $numchks  && $chk[$j] =~ /$T_CONST_LBL/) {
                        $j++;