This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
alignment: x86 vs ppc
- From: "John Yates" <jyates at netezza dot com>
- To: "Gcc-Help \(E-mail\)" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 1 Nov 2006 18:52:07 -0500
- Subject: alignment: x86 vs ppc
We have a system in which an x86 master controls an army of
ppc slaves. Communication is via network message described
as structs. Some messages contain 64 bit integers. Standard
ABIs for these respective architectures differ wrt the notion
of maximum alignment (x86 saturates at 4 bytes, ppc at 8).
Our original implementation compiled the master with gcc 2.96
and the slaves with the commercial Diab compiler. The Diab
compiler, perhaps because it targeted embedded environments,
provided a means of overriding the standard maximum alignment.
In this way our network message ended up laid out identically
on both platforms and life was good :-)
We are currently attempting to replace the Diab compiler with
a 3.4.3 or later (possibly even 4.1) ppc gcc. At this point
the incompatible ABIs issue has reappeared.
Is there ANY way that we can convince gcc to hold its nose, to
ignore the dictates of the ABI, and to use a lesser maximum
alignment value?
/john
--
John S. Yates, Jr. 508 665-6897 (voice)
Netezza Inc 508 665-6811 (fax)
200 Crossing Blvd. Framingham, MA 01701