[project @ 2002-03-01 09:47:39 by simonmar]
[ghc-hetmet.git] / ghc / driver / mangler / ghc-asm.lprl
index 0b1ae8c..3f21c89 100644 (file)
@@ -598,8 +598,9 @@ sub mangle_asm {
            local($thing);
            chop($thing = $_);
            print STDERR "Funny global thing?: $_"
-               unless $KNOWN_FUNNY_THING{$thing}
-                   || /^${T_US}stg_.*${T_POST_LBL}$/o          # RTS internals
+               unless # $KNOWN_FUNNY_THING{$thing}
+                      /^${T_US}stg_.*${T_POST_LBL}$/o          # RTS internals
+                   || /^${T_US}__stg_.*${T_POST_LBL}$/o        # more RTS internals
                    || /^${T_US}__fexp_.*${T_POST_LBL}$/o       # foreign export
                    || /^${T_US}__stginit.*${T_POST_LBL}$/o     # __stginit<module>
                    || /^${T_US}.*_btm${T_POST_LBL}$/o          # large bitmaps
@@ -1303,14 +1304,14 @@ sub print_doctored {
 
     if ($StolenX86Regs <= 2 ) { # YURGH! spurious uses of esi?
        s/^\tmovl\s+(.*),\s*\%esi\n\tjmp\s+\*%esi\n/\tmovl $1,\%eax\n\tjmp \*\%eax\n/g;
-       s/^\tjmp\s+\*(-?\d*)\((.*\%esi.*)\)\n/\tmovl $2,\%eax\n\tjmp \*$1\(\%eax\)\n/g;
+       s/^\tjmp\s+\*(.*\(.*\%esi.*\))\n/\tmovl $1,\%eax\n\tjmp \*\%eax\n/g;
        s/^\tjmp\s+\*\%esi\n/\tmovl \%esi,\%eax\n\tjmp \*\%eax\n/g;
        die "$Pgm: (mangler) still have jump involving \%esi!\n$_"
            if /(jmp|call)\s+.*\%esi/;
     }
     if ($StolenX86Regs <= 3 ) { # spurious uses of edi?
        s/^\tmovl\s+(.*),\s*\%edi\n\tjmp\s+\*%edi\n/\tmovl $1,\%eax\n\tjmp \*\%eax\n/g;
-       s/^\tjmp\s+\*(-?\d*\(.*\%edi.*\))\n/\tmovl $1,\%eax\n\tjmp \*\%eax\n/g;
+       s/^\tjmp\s+\*(.*\(.*\%edi.*\))\n/\tmovl $1,\%eax\n\tjmp \*\%eax\n/g;
        s/^\tjmp\s+\*\%edi\n/\tmovl \%edi,\%eax\n\tjmp \*\%eax\n/g;
        die "$Pgm: (mangler) still have jump involving \%edi!\n$_"
            if /(jmp|call)\s+.*\%edi/;