From owner-cvs-all Mon Feb 24 2:52:42 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C3FB237B401; Mon, 24 Feb 2003 02:52:39 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC9FC43F75; Mon, 24 Feb 2003 02:52:37 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id VAA02398; Mon, 24 Feb 2003 21:52:35 +1100 Date: Mon, 24 Feb 2003 21:53:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Marcel Moolenaar Cc: src-committers@FreeBSD.org, , Subject: Re: cvs commit: src/bin/sh machdep.h memalloc.c nodes.c.pat In-Reply-To: <200302240807.h1O875e2058863@repoman.freebsd.org> Message-ID: <20030224214010.I6444-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 . > 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-all" in the body of the message