views:

204

answers:

1

hi!

os i figured out how to use the -mthumb and -mno-thumb compiler flag and more or less understand what it's doing.

But what is the -mthumb-interlinking flag doing? when is it needed, and is it set for the whole project if i set 'compile for thumb' in my project settings?

thanks for the info!

+1  A: 

Open a terminal and type man gcc

Do you mean -mthumb-interwork ?

   -mthumb-interwork
       Generate code which supports calling between the ARM and Thumb
       instruction sets.  Without this option the two instruction sets
       cannot be reliably used inside one program.  The default is
       -mno-thumb-interwork, since slightly larger code is generated when
       -mthumb-interwork is specified.

If this is related to a build configuration, you should be able to set it separately for each configuration "such as Release or Debug".

Why do you want to change these settings? I know using thumb instructions save some memory but will it save enough to matter in this case?

Nimrod
yes it's what i meant. well if I deactivate thumb for the whole project, i get worse performance than with thumb activated. however, if i deactivate it only for a few float intensive sourcefiles, performance of my applications increases. my application uses both, thumb and vfp code but i never specifically set -thumb-interwork flag.. how is that possible?
genesys
You got me. If using thumb is the default as supplied with the SDK then it makes sense that thumb-interwork would be the same. I'm only vaguely familiar with the ARM architecture, but I always thought using thumb was mostly for saving space, so I'm surprised that using it improved performance. Perhaps it's due to the number of instructions that will fit in the instruction cache?
Nimrod