xycfwrj 发表于 2017-8-31 11:37:45

请教gcc是否提供针对arm的intrinsics

看到arm c编译器支持类似 __smuad这种 intrinsics,
不知道gcc是否也有相关支持?
ti的arm编译器是支持的。
在dsp上用惯了这种feature,不使用总觉得代码不可控。

p.s. 不是需要neon的gcc,就是普通的cpu提供的内联指令。
谢谢

dr2001 发表于 2017-8-31 11:44:40

GCC的ASM语句能满足该类所有需求。

xycfwrj 发表于 2017-8-31 11:49:29

dr2001 发表于 2017-8-31 11:44
GCC的ASM语句能满足该类所有需求。

这个坡度太大了,
intrinsics是代码效率和运行效率的很好折中,arm c compiler也提供,
不知道gcc是否也有类似功能

xycfwrj 发表于 2017-8-31 11:50:31

stackoverflow找到如下一段话,看来gcc是没可能提供intrinsics了。。。
The intrinsic function __qadd is not available for the GCC compiler. The link to the documentation you've provided is for the (non-free) armcc compiler.

Using the assembler approach is the only practical way to use the qadd instruction if you're using GCC.
页: [1]
查看完整版本: 请教gcc是否提供针对arm的intrinsics