Subject: Re: powerpc gcc alignment problem
To: Dan Winship <danw@MIT.EDU>
From: David Edelsohn <>
List: tech-toolchain
Date: 12/28/1999 15:15:51
	PowerPC does not require that floating point data be
word-aligned.  One can specify addresses to the individual byte.  FP loads
and stores that are not naturally aligned will be slower, but do work.  If
an unaligned load or store crosses a page boundary, the processor will
generate an alignment exception which the operating system should fixup
and restart.  Your report is not accurate.

	If you are receiving alignment exceptions, why don't you implement
an alignment exception handler for NetBSD/powerpc?

	What type of coding practice is causing the alignment problems?
Are these structures definitions which override normal alignment?  Is this
a linker problem not properly aligning sections which do contain data
which is aligned relative to the section?

	One also can alter the alignment used by the compiler through the
CONSTANT_ALIGNMENT and DATA_ALIGNMENT macros, but I think that you have a
more fundamental problem.  Given the incorrect premise of your note, I do
not think that you properly understand the problem or the correct fix.

David Edelsohn                                      T.J. Watson Research Center                                  P.O. Box 218
+1 914 945 4364 (TL 862)                            Yorktown Heights, NY 10598