1*0eae32dcSDimitry Andric /*===---- arm_neon_sve_bridge.h - ARM NEON SVE Bridge intrinsics -----------=== 2*0eae32dcSDimitry Andric * 3*0eae32dcSDimitry Andric * 4*0eae32dcSDimitry Andric * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5*0eae32dcSDimitry Andric * See https://llvm.org/LICENSE.txt for license information. 6*0eae32dcSDimitry Andric * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7*0eae32dcSDimitry Andric * 8*0eae32dcSDimitry Andric *===-----------------------------------------------------------------------=== 9*0eae32dcSDimitry Andric */ 10*0eae32dcSDimitry Andric 11*0eae32dcSDimitry Andric #ifndef __ARM_NEON_SVE_BRIDGE_H 12*0eae32dcSDimitry Andric #define __ARM_NEON_SVE_BRIDGE_H 13*0eae32dcSDimitry Andric 14*0eae32dcSDimitry Andric #include <arm_neon.h> 15*0eae32dcSDimitry Andric #include <arm_sve.h> 16*0eae32dcSDimitry Andric 17*0eae32dcSDimitry Andric #ifdef __cplusplus 18*0eae32dcSDimitry Andric extern "C" { 19*0eae32dcSDimitry Andric #endif 20*0eae32dcSDimitry Andric 21*0eae32dcSDimitry Andric /* Function attributes */ 22*0eae32dcSDimitry Andric #define __ai static __inline__ __attribute__((__always_inline__, __nodebug__)) 23*0eae32dcSDimitry Andric #define __aio \ 24*0eae32dcSDimitry Andric static __inline__ \ 25*0eae32dcSDimitry Andric __attribute__((__always_inline__, __nodebug__, __overloadable__)) 26*0eae32dcSDimitry Andric 27*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_s8))) 28*0eae32dcSDimitry Andric svint8_t svset_neonq(svint8_t, int8x16_t); 29*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_s16))) 30*0eae32dcSDimitry Andric svint16_t svset_neonq(svint16_t, int16x8_t); 31*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_s32))) 32*0eae32dcSDimitry Andric svint32_t svset_neonq(svint32_t, int32x4_t); 33*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_s64))) 34*0eae32dcSDimitry Andric svint64_t svset_neonq(svint64_t, int64x2_t); 35*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_u8))) 36*0eae32dcSDimitry Andric svuint8_t svset_neonq(svuint8_t, uint8x16_t); 37*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_u16))) 38*0eae32dcSDimitry Andric svuint16_t svset_neonq(svuint16_t, uint16x8_t); 39*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_u32))) 40*0eae32dcSDimitry Andric svuint32_t svset_neonq(svuint32_t, uint32x4_t); 41*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_u64))) 42*0eae32dcSDimitry Andric svuint64_t svset_neonq(svuint64_t, uint64x2_t); 43*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_f16))) 44*0eae32dcSDimitry Andric svfloat16_t svset_neonq(svfloat16_t, float16x8_t); 45*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_f32))) 46*0eae32dcSDimitry Andric svfloat32_t svset_neonq(svfloat32_t, float32x4_t); 47*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_f64))) 48*0eae32dcSDimitry Andric svfloat64_t svset_neonq(svfloat64_t, float64x2_t); 49*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_s8))) 50*0eae32dcSDimitry Andric svint8_t svset_neonq_s8(svint8_t, int8x16_t); 51*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_s16))) 52*0eae32dcSDimitry Andric svint16_t svset_neonq_s16(svint16_t, int16x8_t); 53*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_s32))) 54*0eae32dcSDimitry Andric svint32_t svset_neonq_s32(svint32_t, int32x4_t); 55*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_s64))) 56*0eae32dcSDimitry Andric svint64_t svset_neonq_s64(svint64_t, int64x2_t); 57*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_u8))) 58*0eae32dcSDimitry Andric svuint8_t svset_neonq_u8(svuint8_t, uint8x16_t); 59*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_u16))) 60*0eae32dcSDimitry Andric svuint16_t svset_neonq_u16(svuint16_t, uint16x8_t); 61*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_u32))) 62*0eae32dcSDimitry Andric svuint32_t svset_neonq_u32(svuint32_t, uint32x4_t); 63*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_u64))) 64*0eae32dcSDimitry Andric svuint64_t svset_neonq_u64(svuint64_t, uint64x2_t); 65*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_f16))) 66*0eae32dcSDimitry Andric svfloat16_t svset_neonq_f16(svfloat16_t, float16x8_t); 67*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_f32))) 68*0eae32dcSDimitry Andric svfloat32_t svset_neonq_f32(svfloat32_t, float32x4_t); 69*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_f64))) 70*0eae32dcSDimitry Andric svfloat64_t svset_neonq_f64(svfloat64_t, float64x2_t); 71*0eae32dcSDimitry Andric 72*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_s8))) 73*0eae32dcSDimitry Andric int8x16_t svget_neonq(svint8_t); 74*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_s16))) 75*0eae32dcSDimitry Andric int16x8_t svget_neonq(svint16_t); 76*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_s32))) 77*0eae32dcSDimitry Andric int32x4_t svget_neonq(svint32_t); 78*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_s64))) 79*0eae32dcSDimitry Andric int64x2_t svget_neonq(svint64_t); 80*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_u8))) 81*0eae32dcSDimitry Andric uint8x16_t svget_neonq(svuint8_t); 82*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_u16))) 83*0eae32dcSDimitry Andric uint16x8_t svget_neonq(svuint16_t); 84*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_u32))) 85*0eae32dcSDimitry Andric uint32x4_t svget_neonq(svuint32_t); 86*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_u64))) 87*0eae32dcSDimitry Andric uint64x2_t svget_neonq(svuint64_t); 88*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_f16))) 89*0eae32dcSDimitry Andric float16x8_t svget_neonq(svfloat16_t); 90*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_f32))) 91*0eae32dcSDimitry Andric float32x4_t svget_neonq(svfloat32_t); 92*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_f64))) 93*0eae32dcSDimitry Andric float64x2_t svget_neonq(svfloat64_t); 94*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_s8))) 95*0eae32dcSDimitry Andric int8x16_t svget_neonq_s8(svint8_t); 96*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_s16))) 97*0eae32dcSDimitry Andric int16x8_t svget_neonq_s16(svint16_t); 98*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_s32))) 99*0eae32dcSDimitry Andric int32x4_t svget_neonq_s32(svint32_t); 100*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_s64))) 101*0eae32dcSDimitry Andric int64x2_t svget_neonq_s64(svint64_t); 102*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_u8))) 103*0eae32dcSDimitry Andric uint8x16_t svget_neonq_u8(svuint8_t); 104*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_u16))) 105*0eae32dcSDimitry Andric uint16x8_t svget_neonq_u16(svuint16_t); 106*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_u32))) 107*0eae32dcSDimitry Andric uint32x4_t svget_neonq_u32(svuint32_t); 108*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_u64))) 109*0eae32dcSDimitry Andric uint64x2_t svget_neonq_u64(svuint64_t); 110*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_f16))) 111*0eae32dcSDimitry Andric float16x8_t svget_neonq_f16(svfloat16_t); 112*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_f32))) 113*0eae32dcSDimitry Andric float32x4_t svget_neonq_f32(svfloat32_t); 114*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_f64))) 115*0eae32dcSDimitry Andric float64x2_t svget_neonq_f64(svfloat64_t); 116*0eae32dcSDimitry Andric 117*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_s8))) 118*0eae32dcSDimitry Andric svint8_t svdup_neonq(int8x16_t); 119*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_s16))) 120*0eae32dcSDimitry Andric svint16_t svdup_neonq(int16x8_t); 121*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_s32))) 122*0eae32dcSDimitry Andric svint32_t svdup_neonq(int32x4_t); 123*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_s64))) 124*0eae32dcSDimitry Andric svint64_t svdup_neonq(int64x2_t); 125*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_u8))) 126*0eae32dcSDimitry Andric svuint8_t svdup_neonq(uint8x16_t); 127*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_u16))) 128*0eae32dcSDimitry Andric svuint16_t svdup_neonq(uint16x8_t); 129*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_u32))) 130*0eae32dcSDimitry Andric svuint32_t svdup_neonq(uint32x4_t); 131*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_u64))) 132*0eae32dcSDimitry Andric svuint64_t svdup_neonq(uint64x2_t); 133*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_f16))) 134*0eae32dcSDimitry Andric svfloat16_t svdup_neonq(float16x8_t); 135*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_f32))) 136*0eae32dcSDimitry Andric svfloat32_t svdup_neonq(float32x4_t); 137*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_f64))) 138*0eae32dcSDimitry Andric svfloat64_t svdup_neonq(float64x2_t); 139*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_s8))) 140*0eae32dcSDimitry Andric svint8_t svdup_neonq_s8(int8x16_t); 141*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_s16))) 142*0eae32dcSDimitry Andric svint16_t svdup_neonq_s16(int16x8_t); 143*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_s32))) 144*0eae32dcSDimitry Andric svint32_t svdup_neonq_s32(int32x4_t); 145*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_s64))) 146*0eae32dcSDimitry Andric svint64_t svdup_neonq_s64(int64x2_t); 147*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_u8))) 148*0eae32dcSDimitry Andric svuint8_t svdup_neonq_u8(uint8x16_t); 149*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_u16))) 150*0eae32dcSDimitry Andric svuint16_t svdup_neonq_u16(uint16x8_t); 151*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_u32))) 152*0eae32dcSDimitry Andric svuint32_t svdup_neonq_u32(uint32x4_t); 153*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_u64))) 154*0eae32dcSDimitry Andric svuint64_t svdup_neonq_u64(uint64x2_t); 155*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_f16))) 156*0eae32dcSDimitry Andric svfloat16_t svdup_neonq_f16(float16x8_t); 157*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_f32))) 158*0eae32dcSDimitry Andric svfloat32_t svdup_neonq_f32(float32x4_t); 159*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_f64))) 160*0eae32dcSDimitry Andric svfloat64_t svdup_neonq_f64(float64x2_t); 161*0eae32dcSDimitry Andric 162*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_bf16))) 163*0eae32dcSDimitry Andric svbfloat16_t svset_neonq(svbfloat16_t, bfloat16x8_t); 164*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svset_neonq_bf16))) 165*0eae32dcSDimitry Andric svbfloat16_t svset_neonq_bf16(svbfloat16_t, bfloat16x8_t); 166*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_bf16))) 167*0eae32dcSDimitry Andric bfloat16x8_t svget_neonq(svbfloat16_t); 168*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svget_neonq_bf16))) 169*0eae32dcSDimitry Andric bfloat16x8_t svget_neonq_bf16(svbfloat16_t); 170*0eae32dcSDimitry Andric __aio __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_bf16))) 171*0eae32dcSDimitry Andric svbfloat16_t svdup_neonq(bfloat16x8_t); 172*0eae32dcSDimitry Andric __ai __attribute__((__clang_arm_builtin_alias(__builtin_sve_svdup_neonq_bf16))) 173*0eae32dcSDimitry Andric svbfloat16_t svdup_neonq_bf16(bfloat16x8_t); 174*0eae32dcSDimitry Andric 175*0eae32dcSDimitry Andric #undef __ai 176*0eae32dcSDimitry Andric #undef __aio 177*0eae32dcSDimitry Andric 178*0eae32dcSDimitry Andric #ifdef __cplusplus 179*0eae32dcSDimitry Andric } // extern "C" 180*0eae32dcSDimitry Andric #endif 181*0eae32dcSDimitry Andric 182*0eae32dcSDimitry Andric #endif //__ARM_NEON_SVE_BRIDGE_H 183