Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: powerpc gcc alignment problem



Hi Dan,

I won't discuss the compatibility issues concerning this topic,
but 

Dan Winship wrote:
> 
> > So, if unaligned accesses are in fact slower than aligned ones, why
> > is doing strict alignment a performance penalty?
> 
> Because they might not be _much_ slower. If it takes you three

isn't this is the wrong answer to the question? The question
was NOT why one would want to use unaligned access, despite
strict alignment is faster. The question was: Why strict alignment
is a performance penalty? AFAICS, strict alignment is no performance
penalty (Yes, I know, it might cause incompatibility, but that
wasn't the question :-)

> instructions to emulate an unaligned load (load first half into
> register 1, load second half into register 2, merge and shift
> registers 1 and 2 into register 3), and only two to do the unaligned
> load itself, you're better off generating the unaligned access.

Why are we better off generating unaligned access? Speedwise
or compatibilitywise? If the former, then please clearify.

Thanx,

  Guenther



Home | Main Index | Thread Index | Old Index