This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

Function alignment and ColdFire performance


Hi,

Myself and a number of other ColdFire users have been wondering about the
occasionally erratice performance of some bits of code particularly when the
(small) cache is turned on on our 5206 designs. When looking at the assembly
output of gcc I noticed that all the functions are aligned on .even
boundaries. The ColdFire works best when things are aligned on 4-byte
boundaries as this suits it's RISC-esque design and might explain some of
the anomolies that we've found. Looking at Diab Data's ColdFire specific
compiler output it seems to have .ALIGN 4 listed before each function. Is
there a way to get GCC to do this or am I just misunderstanding what .even
does. All the object files are aligned on 4 byte boundaries in the linker
script so things start out in the right place.

thanks,
Dave

David Fiddes, CALM Software Production Officer
Department of Mathematics, Heriot-Watt University, Edinburgh
email D.J.Fiddes@hw.ac.uk - Tel: +44 131-451-3251