armv8 NEON if condition

不羁岁月 提交于 2019-12-12 10:32:55

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!