Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Nov 2006 18:42:07 +1030
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        cvs-all@freebsd.org
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, Bruce Evans <bde@zeta.org.au>, Yar Tikhiy <yar@comp.chem.msu.su>, Marcel Moolenaar <xcllnt@mac.com>, phk@phk.freebsd.dk, jkoshy@freebsd.org, "M. Warner Losh" <imp@bsdimp.com>
Subject:   Re: cvs commit: src/include ar.h
Message-ID:  <200611191842.17673.doconnor@gsoft.com.au>
In-Reply-To: <1F361437-69AC-4823-8FF8-506EA450ED2F@mac.com>
References:  <20061117201432.X11101@delplex.bde.org> <20061118202125.GD80527@comp.chem.msu.su> <1F361437-69AC-4823-8FF8-506EA450ED2F@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart2746598.ikxr8ezVT5
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Sunday 19 November 2006 07:35, Marcel Moolenaar wrote:
> Also, since this discussion is the result of ARM aligning structures
> on 4-byte boundaries, I think that the use of __packed to compensate
> for excessive alignment is just plain wrong. We have __aligned(x) to
> inform the compiler about what the alignment of an object should be
> and that's the tool we should use to tell the compiler on ARM that
> we in fact want 1-byte alignment. take for example, the following
> structure:

Just a quick point..
__aligned__ only specified a minimum packing requirement - there is no way =
to=20
specify a maximum (I believe)

If the underlying problem IS too large an alignment then you're screwed if =
you=20
want a reasonably portable solution.. Perhaps __packed__ convinces the=20
compiler to reduce alignment.

=2D-=20
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C

--nextPart2746598.ikxr8ezVT5
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD4DBQBFYBHh5ZPcIHs/zowRAqa1AJ9O0onypmd6m/5DStp7JPqrMSvEcACYkXYr
A8/5vuIPucCyuFfhgGeMog==
=DdMO
-----END PGP SIGNATURE-----

--nextPart2746598.ikxr8ezVT5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611191842.17673.doconnor>