ARM NEON 汇编程序错误:“指令不能有条件" [英] ARM NEON assembler error: "instruction cannot be conditional"

查看:36
本文介绍了ARM NEON 汇编程序错误:“指令不能有条件"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据手臂信息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 Architecture Reference Manual 说:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