Subject: Re: powerpc gcc alignment problem
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Dan Winship <danw@MIT.EDU>
List: port-powerpc
Date: 01/14/2000 10:35:52
> 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
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.
-- Dan