Date: Mon, 31 Jul 2006 11:14:33 +0200 From: "Matt Sealey" <matt@genesi-usa.com> To: "'Marcel Moolenaar'" <marcel@xcllnt.net>, <ppc@FreeBSD.org> Subject: RE: Definition of _ALIGNBYTES Message-ID: <001801c6b481$bf8f0580$99dfdfdf@bakuhatsu.net> In-Reply-To: <CF6F2FC3-73E4-4A29-AA5A-0B85CE89521C@xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Does FreeBSD support AltiVec usage in the kernel? If so _ALIGNBYTES may as well be 15, otherwise you would spend all your life realigning vector data if you ever wanted to use it :) Actually in all seriousness, 3 is right. If you longword align all your data, any misalignment is handled in hardware (fairly fast too). If you are trying to get some serious performance out of things you would probably want to 8-byte align your floating point values, and 16-byte align your vector values, and you can do this manually at the time you need it. Otherwise, aligning everything to a 4-byte boundary is just fine and dandy. -- Matt Sealey <matt@genesi-usa.com> Manager, Genesi, Developer Relations > -----Original Message----- > From: owner-freebsd-ppc@freebsd.org > [mailto:owner-freebsd-ppc@freebsd.org] On Behalf Of Marcel Moolenaar > Sent: Saturday, July 29, 2006 10:10 PM > To: ppc@FreeBSD.org > Subject: Definition of _ALIGNBYTES > > All, > > In /usr/include/sys/param.h (or > src/sys/powerpc/include/param.h), _ALIGNBYTES is defined as > (sizeof(int) - 1), or 3. It is supposed to represent the mask > used by ALIGN() to yield an alignment suitable for all types. > The alignment of the double, long long, and long double types > is 8, which would imply that _ALIGNBYTES should be 7. All > platforms, except i386, have this "right". > > I don't know how vital this definition is, but I do know that > increasing it yields an ABI breakage (I noticed that ssh(1) > stopped working). The ABI breakage is not severe enough that > you cannot increase and decrease it without being able to do > a buildworld. > > My question: should we bump it up while powerpc is still tier 2? > > -- > Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net > > > _______________________________________________ > freebsd-ppc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ppc > To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001801c6b481$bf8f0580$99dfdfdf>