如何在64位RaspberryPi4运行Linux(使用GCC或CLANG)上使用NEON固有编译C代码?
问:应使用哪些编译器选项与霓虹灯固有编译C代码 使用#include< arm_neon.h>在Raspberry-Pi4(Cortex-A72,Neon-FP-ARMV8)上运行64位Linux OS(Ubuntu)?
在32bit上,这些选项正常工作:-mfloat -abi =硬-mfpu = neon
,但是它在AARCH64上不起作用。
(当使用默认选项时,clang和GCC都将代码与霓虹灯固有无错误编译,并且它运行良好并产生正确的结果,但是查看汇编,没有生成霓虹灯代码(指令被非交易的说明替换为指令)))))))))))))))))))))))))) 。
Q: Which compiler options should be used to compile C code with NEON intrinsic
using #include <arm_neon.h> on raspberry-pi4 (cortex-a72, neon-fp-armv8) running a 64bit Linux OS (Ubuntu)?
On 32bit these options work fine: -mfloat-abi=hard -mfpu=neon
However, it doesn't work on aarch64.
(When using default option both CLANG and GCC compile the code with NEON intrinsic without errors, and it is running fine and produce correct result, however looking at the assembly, no NEON code was generated (instructions were replaced with non-vectroized instructions)).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论