Hello,
On Thursday 09 August 2007 12:23, Simon Marlow wrote:
> ...
> gcc seems to be putting these instructions in the prologue for certain 
> functions in AutoApply.hc:
> 
>       pushl   %ebp
>       movl    %esp, %ebp
> 
> but it shouldn't be, because we're using -fomit-frame-pointer.  I don't 
> understand why gcc is doing this for only some of the functions, e.g. it 
> happens for stg_ap_pppv_ret but not stg_ap_ppp_ret.  Bizarre.  I can't wait 
> until we can drop -fvia-C.
> 
> One workaround might be to compile AutoApply using -fasm.  Can you check 
> whether this works for you?

Here is a simple experiment:

> $ cd rts
> $ ../compiler/ghc-inplace -H16m -O  -static -I../gmp/gmpbuild -I. -#include 
HCIncludes.h -fvia-C -dcmm-lint  -hisuf debug_hi -hcsuf debug_hc -osuf 
debug_o -optc-DDEBUG   -c AutoApply_debug.cmm -o AutoApply_debug.debug_o
> Prologue junk?: .globl stg_ap_p_ret
>         .type   stg_ap_p_ret, @function
> stg_ap_p_ret:
>         pushl   %ebp
>         movl    %esp, %ebp
> 
> $ ../compiler/ghc-inplace -H16m -O  -static -I../gmp/gmpbuild -I. -#include 
HCIncludes.h -fasm -dcmm-lint  -hisuf debug_hi -hcsuf debug_hc -osuf debug_o 
-optc-DDEBUG   -c AutoApply_debug.cmm -o AutoApply_debug.debug_o
> $

So with -fasm, the compile succeeds.

In view of:

> $ grep -B1 fvia-C Makefile
> # Cmm must be compiled via-C for now, because the NCG can't handle loops
> SRC_HC_OPTS += -fvia-C
> $

I guess I would need some guidance to proceed beyond this.

> 
> If you have other versions of gcc available, could you test them too?

Unfortunately, I have no alternative gccs easily available, although with 
additional effort, I presume that I could get some. The one I use is:

> $ gcc --version
> gcc (GCC) 4.0.2 20050901 (prerelease) (SUSE Linux)
> Copyright (C) 2005 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> $

> ...

Best regards
Thorkil

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to