iPhone:停用单个源文件的 Thumb 模式
带有 GCC 4.2 的 Xcode
似乎可以禁用整个项目的拇指模式,并通过将 -mthumb 编译器标志放入该文件的“附加编译器标志”列表中来激活单个源文件的拇指模式。
我正在寻找一种相反的方法。为整个项目激活 Thumb,但为某些特定文件停用它。
问题是,一般来说,当我为 Thumb 进行编译时,我的项目会获得更好的性能。然而 - 我正在使用的引擎的更新版本有一些 VFP 汇编代码,只有在 Thumb 被停用时才会编译。因此,我想仅针对这些特定文件停用 Thumb,并针对其他所有文件激活它,
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试将
-mno-thumb
添加到您想要关闭拇指的文件中?另外,VFP 是在汇编文件中,还是在内联 asm 块中?您可以通过汇编指令将汇编文件中的各个函数标记为拇指/无拇指:
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: