ARM NEON 汇编器错误:“指令不能是有条件的”
根据arm信息中心 vadd 可以有条件地执行,但是当我尝试
vaddeq.f32 d0,d0,d1
Xcode 返回
65:instruction cannot be conditional -- vaddeq.f32 d0,d0,d1
时,我注意到的一件事是,似乎只有 NEON 指令才会给出此错误。 VFP 指令不会产生这些错误。
为了启用 NEON 条件指令,我是否必须设置编译器标志?
According to the arm info center vadd can be executed condtitionally however when i try
vaddeq.f32 d0,d0,d1
Xcode returns
65:instruction cannot be conditional -- vaddeq.f32 d0,d0,d1
one thing i've noticed is that it seems to be only NEON instructions that give this error. VFP instructions don't produce these errors.
Is there a compiler flag I have to set in order to enable NEON conditional instructions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
ARM 架构参考手册说:
即,如果您处于 ARM 模式,这些指令不是有条件的。如果将它们放入 IT 块中,则可以在 Thumb-2 中有条件地使用它们。
The ARM Architecture Reference Manual says:
I.e., if you're in ARM mode, those instructions are not conditional. You can use them conditionally in Thumb-2 if you put them in an IT block.
条件 NEON 指令在 ARM 模式下不可用的原因是它们使用条件字段设置为 NV(从不)的编码。您需要使用条件分支或(更好)重写代码以不直接使用比较结果 - 例如,根据结果将寄存器设置为 0 或 1,并在进一步的操作中使用其值。
The reason why conditional NEON instructions are not available in ARM mode is because they use encodings with the condition field set to NV (never). You need to use conditional branches or (better) rewrite the code to not use the comparison results directly - e.g. set a register to 0 or 1 depending on the result and use its value in further operations.
只有 NEON 和 VFP 共享的指令才能有条件执行。
(例如 vldmia。)
对我来说,在某些情况下,条件执行可以使我免于一些小麻烦,但一般来说,您不会那么需要它。
仔细查看 NEON 逻辑和比较操作。它们很好地表明了 NEON 应该如何编程。
氰基。
Only instructions shared by NEON and VFP can be executed conditionally.
(vldmia for example.)
For me, there have been a few situations where conditional execution could have saved me from some minor headaches, but in general, you won't need it that badly.
Take a careful look at the NEON logical and compare operations. They very well indicate how NEON is supposed to be programmed.
cya.