[project @ 1999-08-02 10:35:53 by simonmar]
[ghc-hetmet.git] / ghc / driver / ghc-asm.lprl
index 9fa847f..70f500d 100644 (file)
@@ -265,7 +265,7 @@ sub init_TARGET_STUFF {
     $T_COPY_DIRVS   = '\.(global|proc|stab)';
 
     $T_hsc_cc_PAT   = '\.asciz.*\)(hsc|cc) (.*)\\\\t(.*)"';
-    $T_DOT_WORD            = '\.(word|byte|half|skip)';
+    $T_DOT_WORD            = '\.(word|byte|half|skip|uahalf|uaword)';
     $T_DOT_GLOBAL   = '^\t\.global';
     $T_HDR_literal  = "\.text\n\t\.align 8\n";
     $T_HDR_misc            = "\.text\n\t\.align 4\n";
@@ -644,6 +644,7 @@ sub mangle_asm {
                if ($TargetPlatform =~ /^i386-/) {
                    $p =~ s/^\tpushl \%edi\n//;
                    $p =~ s/^\tpushl \%esi\n//;
+                   $p =~ s/^\tpushl \%ebx\n//;
                    $p =~ s/^\tsubl \$\d+,\%esp\n//;
                     $p =~ s/^\tmovl \$\d+,\%eax\n\tcall __alloca\n// if ($TargetPlatform =~ /^.*-cygwin32/);
                } elsif ($TargetPlatform =~ /^m68k-/) {
@@ -969,7 +970,7 @@ sub mangle_asm {
                   $chk[$infochk{$symb}] =~ s/\.long ([A-Za-z]\S+_upd)/\.long \.\1/;
                   print OUTASM $chk[$infochk{$symb}];
                 } else {
-               print OUTASM &rev_tbl($symb, $chk[$infochk{$symb}], 1);
+                 print OUTASM &rev_tbl($symb, $chk[$infochk{$symb}], 1);
                 }
                # entry code will be put here!
 
@@ -1216,7 +1217,7 @@ sub print_doctored {
     }
     if ($StolenX86Regs <= 3 ) { # spurious uses of edi?
        s/^\tmovl (.*),\%edi\n\tjmp \*%edi\n/\tmovl $1,\%eax\n\tjmp \*\%eax\n/g;
-       s/^\tjmp \*(-?\d*)\((.*\%edi.*)\)\n/\tmovl $2,\%eax\n\tjmp \*$1\(\%eax\)\n/g;
+       s/^\tjmp \*(-?\d*\(.*\%edi.*\))\n/\tmovl $1,\%eax\n\tjmp \*\%eax\n/g;
        s/^\tjmp \*\%edi\n/\tmovl \%edi,\%eax\n\tjmp \*\%eax\n/g;
        die "$Pgm: (mangler) still have jump involving \%edi!\n$_"
            if /(jmp|call) .*\%edi/;