x86 64 bit function argument bug?
Stephen Biggs
xyzzy@hotpop.com
Sun May 4 15:40:00 GMT 2003
On Sun, 2003-05-04 at 11:54, Falk Hueffner wrote:
> Stephen Biggs <xyzzy@hotpop.com> writes:
>
> > I want to take an address of an argument and dereference it to
> > access the value that is passed to a function on the stack.
>
> That should work just fine. If it doesn't, it's a bug.
Ah, now we understand each other. I am saying that the x86 behavior for
64 bit value arguments is a bug.
>
> Note that many architectures don't actually pass arguments on the
> stack; but if you take the address of an argument, it's pushed there.
>
> > Basically I am trying to do varargs/stdarg without using varargs or
> > any built-in functions.
>
> That is impossible to do portably.
Granted. I would be satisfied with it working in GCC, and it does on
the x86 except for 64 bit values.
>
> --
> Falk
>
More information about the Gcc
mailing list