Subject: Re: amd64 alignment problem - gcc's fault or libpthread's?
To: Frank van der Linden <fvdl@NetBSD.org>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
Date: 02/28/2004 18:15:09
One more problem:
Argument passing by setcontext() is broken -- the fast
syscall path clobbers %rcx, which is needed by the
sysret insn as return PC argument.
So the fourth argument isn't passed correctly to the
new context. (can be verified by regress/lib/libc/context)
I can imagine 2 ways to fix this: change makecontext() to put
a trampoline between the setcontext() syscall and the real
function, or use OSYSCALL.