Question

Xcode with GCC 4.2

it seems it's possible to deactivate thumbmode for the whole project, and activate it for single sourcefiles by putting the -mthumb compiler flag in the "Additional Compiler Flags" list of the this file.

I'm looking for a way to do the oposite. activating Thumb for the whole project, but deactivating it for some specific files.

The problem is, that in general I get better performance in my project when i compile for Thumb. however - an updated version of an engine i'm using has some VFP assembler code which only compiles if Thumb is deactivated. So i would like to deactivate Thumb only for those specific files, and have it activated for everything else

thanks!

Was it helpful?

Solution

Did you try adding -mno-thumb to the files that you for which you want thumb turned off?

Also, is the VFP in assembly files, or in inline asm blocks? You can mark individual functions in assembly files as thumb/no-thumb via assembly directives:

.syntax unified

.code 16
.globl _thumbFunction
.thumb_func _thumbFunction
_thumbFunction:
    // Thumb code goes here

...

.code 32
.globl _armFunction
_armFunction:
    // ARM code goes here
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top