On Mon, Oct 20, 2008 at 10:11:22PM +0100, Charles Forsyth wrote:
> >Forgive my ignorance, but I don't see how the code in question relates to
> >returning a 64-bit value?
>                               MOVL a+0(FP),CX
>                               MOVL AX,0(CX)
>                               MOVL AX,4(CX)
> 
> that's how a 64-bit value is returned on 32-bit machines:
> similar to returning a structure, the caller passes a
> hidden first argument referring to the 64-bit return location.
> in this case, since -1 is already in AX, storing that in both 32-bit
> parts of the 64-bit value produces -1LL

Oh interesting.  Thanks for the clarification.  I had thought 64 bit returns
were done in %eax and %edx.  Sorry for the noise.
--nwf;

Attachment: pgpVGORaEWHuG.pgp
Description: PGP signature

Reply via email to