This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: -malign-double missing on ppc from g77?


On Mon, Jan 31, 2000 at 11:32:33AM -0500, Jack Howarth wrote:
> Hello,
>     I was building the fortran molecular modeling program
> CNS this weekend which has a 'make linux-ppc' build option.
> In that makefile they define -malign-double for a flag to
> pass to g77. This suggests that egcs/gcc's g77 at some point
> supported the -malign-double flag. Unfortunately the g77
> from 2.95.3 built by Franz Sirl seems to not support
> the -malign-double flag. I am wondering why that is the
> case and if the absence of -malign-double is likely to
> cause major problems in the code when executed. Thanks
> in advance for any insights on this issue.

No, the powerpc port has never supported -malign-double.  That is an i386
specific option (the -m options are machine specific, each port can define
anything that they need specifically).  The Linux powerpc compiler doesn't need
an align double option, because its ABI already has doubles aligned (the AT&T
System V.4 ABI that is used on the 386 was rather short sighted, and defined
doubles as only needing 4 byte alignment since the 386 didn't need a higher
alignment, and memory was expensive back then -- the 486 and higher all would
prefer doubles to be aligned to 8 byte boundaries, but it is kind of hard to
chanage an ABI once it comes out, especially since it isn't clear who would be
the committee to change it).  If you are sharing binary structures with a 386
using native alignments, your code is already broken, even without the issue of
double alignments.

-- 
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886
Work:	  meissner@redhat.com		phone: 978-486-9304 fax: 978-692-4482
Non-work: meissner@spectacle-pond.org

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]