armv8 NEON 如果条件 [英] armv8 NEON if condition
本文介绍了armv8 NEON 如果条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 armv8 NEON 内联汇编代码中实现 if 条件.在 armv7 中,这可以通过像这样检查溢出位来实现:
I would like to realize if condition in armv8 NEON inline assembly code. In armv7 this was possible through checking overflow bit like this:
VMRS r4, FPSCR
BIC r4, r4, #(1<<27)
VMSR FPSCR, r4
vtst.16 d30, d30, d30
vqadd.u16 d30, d30, d30
vmrs r4, FPSCR
tst r4, #(1<<27)
bne label1
但我无法在 armv8 等效代码中实现这一点.似乎 SQADD 不会影响 FPSR 中的溢出位,或者我无法像这样检查它.是否有可能或有更好的方法来跳过长代码部分?
But I am not able to achieve this in armv8 equivalent code. It seems that SQADD doesnt affect overflow bit in FPSR or I cannot check it like this. Is it possible or is there better approach how to skip long part of code?
谢谢
推荐答案
Aarch64 中提供了相同的信息.你只需要替换:
The same information is available in Aarch64. You just need to replace:
<代码>VMSR r4,FPSCRVMRS FPSCR, r4
作者:
<代码>MRS w4, FPSRMSR FPSR,w4
这篇关于armv8 NEON 如果条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文