tags:

views:

63

answers:

1

Hi!

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!

A: 

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
Stephen Canon
yes i already tried that and the compiler told me it doesn't know that command. the VFP code is in normal ccp files inside functions and starts like: asm volatile(VFP_SWITCH_TO_ARM VFO_VECTOR_LENGTH(3) and then comes the asm code in strings line by line
genesys
`-mno-thumb` should be a valid flag. Are you sure you didn't try `-mnothumb`?
Stephen Canon
sorry - i tried -mno-mthumb which was not working. -mno-thumb works fine, thank yoU!
genesys