Subject: Re: amd64 alignment problem - gcc's fault or libpthread's?
To: Matthias Drochner <M.Drochner@fz-juelich.de>
From: Frank van der Linden <fvdl@netbsd.org>
List: tech-toolchain
Date: 02/27/2004 18:17:15
On Fri, Feb 27, 2004 at 05:49:04PM +0100, Matthias Drochner wrote:
> Index: arch/x86_64/gen/makecontext.c
> ===================================================================
> RCS file: /cvsroot/src/lib/libc/arch/x86_64/gen/makecontext.c,v
> retrieving revision 1.1
> diff -u -r1.1 makecontext.c
> --- arch/x86_64/gen/makecontext.c	30 Jan 2003 02:07:31 -0000	1.1
> +++ arch/x86_64/gen/makecontext.c	27 Feb 2004 16:45:16 -0000
> @@ -69,7 +69,7 @@
>  	    ((uintptr_t)ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
>  
>  	/* LINTED uintptr_t is safe */
> -	sp  = (uintptr_t *)(((uintptr_t)sp & ~15) - 8);
> +	sp  = (uintptr_t *)(((uintptr_t)sp & ~15));
>  	sp--;
>  	if (stackargs > 0)
>  		sp -= stackargs;

If the libpthread regression tests work with this change, go ahead
and check it in..

- Frank