On Fri, 22 Feb 2002, Simon Marlow wrote:
> > | srRN_ret:
> > | movl %esi, %eax
> > | andl 8(%ebp), %eax
> > | cmpl 4(%ebp), %eax
> > | setne %al # al = eax==4(ebp) ? 1 :
> > 0
> > | movzbl %al, %edi # edi is 0 or 1
> > | addl $12, %ebp
> > | movl GHCziBase_Bool_closure_tbl(,%edi,4), %esi
> > | sall $2, %edi # edi is 0 or 4
> > | negl %edi # edi is 0 or -4
> > | jmp *stg_upd_frame_info-16(%edi)
> >
> > Thing is, it beats me how gcc thought %edi was available for
> > allocation,
> > unless -monly[234]-regs was in effect at the time.
>
> Data.Array.Base is compiled with -monly-3-regs.
>
> This looks like paranoia on the part of the mangler - I'll bet this
> error could just be disabled and things would work. Nick: would you
> like to try that?
I commented out this block at line 1312:
# if ($StolenX86Regs <= 3 ) { # spurious uses of edi?
# s/^\tmovl\s+(.*),\s*\%edi\n\tjmp\s+\*%edi\n/\tmovl $1,\%eax\n\tjmp
\*\%e
ax\n/g;
# s/^\tjmp\s+\*(-?\d*\(.*\%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/;
# }
and tried again:
ARGH! Jump uses %edi with -monly-3-regs:
etc
then commented out this block at 1365:
} #elsif ($StolenX86Regs == 3 ) {
# die "ARGH! Jump uses \%edi with -monly-3-regs:\n$_"
# if /^\t(jmp|call)\s+.*\%edi/;
# }
and it compiled fine. I tested (very thoroughly!) it with
nofib/imaginary/paraffins/Main.hs which imports Array, and it got the
right answer.
--
Nick Nethercote
[EMAIL PROTECTED]
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs