[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FW: RE: x86_64 port



On Mon, Mar 07, 2005 at 04:59:38PM -0000, Simon Marlow wrote:

> The mystery as to why this doesn't affect us on x86 is solved: on x86 we
> generate slightly different C code, including a dummy function call:
> 
> extern void g(void);
> static void f(void) {
>   R1 = g;
>   dummy();
>   goto *R1;
> }
> 
> the call to dummy() (which we filter out from the assembly later) is
> enough to force gcc to emit the assignment to R1.  That dummy function
> call has been there for ever, and the original reason for it has been
> lost in the mists of time... comments in the source code seemed to
> indicate that it was probably not necessary any more, so for x86_64 I
> removed it.  It looks like I'll have to reinstate it to work around this
> bug, though.

gcc 3.3.4 on AMD64 appears to generate correct code when the dummy call is
present.  Ick.

Dave



Reply to: