In Oct 1997 I mailed the following bug report:

> [...]
>   * During the compilation of the _mg-versions of the libs the
>     assembler mangler complains about 5500 times. It's totally
>     unclear to me what it means: bug/warning/error?   Example:
> [...]

Sigbjorn replied:

> [...]
> gcc generates code which jumps via %ecx for some reason when compiling
> gransim code, something that isn't caught by the mangler. Patch appended.
> [...]

The problem pops up again during the compilation of the 3.01 libraries.

\begin{WildGuess}
   But this time it seems to be %esi (see attachment). Probable patch:

*** ghc-asm.lprl.~1~    Mon Mar 16 15:25:09 1998
--- ghc-asm.lprl        Mon Mar 16 15:25:55 1998
***************
*** 978,983 ****
--- 978,984 ----
                        $c =~ s/^\tmovl \$${T_US}${symb}_fast\d+,\%edx\n\tjmp 
\*\%edx\n//;
                        $c =~ s/^\tmovl \$${T_US}${symb}_fast\d+,\%ecx\n\tjmp 
\*\%ecx\n//;
                        $c =~ s/^\tmovl \$${T_US}${symb}_fast\d+,\%eax\n\tjmp 
\*\%eax\n//;
+                       $c =~ s/^\tmovl \$${T_US}${symb}_fast\d+,\%esi\n\tjmp 
+\*\%esi\n//;
                    } elsif ( $TargetPlatform =~ /^mips-/ ) {
                        $c =~ s/^\tjmp \$31,\(\$27\),0\n\t\.align 4\n\t\.end/\t.align 
4\n\t.end/;
                    } elsif ( $TargetPlatform =~ /^m68k-/ ) {
\end{WildGuess}

Because I don't really have a clue if this is correct, some soothing
words from Glasgow would be helpful...   :-]

