From: simonmar Date: Fri, 1 Mar 2002 09:47:39 +0000 (+0000) Subject: [project @ 2002-03-01 09:47:39 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~2328 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=8f09c1622d17b14597d08f5b32bf4bb2ec3edaa1;p=ghc-hetmet.git [project @ 2002-03-01 09:47:39 by simonmar] Generalise a couple of regexps in the -monly-[23]-regs patching code. Should fix problems with gcc 3.0.4. --- diff --git a/ghc/driver/mangler/ghc-asm.lprl b/ghc/driver/mangler/ghc-asm.lprl index d0763f8..3f21c89 100644 --- a/ghc/driver/mangler/ghc-asm.lprl +++ b/ghc/driver/mangler/ghc-asm.lprl @@ -1304,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/;