Date: Mon, 24 Feb 2003 21:53:49 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Marcel Moolenaar <marcel@FreeBSD.org> Cc: src-committers@FreeBSD.org, <cvs-src@FreeBSD.org>, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/bin/sh machdep.h memalloc.c nodes.c.pat Message-ID: <20030224214010.I6444-100000@gamplex.bde.org> In-Reply-To: <200302240807.h1O875e2058863@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 24 Feb 2003, Marcel Moolenaar wrote: > marcel 2003/02/24 00:07:05 PST > > Modified files: > bin/sh memalloc.c nodes.c.pat > Removed files: > bin/sh machdep.h > Log: > Third attempt at removing machdep.h and using ALIGN from <sys/param.h>. > The initial stack_block is staticly allocated and will be aligned > according to the alignment requirements of pointers, which does not > necessarily match the alignment enforced by ALIGN. To solve this a > more involved change is required: remove the static initial stack > and deal with an initial condition of not having a stack at all. This > change is therefore more risky than the previous ones, but unavoidable > (other than not using the platform default alignment). You could align the statically allocated stack (struct) using the standard hack of putting a field that needs strictest alignment in it: struct stack_block { struct stack_block *prev; aligned_t space; char morespace[MINSIZE - sizeof(aligned_t)]; }; where [_]aligned_t is defined by MD magic (involving the aligned attribute in the gcc case) near the definition of [_]ALIGN(). `morespace' may have the wrong size here (it may be affected by unnamed padding before `space'...) but it has a bogus Ultrixified value anyway). 512 for the whole struct might be better. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-src" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030224214010.I6444-100000>