iPhone:停用单个源文件的 Thumb 模式

发布于 2024-08-18 08:33:20 字数 293 浏览 4 评论 0原文

带有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

太阳公公是暖光 2024-08-25 08:33:20

您是否尝试将 -mno-thumb 添加到您想要关闭拇指的文件中?

另外,VFP 是在汇编文件中,还是在内联 asm 块中?您可以通过汇编指令将汇编文件中的各个函数标记为拇指/无拇指:

.syntax unified

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

...

.code 32
.globl _armFunction
_armFunction:
    // ARM code goes here

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文