4.7.46. ARMv6 SIMD 内在函数

ARM 体系结构 v6 指令集体系结构在 ARMv6 中添加了 60 多条 SIMD 指令,以便通过软件有效地实现高性能的媒体应用程序。

ARM 编译器支持映射到 ARMv6 SIMD 指令的内在函数。 为 ARMv6 体系结构或处理器编译代码时,可以使用这些内在函数。 以下列表给出了这些内在函数的函数原型。 列表中给出的函数原型描述了内在函数实现的原始或基本形式的 ARMv6 指令。 要获取某个内在函数实现的基本指令名称,请删除内在函数名称前面的下划线 (__)。 例如,__qadd16 内在函数对应于 ARMv6 QADD16 指令。

Note

可以确保针对 ARM v6 体系结构或处理器将每个 ARMv6 SIMD 内在函数编译为单个内联机器指令。 但是,编译器检测到需要执行此操作的场合时,可能会使用优化形式的基本指令。

ARMv6 SIMD 指令可以在应用程序状态寄存器 (APSR) 中设置 GE[3:0] 位。 SIMD 指令可以更新这些标记以指示 SIMD 运算的每个 8/16 位片的“大于或等于”状态。

ARM 编译器将 GE[3:0] 位视为全局变量。 要从 C 或 C++ 程序中访问这些位,请执行以下任一操作:


unsigned int __qadd16(unsigned int, unsigned int)

unsigned int __qadd8(unsigned int, unsigned int)

unsigned int __qasx(unsigned int, unsigned int)

unsigned int __qsax(unsigned int, unsigned int)

unsigned int __qsub16(unsigned int, unsigned int)

unsigned int __qsub8(unsigned int, unsigned int)

unsigned int __sadd16(unsigned int, unsigned int)

unsigned int __sadd8(unsigned int, unsigned int)

unsigned int __sasx(unsigned int, unsigned int)

unsigned int __sel(unsigned int, unsigned int)

unsigned int __shadd16(unsigned int, unsigned int)

unsigned int __shadd8(unsigned int, unsigned int)

unsigned int __shasx(unsigned int, unsigned int)

unsigned int __shsax(unsigned int, unsigned int)

unsigned int __shsub16(unsigned int, unsigned int)

unsigned int __shsub8(unsigned int, unsigned int)

unsigned int __smlad(unsigned int, unsigned int, unsigned int)

unsigned long long __smlald(unsigned int, unsigned int, unsigned long long)

unsigned int __smlsd(unsigned int, unsigned int, unsigned int)

unsigned long long __smlsld(unsigned int, unsigned int, unsigned long long)

unsigned int __smuad(unsigned int, unsigned int)

unsigned int __smusd(unsigned int, unsigned int)

unsigned int __ssat16(unsigned int, unsigned int)

unsigned int __ssax(unsigned int, unsigned int)

unsigned int __ssub16(unsigned int, unsigned int)

unsigned int __ssub8(unsigned int, unsigned int)

unsigned int __sxtab16(unsigned int, unsigned int)

unsigned int __sxtb16(unsigned int, unsigned int)

unsigned int __uadd16(unsigned int, unsigned int)

unsigned int __uadd8(unsigned int, unsigned int)

unsigned int __uasx(unsigned int, unsigned int)

unsigned int __uhadd16(unsigned int, unsigned int)

unsigned int __uhadd8(unsigned int, unsigned int)

unsigned int __uhasx(unsigned int, unsigned int)

unsigned int __uhsax(unsigned int, unsigned int)

unsigned int __uhsub16(unsigned int, unsigned int)

unsigned int __uhsub8(unsigned int, unsigned int)

unsigned int __uqadd16(unsigned int, unsigned int)

unsigned int __uqadd8(unsigned int, unsigned int)

unsigned int __uqasx(unsigned int, unsigned int)

unsigned int __uqsax(unsigned int, unsigned int)

unsigned int __uqsub16(unsigned int, unsigned int)

unsigned int __uqsub8(unsigned int, unsigned int)

unsigned int __usad8(unsigned int, unsigned int)

unsigned int __usada8(unsigned int, unsigned int, unsigned int)

unsigned int __usax(unsigned int, unsigned int)

unsigned int __usat16(unsigned int, unsigned int)

unsigned int __usub16(unsigned int, unsigned int)

unsigned int __usub8(unsigned int, unsigned int)

unsigned int __uxtab16(unsigned int, unsigned int)

unsigned int __uxtb16(unsigned int, unsigned int)

另请参阅

Copyright © 2007 ARM Limited. All rights reserved. ARM DUI 0348AC
Non-Confidential