-- 
Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67
mailto:[EMAIL PROTECTED]            D-80538 Muenchen
http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne
../../../ghc/driver/ghc -O -H32m -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing -O 
-split-objs -odir PrelArr -hisuf mg_hi -gransim -monly-2-regs -H8m  -c PrelArr.lhs -o 
PrelArr.mg_o -osuf mg_o
ghc: ignoring heap-size-setting option (-H8m)...not the largest seen
ghc: ignoring heap-size-setting option (-H8m)...not the largest seen
Warning: GENERATE_SPECS pre-processing pragma ignored:
  {-# GENERATE_SPECS array a{~,Int,IPr} b{} #-}
Warning: GENERATE_SPECS pre-processing pragma ignored:
  {-# GENERATE_SPECS (!) a{~,Int,IPr} b{} #-}
Warning: GENERATE_SPECS pre-processing pragma ignored:
  {-# GENERATE_SPECS (//) a{~,Int,IPr} b{} #-}
Warning: GENERATE_SPECS pre-processing pragma ignored:
  {-# GENERATE_SPECS accum a{~,Int,IPr} b{} c{} #-}
Warning: GENERATE_SPECS pre-processing pragma ignored:
  {-# GENERATE_SPECS accumArray a{~,Int,IPr} b{} c{} #-}

NOTE: Simplifier still going after 4 iterations; bailing out.

NOTE: Simplifier still going after 4 iterations; bailing out.

NOTE: Simplifier still going after 4 iterations; bailing out.
<<ghc: 258735300 bytes, 27 GCs, 4143132/4232008 avg/max bytes residency (2 samples), 
0.01 INIT (0.00 elapsed), 12.72 MUT (13.61 elapsed), 4.60 GC (5.02 elapsed) :ghc>>
ghc: module version changed to 1; reason: no old .hi file
still has jump to fast entry point:
.globl PrelArr_Z36wZdZd_entry
PrelArr_Z36wZdZd_entry:
        movl CurrentProc,%eax
        movl CurrentTime(,%eax,4),%eax
        cmpl %eax,EndOfTimeSlice
        jbe .L7512
        cmpl %eax,TimeOfNextEvent
        ja .L7509
        cmpl $0,TimeOfNextEvent
        je .L7509
        cmpl $0,IgnoreEvents
        jne .L7509
.L7512:
        pushl $0
        call Yield_wrapper
        addl $4,%esp
.L7509:
        movl 64(%ebx),%eax
        addl $24,%eax
        cmpl %eax,68(%ebx)
        jae .L7514
        movl $PrelArr_Z36wZdZd_closure,32(%ebx)
        movl $UpdatePAP,%esi
        jmp *%esi
        .align 16
.L7514:
        movl 64(%ebx),%eax
        movl (%eax),%eax
        movl %eax,32(%ebx)
        movl 64(%ebx),%eax
        movl 4(%eax),%eax
        movl %eax,36(%ebx)
        movl 64(%ebx),%eax
        movl 8(%eax),%eax
        movl %eax,40(%ebx)
        movl 64(%ebx),%eax
        movl 12(%eax),%eax
        movl %eax,44(%ebx)
        movl 64(%ebx),%eax
        movl 16(%eax),%eax
        movl %eax,48(%ebx)
        movl 64(%ebx),%eax
        movl 20(%eax),%eax
        movl %eax,52(%ebx)
        addl $24,64(%ebx)
        movl RTSflags+184,%edx
        leal (%edx,%edx,4),%edx
        movl RTSflags+188,%esi
        movl %esi,%eax
        addl %esi,%eax
        addl %eax,%edx
        movl RTSflags+192,%eax
        leal (%eax,%eax,4),%ecx
        addl %ecx,%eax
        addl %eax,%edx
        movl CurrentTSO,%eax
        addl %edx,76(%eax)
        movl CurrentProc,%eax
        addl %edx,CurrentTime(,%eax,4)
        movl $PrelArr_Z36wZdZd_fast6,%esi
        jmp *%esi
still has jump to fast entry point:
.globl PrelArr_Z36waccum_entry
PrelArr_Z36waccum_entry:
        movl CurrentProc,%eax
        movl CurrentTime(,%eax,4),%eax
        cmpl %eax,EndOfTimeSlice
        jbe .L7664
        cmpl %eax,TimeOfNextEvent
        ja .L7661
        cmpl $0,TimeOfNextEvent
        je .L7661
        cmpl $0,IgnoreEvents
        jne .L7661
.L7664:
        pushl $0
        call Yield_wrapper
        addl $4,%esp
.L7661:
        movl 64(%ebx),%eax
        addl $24,%eax
        cmpl %eax,68(%ebx)
        jae .L7666
        movl $PrelArr_Z36waccum_closure,32(%ebx)
        movl $UpdatePAP,%esi
        jmp *%esi
        .align 16
.L7666:
        movl 64(%ebx),%eax
        movl (%eax),%eax
        movl %eax,32(%ebx)
        movl 64(%ebx),%eax
        movl 4(%eax),%eax
        movl %eax,36(%ebx)
        movl 64(%ebx),%eax
        movl 8(%eax),%eax
        movl %eax,40(%ebx)
        movl 64(%ebx),%eax
        movl 12(%eax),%eax
        movl %eax,44(%ebx)
        movl 64(%ebx),%eax
        movl 16(%eax),%eax
        movl %eax,48(%ebx)
        movl 64(%ebx),%eax
        movl 20(%eax),%eax
        movl %eax,52(%ebx)
        addl $24,64(%ebx)
        movl RTSflags+184,%edx
        leal (%edx,%edx,4),%edx
        movl RTSflags+188,%esi
        movl %esi,%eax
        addl %esi,%eax
        addl %eax,%edx
        movl RTSflags+192,%eax
        leal (%eax,%eax,4),%ecx
        addl %ecx,%eax
        addl %eax,%edx
        movl CurrentTSO,%eax
        addl %edx,76(%eax)
        movl CurrentProc,%eax
        addl %edx,CurrentTime(,%eax,4)
        movl $PrelArr_Z36waccum_fast6,%esi
        jmp *%esi
still has jump to fast entry point:
.globl PrelArr_Z36waccumArray_entry
PrelArr_Z36waccumArray_entry:
        movl CurrentProc,%eax
        movl CurrentTime(,%eax,4),%eax
        cmpl %eax,EndOfTimeSlice
        jbe .L7825
        cmpl %eax,TimeOfNextEvent
        ja .L7822
        cmpl $0,TimeOfNextEvent
        je .L7822
        cmpl $0,IgnoreEvents
        jne .L7822
.L7825:
        pushl $0
        call Yield_wrapper
        addl $4,%esp
.L7822:
        movl 64(%ebx),%eax
        addl $24,%eax
        cmpl %eax,68(%ebx)
        jae .L7827
        movl $PrelArr_Z36waccumArray_closure,32(%ebx)
        movl $UpdatePAP,%esi
        jmp *%esi
        .align 16
.L7827:
        movl 64(%ebx),%eax
        movl (%eax),%eax
        movl %eax,32(%ebx)
        movl 64(%ebx),%eax
        movl 4(%eax),%eax
        movl %eax,36(%ebx)
        movl 64(%ebx),%eax
        movl 8(%eax),%eax
        movl %eax,40(%ebx)
        movl 64(%ebx),%eax
        movl 12(%eax),%eax
        movl %eax,44(%ebx)
        movl 64(%ebx),%eax
        movl 16(%eax),%eax
        movl %eax,48(%ebx)
        movl 64(%ebx),%eax
        movl 20(%eax),%eax
        movl %eax,52(%ebx)
        addl $24,64(%ebx)
        movl RTSflags+184,%edx
        leal (%edx,%edx,4),%edx
        movl RTSflags+188,%esi
        movl %esi,%eax
        addl %esi,%eax
        addl %eax,%edx
        movl RTSflags+192,%eax
        leal (%eax,%eax,4),%ecx
        addl %ecx,%eax
        addl %eax,%edx
        movl CurrentTSO,%eax
        addl %edx,76(%eax)
        movl CurrentProc,%eax
        addl %edx,CurrentTime(,%eax,4)
        movl $PrelArr_Z36waccumArray_fast6,%esi
        jmp *%esi

Reply via email to