From 8f09c1622d17b14597d08f5b32bf4bb2ec3edaa1 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 1 Mar 2002 09:47:39 +0000 Subject: [PATCH] [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. --- ghc/driver/mangler/ghc-asm.lprl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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/; -- 1.7.10.4