问题
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
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?
Thank you
回答1:
The same information is available in Aarch64. You just need to replace:
VMSR r4, FPSCR
VMRS FPSCR, r4
by:
MRS w4, FPSR
MSR FPSR, w4
来源:https://stackoverflow.com/questions/38145583/armv8-neon-if-condition