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]
Other format: [Raw text]

Re: Char array alignment for PowerPc changed


> 
> Andrew Pinski wrote:
> I have no idea how your reply is related to my question about the
> change in alignment of char arrays between gcc-3.4 and gcc-4.1.

It was not really a rely to that part of the question but rather the
assertion in general that unaligned access was slower which is not true
for most PowerPC chips I know of.

> Strcpy is optimized to copy arrays which are aligned on word
> boundaries by using word load/store.  Unaligned arrays are copied
> byte by byte.  Runs slower.

Which strcpy?  Maybe the strcpy is written incorrectly for your
processor?  Can you name which PowerPC you are using?

The 74xx and 75x both are able to access unaligned words in a double
word boundary like an aligned access.  The 603/604 were both able
to handle unaligned word loads fast as aligned ones.

I still am trying to find a PowerPC were unaligned loads would cause
a major penality in general.

-- Pinski


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