ARM NEON汇编器错误:“指令不能是有条件的" [英] ARM NEON assembler error: "instruction cannot be conditional"
问题描述
根据手臂信息center vadd可以有条件地执行,但是当我尝试
According to the arm info center vadd can be executed condtitionally however when i try
vaddeq.f32 d0,d0,d1
Xcode返回
65:instruction cannot be conditional -- vaddeq.f32 d0,d0,d1
我注意到的一件事是,似乎只有NEON指令会产生此错误. VFP指令不会产生这些错误.
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.
是否需要设置编译器标志才能启用NEON条件指令?
Is there a compiler flag I have to set in order to enable NEON conditional instructions?
推荐答案
《 ARM体系结构参考手册》说:
The ARM Architecture Reference Manual says:
An ARM Advanced SIMD VADD instruction must be unconditional.
也就是说,如果您处于ARM模式,则这些说明不是有条件的.如果将它们放在IT块中,则可以在Thumb-2中有条件地使用它们.
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.
.syntax unified
.code 16
.globl _foo
_foo:
cmp r0, #0
it eq
vaddeq.f32 d0, d0, d1
bx lr
这篇关于ARM NEON汇编器错误:“指令不能是有条件的"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!