| 1 |
/* Arm MVE intrinsics include file. |
| 2 |
|
| 3 |
Copyright (C) 2019-2025 Free Software Foundation, Inc. |
| 4 |
Contributed by Arm. |
| 5 |
|
| 6 |
This file is part of GCC. |
| 7 |
|
| 8 |
GCC is free software; you can redistribute it and/or modify it |
| 9 |
under the terms of the GNU General Public License as published |
| 10 |
by the Free Software Foundation; either version 3, or (at your |
| 11 |
option) any later version. |
| 12 |
|
| 13 |
GCC is distributed in the hope that it will be useful, but WITHOUT |
| 14 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 15 |
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
| 16 |
License for more details. |
| 17 |
|
| 18 |
Under Section 7 of GPL version 3, you are granted additional |
| 19 |
permissions described in the GCC Runtime Library Exception, version |
| 20 |
3.1, as published by the Free Software Foundation. |
| 21 |
|
| 22 |
You should have received a copy of the GNU General Public License |
| 23 |
along with GCC; see the file COPYING3. If not see |
| 24 |
<http://www.gnu.org/licenses/>. */ |
| 25 |
|
| 26 |
#ifndef _GCC_ARM_MVE_H |
| 27 |
#define _GCC_ARM_MVE_H |
| 28 |
|
| 29 |
#if __ARM_BIG_ENDIAN |
| 30 |
#error "MVE intrinsics are not supported in Big-Endian mode." |
| 31 |
#elif !__ARM_FEATURE_MVE |
| 32 |
#error "MVE feature not supported" |
| 33 |
#else |
| 34 |
|
| 35 |
#include <stdint.h> |
| 36 |
#ifndef __cplusplus |
| 37 |
#include <stdbool.h> |
| 38 |
#endif |
| 39 |
#include "arm_mve_types.h" |
| 40 |
|
| 41 |
#ifdef __ARM_MVE_PRESERVE_USER_NAMESPACE |
| 42 |
#pragma GCC arm "arm_mve.h" true |
| 43 |
#else |
| 44 |
#pragma GCC arm "arm_mve.h" false |
| 45 |
#endif |
| 46 |
|
| 47 |
#ifndef __ARM_MVE_PRESERVE_USER_NAMESPACE |
| 48 |
#define vuninitializedq(__v) __arm_vuninitializedq(__v) |
| 49 |
#define vsetq_lane(__a, __b, __idx) __arm_vsetq_lane(__a, __b, __idx) |
| 50 |
#define vgetq_lane(__a, __idx) __arm_vgetq_lane(__a, __idx) |
| 51 |
|
| 52 |
|
| 53 |
#define vpnot(__a) __arm_vpnot(__a) |
| 54 |
#define vuninitializedq_u8(void) __arm_vuninitializedq_u8(void) |
| 55 |
#define vuninitializedq_u16(void) __arm_vuninitializedq_u16(void) |
| 56 |
#define vuninitializedq_u32(void) __arm_vuninitializedq_u32(void) |
| 57 |
#define vuninitializedq_u64(void) __arm_vuninitializedq_u64(void) |
| 58 |
#define vuninitializedq_s8(void) __arm_vuninitializedq_s8(void) |
| 59 |
#define vuninitializedq_s16(void) __arm_vuninitializedq_s16(void) |
| 60 |
#define vuninitializedq_s32(void) __arm_vuninitializedq_s32(void) |
| 61 |
#define vuninitializedq_s64(void) __arm_vuninitializedq_s64(void) |
| 62 |
#define vuninitializedq_f16(void) __arm_vuninitializedq_f16(void) |
| 63 |
#define vuninitializedq_f32(void) __arm_vuninitializedq_f32(void) |
| 64 |
#define vsetq_lane_f16(__a, __b, __idx) __arm_vsetq_lane_f16(__a, __b, __idx) |
| 65 |
#define vsetq_lane_f32(__a, __b, __idx) __arm_vsetq_lane_f32(__a, __b, __idx) |
| 66 |
#define vsetq_lane_s16(__a, __b, __idx) __arm_vsetq_lane_s16(__a, __b, __idx) |
| 67 |
#define vsetq_lane_s32(__a, __b, __idx) __arm_vsetq_lane_s32(__a, __b, __idx) |
| 68 |
#define vsetq_lane_s8(__a, __b, __idx) __arm_vsetq_lane_s8(__a, __b, __idx) |
| 69 |
#define vsetq_lane_s64(__a, __b, __idx) __arm_vsetq_lane_s64(__a, __b, __idx) |
| 70 |
#define vsetq_lane_u8(__a, __b, __idx) __arm_vsetq_lane_u8(__a, __b, __idx) |
| 71 |
#define vsetq_lane_u16(__a, __b, __idx) __arm_vsetq_lane_u16(__a, __b, __idx) |
| 72 |
#define vsetq_lane_u32(__a, __b, __idx) __arm_vsetq_lane_u32(__a, __b, __idx) |
| 73 |
#define vsetq_lane_u64(__a, __b, __idx) __arm_vsetq_lane_u64(__a, __b, __idx) |
| 74 |
#define vgetq_lane_f16(__a, __idx) __arm_vgetq_lane_f16(__a, __idx) |
| 75 |
#define vgetq_lane_f32(__a, __idx) __arm_vgetq_lane_f32(__a, __idx) |
| 76 |
#define vgetq_lane_s16(__a, __idx) __arm_vgetq_lane_s16(__a, __idx) |
| 77 |
#define vgetq_lane_s32(__a, __idx) __arm_vgetq_lane_s32(__a, __idx) |
| 78 |
#define vgetq_lane_s8(__a, __idx) __arm_vgetq_lane_s8(__a, __idx) |
| 79 |
#define vgetq_lane_s64(__a, __idx) __arm_vgetq_lane_s64(__a, __idx) |
| 80 |
#define vgetq_lane_u8(__a, __idx) __arm_vgetq_lane_u8(__a, __idx) |
| 81 |
#define vgetq_lane_u16(__a, __idx) __arm_vgetq_lane_u16(__a, __idx) |
| 82 |
#define vgetq_lane_u32(__a, __idx) __arm_vgetq_lane_u32(__a, __idx) |
| 83 |
#define vgetq_lane_u64(__a, __idx) __arm_vgetq_lane_u64(__a, __idx) |
| 84 |
#define sqrshr(__p0, __p1) __arm_sqrshr(__p0, __p1) |
| 85 |
#define sqrshrl(__p0, __p1) __arm_sqrshrl(__p0, __p1) |
| 86 |
#define sqrshrl_sat48(__p0, __p1) __arm_sqrshrl_sat48(__p0, __p1) |
| 87 |
#define sqshl(__p0, __p1) __arm_sqshl(__p0, __p1) |
| 88 |
#define sqshll(__p0, __p1) __arm_sqshll(__p0, __p1) |
| 89 |
#define srshr(__p0, __p1) __arm_srshr(__p0, __p1) |
| 90 |
#define srshrl(__p0, __p1) __arm_srshrl(__p0, __p1) |
| 91 |
#define uqrshl(__p0, __p1) __arm_uqrshl(__p0, __p1) |
| 92 |
#define uqrshll(__p0, __p1) __arm_uqrshll(__p0, __p1) |
| 93 |
#define uqrshll_sat48(__p0, __p1) __arm_uqrshll_sat48(__p0, __p1) |
| 94 |
#define uqshl(__p0, __p1) __arm_uqshl(__p0, __p1) |
| 95 |
#define uqshll(__p0, __p1) __arm_uqshll(__p0, __p1) |
| 96 |
#define urshr(__p0, __p1) __arm_urshr(__p0, __p1) |
| 97 |
#define urshrl(__p0, __p1) __arm_urshrl(__p0, __p1) |
| 98 |
#endif |
| 99 |
|
| 100 |
/* For big-endian, GCC's vector indices are reversed within each 64 bits |
| 101 |
compared to the architectural lane indices used by MVE intrinsics. */ |
| 102 |
#define __ARM_NUM_LANES(__v) (sizeof (__v) / sizeof (__v[0])) |
| 103 |
#ifdef __ARM_BIG_ENDIAN |
| 104 |
#define __ARM_LANEQ(__vec, __idx) (__idx ^ (__ARM_NUM_LANES(__vec)/2 - 1)) |
| 105 |
#else |
| 106 |
#define __ARM_LANEQ(__vec, __idx) __idx |
| 107 |
#endif |
| 108 |
#define __ARM_CHECK_LANEQ(__vec, __idx) \ |
| 109 |
__builtin_arm_lane_check (__ARM_NUM_LANES(__vec), \ |
| 110 |
__ARM_LANEQ(__vec, __idx)) |
| 111 |
|
| 112 |
__extension__ extern __inline mve_pred16_t |
| 113 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 114 |
__arm_vpnot (mve_pred16_t __a) |
| 115 |
{ |
| 116 |
return __builtin_mve_vpnotv16bi (__a); |
| 117 |
} |
| 118 |
|
| 119 |
__extension__ extern __inline int16x8_t |
| 120 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 121 |
__arm_vsetq_lane_s16 (int16_t __a, int16x8_t __b, const int __idx) |
| 122 |
{ |
| 123 |
__ARM_CHECK_LANEQ (__b, __idx); |
| 124 |
__b[__ARM_LANEQ(__b,__idx)] = __a; |
| 125 |
return __b; |
| 126 |
} |
| 127 |
|
| 128 |
__extension__ extern __inline int32x4_t |
| 129 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 130 |
__arm_vsetq_lane_s32 (int32_t __a, int32x4_t __b, const int __idx) |
| 131 |
{ |
| 132 |
__ARM_CHECK_LANEQ (__b, __idx); |
| 133 |
__b[__ARM_LANEQ(__b,__idx)] = __a; |
| 134 |
return __b; |
| 135 |
} |
| 136 |
|
| 137 |
__extension__ extern __inline int8x16_t |
| 138 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 139 |
__arm_vsetq_lane_s8 (int8_t __a, int8x16_t __b, const int __idx) |
| 140 |
{ |
| 141 |
__ARM_CHECK_LANEQ (__b, __idx); |
| 142 |
__b[__ARM_LANEQ(__b,__idx)] = __a; |
| 143 |
return __b; |
| 144 |
} |
| 145 |
|
| 146 |
__extension__ extern __inline int64x2_t |
| 147 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 148 |
__arm_vsetq_lane_s64 (int64_t __a, int64x2_t __b, const int __idx) |
| 149 |
{ |
| 150 |
__ARM_CHECK_LANEQ (__b, __idx); |
| 151 |
__b[__ARM_LANEQ(__b,__idx)] = __a; |
| 152 |
return __b; |
| 153 |
} |
| 154 |
|
| 155 |
__extension__ extern __inline uint8x16_t |
| 156 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 157 |
__arm_vsetq_lane_u8 (uint8_t __a, uint8x16_t __b, const int __idx) |
| 158 |
{ |
| 159 |
__ARM_CHECK_LANEQ (__b, __idx); |
| 160 |
__b[__ARM_LANEQ(__b,__idx)] = __a; |
| 161 |
return __b; |
| 162 |
} |
| 163 |
|
| 164 |
__extension__ extern __inline uint16x8_t |
| 165 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 166 |
__arm_vsetq_lane_u16 (uint16_t __a, uint16x8_t __b, const int __idx) |
| 167 |
{ |
| 168 |
__ARM_CHECK_LANEQ (__b, __idx); |
| 169 |
__b[__ARM_LANEQ(__b,__idx)] = __a; |
| 170 |
return __b; |
| 171 |
} |
| 172 |
|
| 173 |
__extension__ extern __inline uint32x4_t |
| 174 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 175 |
__arm_vsetq_lane_u32 (uint32_t __a, uint32x4_t __b, const int __idx) |
| 176 |
{ |
| 177 |
__ARM_CHECK_LANEQ (__b, __idx); |
| 178 |
__b[__ARM_LANEQ(__b,__idx)] = __a; |
| 179 |
return __b; |
| 180 |
} |
| 181 |
|
| 182 |
__extension__ extern __inline uint64x2_t |
| 183 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 184 |
__arm_vsetq_lane_u64 (uint64_t __a, uint64x2_t __b, const int __idx) |
| 185 |
{ |
| 186 |
__ARM_CHECK_LANEQ (__b, __idx); |
| 187 |
__b[__ARM_LANEQ(__b,__idx)] = __a; |
| 188 |
return __b; |
| 189 |
} |
| 190 |
|
| 191 |
__extension__ extern __inline int16_t |
| 192 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 193 |
__arm_vgetq_lane_s16 (int16x8_t __a, const int __idx) |
| 194 |
{ |
| 195 |
__ARM_CHECK_LANEQ (__a, __idx); |
| 196 |
return __a[__ARM_LANEQ(__a,__idx)]; |
| 197 |
} |
| 198 |
|
| 199 |
__extension__ extern __inline int32_t |
| 200 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 201 |
__arm_vgetq_lane_s32 (int32x4_t __a, const int __idx) |
| 202 |
{ |
| 203 |
__ARM_CHECK_LANEQ (__a, __idx); |
| 204 |
return __a[__ARM_LANEQ(__a,__idx)]; |
| 205 |
} |
| 206 |
|
| 207 |
__extension__ extern __inline int8_t |
| 208 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 209 |
__arm_vgetq_lane_s8 (int8x16_t __a, const int __idx) |
| 210 |
{ |
| 211 |
__ARM_CHECK_LANEQ (__a, __idx); |
| 212 |
return __a[__ARM_LANEQ(__a,__idx)]; |
| 213 |
} |
| 214 |
|
| 215 |
__extension__ extern __inline int64_t |
| 216 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 217 |
__arm_vgetq_lane_s64 (int64x2_t __a, const int __idx) |
| 218 |
{ |
| 219 |
__ARM_CHECK_LANEQ (__a, __idx); |
| 220 |
return __a[__ARM_LANEQ(__a,__idx)]; |
| 221 |
} |
| 222 |
|
| 223 |
__extension__ extern __inline uint8_t |
| 224 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 225 |
__arm_vgetq_lane_u8 (uint8x16_t __a, const int __idx) |
| 226 |
{ |
| 227 |
__ARM_CHECK_LANEQ (__a, __idx); |
| 228 |
return __a[__ARM_LANEQ(__a,__idx)]; |
| 229 |
} |
| 230 |
|
| 231 |
__extension__ extern __inline uint16_t |
| 232 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 233 |
__arm_vgetq_lane_u16 (uint16x8_t __a, const int __idx) |
| 234 |
{ |
| 235 |
__ARM_CHECK_LANEQ (__a, __idx); |
| 236 |
return __a[__ARM_LANEQ(__a,__idx)]; |
| 237 |
} |
| 238 |
|
| 239 |
__extension__ extern __inline uint32_t |
| 240 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 241 |
__arm_vgetq_lane_u32 (uint32x4_t __a, const int __idx) |
| 242 |
{ |
| 243 |
__ARM_CHECK_LANEQ (__a, __idx); |
| 244 |
return __a[__ARM_LANEQ(__a,__idx)]; |
| 245 |
} |
| 246 |
|
| 247 |
__extension__ extern __inline uint64_t |
| 248 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 249 |
__arm_vgetq_lane_u64 (uint64x2_t __a, const int __idx) |
| 250 |
{ |
| 251 |
__ARM_CHECK_LANEQ (__a, __idx); |
| 252 |
return __a[__ARM_LANEQ(__a,__idx)]; |
| 253 |
} |
| 254 |
|
| 255 |
__extension__ extern __inline uint64_t |
| 256 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 257 |
__arm_uqrshll (uint64_t value, int32_t shift) |
| 258 |
{ |
| 259 |
return __builtin_mve_uqrshll_sat64_di (value, shift); |
| 260 |
} |
| 261 |
|
| 262 |
__extension__ extern __inline uint64_t |
| 263 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 264 |
__arm_uqrshll_sat48 (uint64_t value, int32_t shift) |
| 265 |
{ |
| 266 |
return __builtin_mve_uqrshll_sat48_di (value, shift); |
| 267 |
} |
| 268 |
|
| 269 |
__extension__ extern __inline int64_t |
| 270 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 271 |
__arm_sqrshrl (int64_t value, int32_t shift) |
| 272 |
{ |
| 273 |
return __builtin_mve_sqrshrl_sat64_di (value, shift); |
| 274 |
} |
| 275 |
|
| 276 |
__extension__ extern __inline int64_t |
| 277 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 278 |
__arm_sqrshrl_sat48 (int64_t value, int32_t shift) |
| 279 |
{ |
| 280 |
return __builtin_mve_sqrshrl_sat48_di (value, shift); |
| 281 |
} |
| 282 |
|
| 283 |
__extension__ extern __inline uint64_t |
| 284 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 285 |
__arm_uqshll (uint64_t value, const int shift) |
| 286 |
{ |
| 287 |
return __builtin_mve_uqshll_di (value, shift); |
| 288 |
} |
| 289 |
|
| 290 |
__extension__ extern __inline uint64_t |
| 291 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 292 |
__arm_urshrl (uint64_t value, const int shift) |
| 293 |
{ |
| 294 |
return __builtin_mve_urshrl_di (value, shift); |
| 295 |
} |
| 296 |
|
| 297 |
__extension__ extern __inline int64_t |
| 298 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 299 |
__arm_srshrl (int64_t value, const int shift) |
| 300 |
{ |
| 301 |
return __builtin_mve_srshrl_di (value, shift); |
| 302 |
} |
| 303 |
|
| 304 |
__extension__ extern __inline int64_t |
| 305 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 306 |
__arm_sqshll (int64_t value, const int shift) |
| 307 |
{ |
| 308 |
return __builtin_mve_sqshll_di (value, shift); |
| 309 |
} |
| 310 |
|
| 311 |
__extension__ extern __inline uint32_t |
| 312 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 313 |
__arm_uqrshl (uint32_t value, int32_t shift) |
| 314 |
{ |
| 315 |
return __builtin_mve_uqrshl_si (value, shift); |
| 316 |
} |
| 317 |
|
| 318 |
__extension__ extern __inline int32_t |
| 319 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 320 |
__arm_sqrshr (int32_t value, int32_t shift) |
| 321 |
{ |
| 322 |
return __builtin_mve_sqrshr_si (value, shift); |
| 323 |
} |
| 324 |
|
| 325 |
__extension__ extern __inline uint32_t |
| 326 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 327 |
__arm_uqshl (uint32_t value, const int shift) |
| 328 |
{ |
| 329 |
return __builtin_mve_uqshl_si (value, shift); |
| 330 |
} |
| 331 |
|
| 332 |
__extension__ extern __inline uint32_t |
| 333 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 334 |
__arm_urshr (uint32_t value, const int shift) |
| 335 |
{ |
| 336 |
return __builtin_mve_urshr_si (value, shift); |
| 337 |
} |
| 338 |
|
| 339 |
__extension__ extern __inline int32_t |
| 340 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 341 |
__arm_sqshl (int32_t value, const int shift) |
| 342 |
{ |
| 343 |
return __builtin_mve_sqshl_si (value, shift); |
| 344 |
} |
| 345 |
|
| 346 |
__extension__ extern __inline int32_t |
| 347 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 348 |
__arm_srshr (int32_t value, const int shift) |
| 349 |
{ |
| 350 |
return __builtin_mve_srshr_si (value, shift); |
| 351 |
} |
| 352 |
|
| 353 |
#if (__ARM_FEATURE_MVE & 2) /* MVE Floating point. */ |
| 354 |
|
| 355 |
__extension__ extern __inline float16x8_t |
| 356 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 357 |
__arm_vsetq_lane_f16 (float16_t __a, float16x8_t __b, const int __idx) |
| 358 |
{ |
| 359 |
__ARM_CHECK_LANEQ (__b, __idx); |
| 360 |
__b[__ARM_LANEQ(__b,__idx)] = __a; |
| 361 |
return __b; |
| 362 |
} |
| 363 |
|
| 364 |
__extension__ extern __inline float32x4_t |
| 365 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 366 |
__arm_vsetq_lane_f32 (float32_t __a, float32x4_t __b, const int __idx) |
| 367 |
{ |
| 368 |
__ARM_CHECK_LANEQ (__b, __idx); |
| 369 |
__b[__ARM_LANEQ(__b,__idx)] = __a; |
| 370 |
return __b; |
| 371 |
} |
| 372 |
|
| 373 |
__extension__ extern __inline float16_t |
| 374 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 375 |
__arm_vgetq_lane_f16 (float16x8_t __a, const int __idx) |
| 376 |
{ |
| 377 |
__ARM_CHECK_LANEQ (__a, __idx); |
| 378 |
return __a[__ARM_LANEQ(__a,__idx)]; |
| 379 |
} |
| 380 |
|
| 381 |
__extension__ extern __inline float32_t |
| 382 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 383 |
__arm_vgetq_lane_f32 (float32x4_t __a, const int __idx) |
| 384 |
{ |
| 385 |
__ARM_CHECK_LANEQ (__a, __idx); |
| 386 |
return __a[__ARM_LANEQ(__a,__idx)]; |
| 387 |
} |
| 388 |
#endif |
| 389 |
|
| 390 |
#ifdef __cplusplus |
| 391 |
|
| 392 |
__extension__ extern __inline int16x8_t |
| 393 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 394 |
__arm_vsetq_lane (int16_t __a, int16x8_t __b, const int __idx) |
| 395 |
{ |
| 396 |
return __arm_vsetq_lane_s16 (__a, __b, __idx); |
| 397 |
} |
| 398 |
|
| 399 |
__extension__ extern __inline int32x4_t |
| 400 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 401 |
__arm_vsetq_lane (int32_t __a, int32x4_t __b, const int __idx) |
| 402 |
{ |
| 403 |
return __arm_vsetq_lane_s32 (__a, __b, __idx); |
| 404 |
} |
| 405 |
|
| 406 |
__extension__ extern __inline int8x16_t |
| 407 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 408 |
__arm_vsetq_lane (int8_t __a, int8x16_t __b, const int __idx) |
| 409 |
{ |
| 410 |
return __arm_vsetq_lane_s8 (__a, __b, __idx); |
| 411 |
} |
| 412 |
|
| 413 |
__extension__ extern __inline int64x2_t |
| 414 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 415 |
__arm_vsetq_lane (int64_t __a, int64x2_t __b, const int __idx) |
| 416 |
{ |
| 417 |
return __arm_vsetq_lane_s64 (__a, __b, __idx); |
| 418 |
} |
| 419 |
|
| 420 |
__extension__ extern __inline uint8x16_t |
| 421 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 422 |
__arm_vsetq_lane (uint8_t __a, uint8x16_t __b, const int __idx) |
| 423 |
{ |
| 424 |
return __arm_vsetq_lane_u8 (__a, __b, __idx); |
| 425 |
} |
| 426 |
|
| 427 |
__extension__ extern __inline uint16x8_t |
| 428 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 429 |
__arm_vsetq_lane (uint16_t __a, uint16x8_t __b, const int __idx) |
| 430 |
{ |
| 431 |
return __arm_vsetq_lane_u16 (__a, __b, __idx); |
| 432 |
} |
| 433 |
|
| 434 |
__extension__ extern __inline uint32x4_t |
| 435 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 436 |
__arm_vsetq_lane (uint32_t __a, uint32x4_t __b, const int __idx) |
| 437 |
{ |
| 438 |
return __arm_vsetq_lane_u32 (__a, __b, __idx); |
| 439 |
} |
| 440 |
|
| 441 |
__extension__ extern __inline uint64x2_t |
| 442 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 443 |
__arm_vsetq_lane (uint64_t __a, uint64x2_t __b, const int __idx) |
| 444 |
{ |
| 445 |
return __arm_vsetq_lane_u64 (__a, __b, __idx); |
| 446 |
} |
| 447 |
|
| 448 |
__extension__ extern __inline int16_t |
| 449 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 450 |
__arm_vgetq_lane (int16x8_t __a, const int __idx) |
| 451 |
{ |
| 452 |
return __arm_vgetq_lane_s16 (__a, __idx); |
| 453 |
} |
| 454 |
|
| 455 |
__extension__ extern __inline int32_t |
| 456 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 457 |
__arm_vgetq_lane (int32x4_t __a, const int __idx) |
| 458 |
{ |
| 459 |
return __arm_vgetq_lane_s32 (__a, __idx); |
| 460 |
} |
| 461 |
|
| 462 |
__extension__ extern __inline int8_t |
| 463 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 464 |
__arm_vgetq_lane (int8x16_t __a, const int __idx) |
| 465 |
{ |
| 466 |
return __arm_vgetq_lane_s8 (__a, __idx); |
| 467 |
} |
| 468 |
|
| 469 |
__extension__ extern __inline int64_t |
| 470 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 471 |
__arm_vgetq_lane (int64x2_t __a, const int __idx) |
| 472 |
{ |
| 473 |
return __arm_vgetq_lane_s64 (__a, __idx); |
| 474 |
} |
| 475 |
|
| 476 |
__extension__ extern __inline uint8_t |
| 477 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 478 |
__arm_vgetq_lane (uint8x16_t __a, const int __idx) |
| 479 |
{ |
| 480 |
return __arm_vgetq_lane_u8 (__a, __idx); |
| 481 |
} |
| 482 |
|
| 483 |
__extension__ extern __inline uint16_t |
| 484 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 485 |
__arm_vgetq_lane (uint16x8_t __a, const int __idx) |
| 486 |
{ |
| 487 |
return __arm_vgetq_lane_u16 (__a, __idx); |
| 488 |
} |
| 489 |
|
| 490 |
__extension__ extern __inline uint32_t |
| 491 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 492 |
__arm_vgetq_lane (uint32x4_t __a, const int __idx) |
| 493 |
{ |
| 494 |
return __arm_vgetq_lane_u32 (__a, __idx); |
| 495 |
} |
| 496 |
|
| 497 |
__extension__ extern __inline uint64_t |
| 498 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 499 |
__arm_vgetq_lane (uint64x2_t __a, const int __idx) |
| 500 |
{ |
| 501 |
return __arm_vgetq_lane_u64 (__a, __idx); |
| 502 |
} |
| 503 |
|
| 504 |
#if (__ARM_FEATURE_MVE & 2) /* MVE Floating point. */ |
| 505 |
|
| 506 |
__extension__ extern __inline float16x8_t |
| 507 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 508 |
__arm_vsetq_lane (float16_t __a, float16x8_t __b, const int __idx) |
| 509 |
{ |
| 510 |
return __arm_vsetq_lane_f16 (__a, __b, __idx); |
| 511 |
} |
| 512 |
|
| 513 |
__extension__ extern __inline float32x4_t |
| 514 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 515 |
__arm_vsetq_lane (float32_t __a, float32x4_t __b, const int __idx) |
| 516 |
{ |
| 517 |
return __arm_vsetq_lane_f32 (__a, __b, __idx); |
| 518 |
} |
| 519 |
|
| 520 |
__extension__ extern __inline float16_t |
| 521 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 522 |
__arm_vgetq_lane (float16x8_t __a, const int __idx) |
| 523 |
{ |
| 524 |
return __arm_vgetq_lane_f16 (__a, __idx); |
| 525 |
} |
| 526 |
|
| 527 |
__extension__ extern __inline float32_t |
| 528 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 529 |
__arm_vgetq_lane (float32x4_t __a, const int __idx) |
| 530 |
{ |
| 531 |
return __arm_vgetq_lane_f32 (__a, __idx); |
| 532 |
} |
| 533 |
#endif /* MVE Floating point. */ |
| 534 |
|
| 535 |
|
| 536 |
__extension__ extern __inline uint8x16_t |
| 537 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 538 |
__arm_vuninitializedq (uint8x16_t /* __v ATTRIBUTE UNUSED */) |
| 539 |
{ |
| 540 |
return __arm_vuninitializedq_u8 (); |
| 541 |
} |
| 542 |
|
| 543 |
__extension__ extern __inline uint16x8_t |
| 544 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 545 |
__arm_vuninitializedq (uint16x8_t /* __v ATTRIBUTE UNUSED */) |
| 546 |
{ |
| 547 |
return __arm_vuninitializedq_u16 (); |
| 548 |
} |
| 549 |
|
| 550 |
__extension__ extern __inline uint32x4_t |
| 551 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 552 |
__arm_vuninitializedq (uint32x4_t /* __v ATTRIBUTE UNUSED */) |
| 553 |
{ |
| 554 |
return __arm_vuninitializedq_u32 (); |
| 555 |
} |
| 556 |
|
| 557 |
__extension__ extern __inline uint64x2_t |
| 558 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 559 |
__arm_vuninitializedq (uint64x2_t /* __v ATTRIBUTE UNUSED */) |
| 560 |
{ |
| 561 |
return __arm_vuninitializedq_u64 (); |
| 562 |
} |
| 563 |
|
| 564 |
__extension__ extern __inline int8x16_t |
| 565 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 566 |
__arm_vuninitializedq (int8x16_t /* __v ATTRIBUTE UNUSED */) |
| 567 |
{ |
| 568 |
return __arm_vuninitializedq_s8 (); |
| 569 |
} |
| 570 |
|
| 571 |
__extension__ extern __inline int16x8_t |
| 572 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 573 |
__arm_vuninitializedq (int16x8_t /* __v ATTRIBUTE UNUSED */) |
| 574 |
{ |
| 575 |
return __arm_vuninitializedq_s16 (); |
| 576 |
} |
| 577 |
|
| 578 |
__extension__ extern __inline int32x4_t |
| 579 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 580 |
__arm_vuninitializedq (int32x4_t /* __v ATTRIBUTE UNUSED */) |
| 581 |
{ |
| 582 |
return __arm_vuninitializedq_s32 (); |
| 583 |
} |
| 584 |
|
| 585 |
__extension__ extern __inline int64x2_t |
| 586 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 587 |
__arm_vuninitializedq (int64x2_t /* __v ATTRIBUTE UNUSED */) |
| 588 |
{ |
| 589 |
return __arm_vuninitializedq_s64 (); |
| 590 |
} |
| 591 |
|
| 592 |
#if (__ARM_FEATURE_MVE & 2) /* MVE Floating point. */ |
| 593 |
__extension__ extern __inline float16x8_t |
| 594 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 595 |
__arm_vuninitializedq (float16x8_t /* __v ATTRIBUTE UNUSED */) |
| 596 |
{ |
| 597 |
return __arm_vuninitializedq_f16 (); |
| 598 |
} |
| 599 |
|
| 600 |
__extension__ extern __inline float32x4_t |
| 601 |
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) |
| 602 |
__arm_vuninitializedq (float32x4_t /* __v ATTRIBUTE UNUSED */) |
| 603 |
{ |
| 604 |
return __arm_vuninitializedq_f32 (); |
| 605 |
} |
| 606 |
#endif /* __ARM_FEATURE_MVE & 2 (MVE floating point) */ |
| 607 |
|
| 608 |
#else |
| 609 |
enum { |
| 610 |
__ARM_mve_type_fp_n = 1, |
| 611 |
__ARM_mve_type_int_n, |
| 612 |
__ARM_mve_type_float16_t_ptr, |
| 613 |
__ARM_mve_type_float16x8_t, |
| 614 |
__ARM_mve_type_float16x8x2_t, |
| 615 |
__ARM_mve_type_float16x8x4_t, |
| 616 |
__ARM_mve_type_float32_t_ptr, |
| 617 |
__ARM_mve_type_float32x4_t, |
| 618 |
__ARM_mve_type_float32x4x2_t, |
| 619 |
__ARM_mve_type_float32x4x4_t, |
| 620 |
__ARM_mve_type_int16_t_ptr, |
| 621 |
__ARM_mve_type_int16x8_t, |
| 622 |
__ARM_mve_type_int16x8x2_t, |
| 623 |
__ARM_mve_type_int16x8x4_t, |
| 624 |
__ARM_mve_type_int32_t_ptr, |
| 625 |
__ARM_mve_type_int32x4_t, |
| 626 |
__ARM_mve_type_int32x4x2_t, |
| 627 |
__ARM_mve_type_int32x4x4_t, |
| 628 |
__ARM_mve_type_int64_t_ptr, |
| 629 |
__ARM_mve_type_int64x2_t, |
| 630 |
__ARM_mve_type_int8_t_ptr, |
| 631 |
__ARM_mve_type_int8x16_t, |
| 632 |
__ARM_mve_type_int8x16x2_t, |
| 633 |
__ARM_mve_type_int8x16x4_t, |
| 634 |
__ARM_mve_type_uint16_t_ptr, |
| 635 |
__ARM_mve_type_uint16x8_t, |
| 636 |
__ARM_mve_type_uint16x8x2_t, |
| 637 |
__ARM_mve_type_uint16x8x4_t, |
| 638 |
__ARM_mve_type_uint32_t_ptr, |
| 639 |
__ARM_mve_type_uint32x4_t, |
| 640 |
__ARM_mve_type_uint32x4x2_t, |
| 641 |
__ARM_mve_type_uint32x4x4_t, |
| 642 |
__ARM_mve_type_uint64_t_ptr, |
| 643 |
__ARM_mve_type_uint64x2_t, |
| 644 |
__ARM_mve_type_uint8_t_ptr, |
| 645 |
__ARM_mve_type_uint8x16_t, |
| 646 |
__ARM_mve_type_uint8x16x2_t, |
| 647 |
__ARM_mve_type_uint8x16x4_t, |
| 648 |
__ARM_mve_unsupported_type |
| 649 |
}; |
| 650 |
|
| 651 |
#if (__ARM_FEATURE_MVE & 2) /* MVE Floating point. */ |
| 652 |
#define __ARM_mve_typeid(x) _Generic(x, \ |
| 653 |
float16_t: __ARM_mve_type_fp_n, \ |
| 654 |
float16_t *: __ARM_mve_type_float16_t_ptr, \ |
| 655 |
float16_t const *: __ARM_mve_type_float16_t_ptr, \ |
| 656 |
float16x8_t: __ARM_mve_type_float16x8_t, \ |
| 657 |
float16x8x2_t: __ARM_mve_type_float16x8x2_t, \ |
| 658 |
float16x8x4_t: __ARM_mve_type_float16x8x4_t, \ |
| 659 |
float32_t: __ARM_mve_type_fp_n, \ |
| 660 |
float32_t *: __ARM_mve_type_float32_t_ptr, \ |
| 661 |
float32_t const *: __ARM_mve_type_float32_t_ptr, \ |
| 662 |
float32x4_t: __ARM_mve_type_float32x4_t, \ |
| 663 |
float32x4x2_t: __ARM_mve_type_float32x4x2_t, \ |
| 664 |
float32x4x4_t: __ARM_mve_type_float32x4x4_t, \ |
| 665 |
int16_t: __ARM_mve_type_int_n, \ |
| 666 |
int16_t *: __ARM_mve_type_int16_t_ptr, \ |
| 667 |
int16_t const *: __ARM_mve_type_int16_t_ptr, \ |
| 668 |
int16x8_t: __ARM_mve_type_int16x8_t, \ |
| 669 |
int16x8x2_t: __ARM_mve_type_int16x8x2_t, \ |
| 670 |
int16x8x4_t: __ARM_mve_type_int16x8x4_t, \ |
| 671 |
int32_t: __ARM_mve_type_int_n, \ |
| 672 |
int32_t *: __ARM_mve_type_int32_t_ptr, \ |
| 673 |
int32_t const *: __ARM_mve_type_int32_t_ptr, \ |
| 674 |
int32x4_t: __ARM_mve_type_int32x4_t, \ |
| 675 |
int32x4x2_t: __ARM_mve_type_int32x4x2_t, \ |
| 676 |
int32x4x4_t: __ARM_mve_type_int32x4x4_t, \ |
| 677 |
int64_t: __ARM_mve_type_int_n, \ |
| 678 |
int64_t *: __ARM_mve_type_int64_t_ptr, \ |
| 679 |
int64_t const *: __ARM_mve_type_int64_t_ptr, \ |
| 680 |
int64x2_t: __ARM_mve_type_int64x2_t, \ |
| 681 |
int8_t: __ARM_mve_type_int_n, \ |
| 682 |
int8_t *: __ARM_mve_type_int8_t_ptr, \ |
| 683 |
int8_t const *: __ARM_mve_type_int8_t_ptr, \ |
| 684 |
int8x16_t: __ARM_mve_type_int8x16_t, \ |
| 685 |
int8x16x2_t: __ARM_mve_type_int8x16x2_t, \ |
| 686 |
int8x16x4_t: __ARM_mve_type_int8x16x4_t, \ |
| 687 |
uint16_t: __ARM_mve_type_int_n, \ |
| 688 |
uint16_t *: __ARM_mve_type_uint16_t_ptr, \ |
| 689 |
uint16_t const *: __ARM_mve_type_uint16_t_ptr, \ |
| 690 |
uint16x8_t: __ARM_mve_type_uint16x8_t, \ |
| 691 |
uint16x8x2_t: __ARM_mve_type_uint16x8x2_t, \ |
| 692 |
uint16x8x4_t: __ARM_mve_type_uint16x8x4_t, \ |
| 693 |
uint32_t: __ARM_mve_type_int_n, \ |
| 694 |
uint32_t *: __ARM_mve_type_uint32_t_ptr, \ |
| 695 |
uint32_t const *: __ARM_mve_type_uint32_t_ptr, \ |
| 696 |
uint32x4_t: __ARM_mve_type_uint32x4_t, \ |
| 697 |
uint32x4x2_t: __ARM_mve_type_uint32x4x2_t, \ |
| 698 |
uint32x4x4_t: __ARM_mve_type_uint32x4x4_t, \ |
| 699 |
uint64_t: __ARM_mve_type_int_n, \ |
| 700 |
uint64_t *: __ARM_mve_type_uint64_t_ptr, \ |
| 701 |
uint64_t const *: __ARM_mve_type_uint64_t_ptr, \ |
| 702 |
uint64x2_t: __ARM_mve_type_uint64x2_t, \ |
| 703 |
uint8_t: __ARM_mve_type_int_n, \ |
| 704 |
uint8_t *: __ARM_mve_type_uint8_t_ptr, \ |
| 705 |
uint8_t const *: __ARM_mve_type_uint8_t_ptr, \ |
| 706 |
uint8x16_t: __ARM_mve_type_uint8x16_t, \ |
| 707 |
uint8x16x2_t: __ARM_mve_type_uint8x16x2_t, \ |
| 708 |
uint8x16x4_t: __ARM_mve_type_uint8x16x4_t, \ |
| 709 |
default: _Generic(x, \ |
| 710 |
signed char: __ARM_mve_type_int_n, \ |
| 711 |
short: __ARM_mve_type_int_n, \ |
| 712 |
int: __ARM_mve_type_int_n, \ |
| 713 |
long: __ARM_mve_type_int_n, \ |
| 714 |
long long: __ARM_mve_type_int_n, \ |
| 715 |
_Float16: __ARM_mve_type_fp_n, \ |
| 716 |
__fp16: __ARM_mve_type_fp_n, \ |
| 717 |
float: __ARM_mve_type_fp_n, \ |
| 718 |
double: __ARM_mve_type_fp_n, \ |
| 719 |
unsigned char: __ARM_mve_type_int_n, \ |
| 720 |
unsigned short: __ARM_mve_type_int_n, \ |
| 721 |
unsigned int: __ARM_mve_type_int_n, \ |
| 722 |
unsigned long: __ARM_mve_type_int_n, \ |
| 723 |
unsigned long long: __ARM_mve_type_int_n, \ |
| 724 |
signed char*: __ARM_mve_type_int8_t_ptr, \ |
| 725 |
short*: __ARM_mve_type_int16_t_ptr, \ |
| 726 |
int*: __ARM_mve_type_int32_t_ptr, \ |
| 727 |
long*: __ARM_mve_type_int32_t_ptr, \ |
| 728 |
long long*: __ARM_mve_type_int64_t_ptr, \ |
| 729 |
_Float16*: __ARM_mve_type_float16_t_ptr, \ |
| 730 |
__fp16*: __ARM_mve_type_float16_t_ptr, \ |
| 731 |
float*: __ARM_mve_type_float32_t_ptr, \ |
| 732 |
unsigned char*: __ARM_mve_type_uint8_t_ptr, \ |
| 733 |
unsigned short*: __ARM_mve_type_uint16_t_ptr, \ |
| 734 |
unsigned int*: __ARM_mve_type_uint32_t_ptr, \ |
| 735 |
unsigned long*: __ARM_mve_type_uint32_t_ptr, \ |
| 736 |
unsigned long long*: __ARM_mve_type_uint64_t_ptr, \ |
| 737 |
default: __ARM_mve_unsupported_type)) |
| 738 |
#else |
| 739 |
#define __ARM_mve_typeid(x) _Generic(x, \ |
| 740 |
int16_t: __ARM_mve_type_int_n, \ |
| 741 |
int16_t *: __ARM_mve_type_int16_t_ptr, \ |
| 742 |
int16_t const *: __ARM_mve_type_int16_t_ptr, \ |
| 743 |
int16x8_t: __ARM_mve_type_int16x8_t, \ |
| 744 |
int16x8x2_t: __ARM_mve_type_int16x8x2_t, \ |
| 745 |
int16x8x4_t: __ARM_mve_type_int16x8x4_t, \ |
| 746 |
int32_t: __ARM_mve_type_int_n, \ |
| 747 |
int32_t *: __ARM_mve_type_int32_t_ptr, \ |
| 748 |
int32_t const *: __ARM_mve_type_int32_t_ptr, \ |
| 749 |
int32x4_t: __ARM_mve_type_int32x4_t, \ |
| 750 |
int32x4x2_t: __ARM_mve_type_int32x4x2_t, \ |
| 751 |
int32x4x4_t: __ARM_mve_type_int32x4x4_t, \ |
| 752 |
int64_t: __ARM_mve_type_int_n, \ |
| 753 |
int64_t *: __ARM_mve_type_int64_t_ptr, \ |
| 754 |
int64_t const *: __ARM_mve_type_int64_t_ptr, \ |
| 755 |
int64x2_t: __ARM_mve_type_int64x2_t, \ |
| 756 |
int8_t: __ARM_mve_type_int_n, \ |
| 757 |
int8_t *: __ARM_mve_type_int8_t_ptr, \ |
| 758 |
int8_t const *: __ARM_mve_type_int8_t_ptr, \ |
| 759 |
int8x16_t: __ARM_mve_type_int8x16_t, \ |
| 760 |
int8x16x2_t: __ARM_mve_type_int8x16x2_t, \ |
| 761 |
int8x16x4_t: __ARM_mve_type_int8x16x4_t, \ |
| 762 |
uint16_t: __ARM_mve_type_int_n, \ |
| 763 |
uint16_t *: __ARM_mve_type_uint16_t_ptr, \ |
| 764 |
uint16_t const *: __ARM_mve_type_uint16_t_ptr, \ |
| 765 |
uint16x8_t: __ARM_mve_type_uint16x8_t, \ |
| 766 |
uint16x8x2_t: __ARM_mve_type_uint16x8x2_t, \ |
| 767 |
uint16x8x4_t: __ARM_mve_type_uint16x8x4_t, \ |
| 768 |
uint32_t: __ARM_mve_type_int_n, \ |
| 769 |
uint32_t *: __ARM_mve_type_uint32_t_ptr, \ |
| 770 |
uint32_t const *: __ARM_mve_type_uint32_t_ptr, \ |
| 771 |
uint32x4_t: __ARM_mve_type_uint32x4_t, \ |
| 772 |
uint32x4x2_t: __ARM_mve_type_uint32x4x2_t, \ |
| 773 |
uint32x4x4_t: __ARM_mve_type_uint32x4x4_t, \ |
| 774 |
uint64_t: __ARM_mve_type_int_n, \ |
| 775 |
uint64_t *: __ARM_mve_type_uint64_t_ptr, \ |
| 776 |
uint64_t const *: __ARM_mve_type_uint64_t_ptr, \ |
| 777 |
uint64x2_t: __ARM_mve_type_uint64x2_t, \ |
| 778 |
uint8_t: __ARM_mve_type_int_n, \ |
| 779 |
uint8_t *: __ARM_mve_type_uint8_t_ptr, \ |
| 780 |
uint8_t const *: __ARM_mve_type_uint8_t_ptr, \ |
| 781 |
uint8x16_t: __ARM_mve_type_uint8x16_t, \ |
| 782 |
uint8x16x2_t: __ARM_mve_type_uint8x16x2_t, \ |
| 783 |
uint8x16x4_t: __ARM_mve_type_uint8x16x4_t, \ |
| 784 |
default: _Generic(x, \ |
| 785 |
signed char: __ARM_mve_type_int_n, \ |
| 786 |
short: __ARM_mve_type_int_n, \ |
| 787 |
int: __ARM_mve_type_int_n, \ |
| 788 |
long: __ARM_mve_type_int_n, \ |
| 789 |
long long: __ARM_mve_type_int_n, \ |
| 790 |
unsigned char: __ARM_mve_type_int_n, \ |
| 791 |
unsigned short: __ARM_mve_type_int_n, \ |
| 792 |
unsigned int: __ARM_mve_type_int_n, \ |
| 793 |
unsigned long: __ARM_mve_type_int_n, \ |
| 794 |
unsigned long long: __ARM_mve_type_int_n, \ |
| 795 |
signed char*: __ARM_mve_type_int8_t_ptr, \ |
| 796 |
short*: __ARM_mve_type_int16_t_ptr, \ |
| 797 |
int*: __ARM_mve_type_int32_t_ptr, \ |
| 798 |
long*: __ARM_mve_type_int32_t_ptr, \ |
| 799 |
long long*: __ARM_mve_type_int64_t_ptr, \ |
| 800 |
unsigned char*: __ARM_mve_type_uint8_t_ptr, \ |
| 801 |
unsigned short*: __ARM_mve_type_uint16_t_ptr, \ |
| 802 |
unsigned int*: __ARM_mve_type_uint32_t_ptr, \ |
| 803 |
unsigned long*: __ARM_mve_type_uint32_t_ptr, \ |
| 804 |
unsigned long long*: __ARM_mve_type_uint64_t_ptr, \ |
| 805 |
default: __ARM_mve_unsupported_type)) |
| 806 |
#endif /* MVE Floating point. */ |
| 807 |
|
| 808 |
extern void *__ARM_undef; |
| 809 |
#define __ARM_mve_coerce(param, type) \ |
| 810 |
_Generic(param, type: param, default: *(type *)__ARM_undef) |
| 811 |
#define __ARM_mve_coerce_i_scalar(param, type) \ |
| 812 |
_Generic(param, type: param, const type: param, default: _Generic (param, int8_t: param, int16_t: param, int32_t: param, int64_t: param, uint8_t: param, uint16_t: param, uint32_t: param, uint64_t: param, default: *(type *)__ARM_undef)) |
| 813 |
|
| 814 |
#define __ARM_mve_coerce_s8_ptr(param, type) \ |
| 815 |
_Generic(param, type: param, const type: param, default: _Generic (param, signed char*: param, default: *(type *)__ARM_undef)) |
| 816 |
#define __ARM_mve_coerce_u8_ptr(param, type) \ |
| 817 |
_Generic(param, type: param, const type: param, default: _Generic (param, unsigned char*: param, default: *(type *)__ARM_undef)) |
| 818 |
|
| 819 |
#define __ARM_mve_coerce_s16_ptr(param, type) \ |
| 820 |
_Generic(param, type: param, const type: param, default: _Generic (param, short*: param, default: *(type *)__ARM_undef)) |
| 821 |
#define __ARM_mve_coerce_u16_ptr(param, type) \ |
| 822 |
_Generic(param, type: param, const type: param, default: _Generic (param, unsigned short*: param, default: *(type *)__ARM_undef)) |
| 823 |
|
| 824 |
#define __ARM_mve_coerce_s32_ptr(param, type) \ |
| 825 |
_Generic(param, type: param, const type: param, default: _Generic (param, int*: param, long*: param, default: *(type *)__ARM_undef)) |
| 826 |
#define __ARM_mve_coerce_u32_ptr(param, type) \ |
| 827 |
_Generic(param, type: param, const type: param, default: _Generic (param, unsigned int*: param, unsigned long*: param, default: *(type *)__ARM_undef)) |
| 828 |
|
| 829 |
#define __ARM_mve_coerce_s64_ptr(param, type) \ |
| 830 |
_Generic(param, type: param, const type: param, default: _Generic (param, long long*: param, default: *(type *)__ARM_undef)) |
| 831 |
#define __ARM_mve_coerce_u64_ptr(param, type) \ |
| 832 |
_Generic(param, type: param, const type: param, default: _Generic (param, unsigned long long*: param, default: *(type *)__ARM_undef)) |
| 833 |
|
| 834 |
#if (__ARM_FEATURE_MVE & 2) /* MVE Floating point. */ |
| 835 |
#define __ARM_mve_coerce_f_scalar(param, type) \ |
| 836 |
_Generic(param, type: param, const type: param, __fp16: param, default: _Generic (param, _Float16: param, float16_t: param, float32_t: param, default: *(type *)__ARM_undef)) |
| 837 |
#define __ARM_mve_coerce_f16_ptr(param, type) \ |
| 838 |
_Generic(param, type: param, const type: param, default: _Generic (param, __fp16*: param, _Float16*: param, default: *(type *)__ARM_undef)) |
| 839 |
#define __ARM_mve_coerce_f32_ptr(param, type) \ |
| 840 |
_Generic(param, type: param, const type: param, default: _Generic (param, float*: param, default: *(type *)__ARM_undef)) |
| 841 |
#endif |
| 842 |
|
| 843 |
#if (__ARM_FEATURE_MVE & 2) /* MVE Floating point. */ |
| 844 |
|
| 845 |
#define __arm_vuninitializedq(p0) ({ __typeof(p0) __p0 = (p0); \ |
| 846 |
_Generic( (int (*)[__ARM_mve_typeid(__p0)])0, \ |
| 847 |
int (*)[__ARM_mve_type_int8x16_t]: __arm_vuninitializedq_s8 (), \ |
| 848 |
int (*)[__ARM_mve_type_int16x8_t]: __arm_vuninitializedq_s16 (), \ |
| 849 |
int (*)[__ARM_mve_type_int32x4_t]: __arm_vuninitializedq_s32 (), \ |
| 850 |
int (*)[__ARM_mve_type_int64x2_t]: __arm_vuninitializedq_s64 (), \ |
| 851 |
int (*)[__ARM_mve_type_uint8x16_t]: __arm_vuninitializedq_u8 (), \ |
| 852 |
int (*)[__ARM_mve_type_uint16x8_t]: __arm_vuninitializedq_u16 (), \ |
| 853 |
int (*)[__ARM_mve_type_uint32x4_t]: __arm_vuninitializedq_u32 (), \ |
| 854 |
int (*)[__ARM_mve_type_uint64x2_t]: __arm_vuninitializedq_u64 (), \ |
| 855 |
int (*)[__ARM_mve_type_float16x8_t]: __arm_vuninitializedq_f16 (), \ |
| 856 |
int (*)[__ARM_mve_type_float32x4_t]: __arm_vuninitializedq_f32 ());}) |
| 857 |
|
| 858 |
#define __arm_vgetq_lane(p0,p1) ({ __typeof(p0) __p0 = (p0); \ |
| 859 |
_Generic( (int (*)[__ARM_mve_typeid(__p0)])0, \ |
| 860 |
int (*)[__ARM_mve_type_int8x16_t]: __arm_vgetq_lane_s8 (__ARM_mve_coerce(__p0, int8x16_t), p1), \ |
| 861 |
int (*)[__ARM_mve_type_int16x8_t]: __arm_vgetq_lane_s16 (__ARM_mve_coerce(__p0, int16x8_t), p1), \ |
| 862 |
int (*)[__ARM_mve_type_int32x4_t]: __arm_vgetq_lane_s32 (__ARM_mve_coerce(__p0, int32x4_t), p1), \ |
| 863 |
int (*)[__ARM_mve_type_int64x2_t]: __arm_vgetq_lane_s64 (__ARM_mve_coerce(__p0, int64x2_t), p1), \ |
| 864 |
int (*)[__ARM_mve_type_uint8x16_t]: __arm_vgetq_lane_u8 (__ARM_mve_coerce(__p0, uint8x16_t), p1), \ |
| 865 |
int (*)[__ARM_mve_type_uint16x8_t]: __arm_vgetq_lane_u16 (__ARM_mve_coerce(__p0, uint16x8_t), p1), \ |
| 866 |
int (*)[__ARM_mve_type_uint32x4_t]: __arm_vgetq_lane_u32 (__ARM_mve_coerce(__p0, uint32x4_t), p1), \ |
| 867 |
int (*)[__ARM_mve_type_uint64x2_t]: __arm_vgetq_lane_u64 (__ARM_mve_coerce(__p0, uint64x2_t), p1), \ |
| 868 |
int (*)[__ARM_mve_type_float16x8_t]: __arm_vgetq_lane_f16 (__ARM_mve_coerce(__p0, float16x8_t), p1), \ |
| 869 |
int (*)[__ARM_mve_type_float32x4_t]: __arm_vgetq_lane_f32 (__ARM_mve_coerce(__p0, float32x4_t), p1));}) |
| 870 |
|
| 871 |
#define __arm_vsetq_lane(p0,p1,p2) ({ __typeof(p0) __p0 = (p0); \ |
| 872 |
__typeof(p1) __p1 = (p1); \ |
| 873 |
_Generic( (int (*)[__ARM_mve_typeid(__p0)][__ARM_mve_typeid(__p1)])0, \ |
| 874 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_int8x16_t]: __arm_vsetq_lane_s8 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, int8x16_t), p2), \ |
| 875 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_int16x8_t]: __arm_vsetq_lane_s16 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, int16x8_t), p2), \ |
| 876 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_int32x4_t]: __arm_vsetq_lane_s32 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, int32x4_t), p2), \ |
| 877 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_int64x2_t]: __arm_vsetq_lane_s64 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, int64x2_t), p2), \ |
| 878 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_uint8x16_t]: __arm_vsetq_lane_u8 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, uint8x16_t), p2), \ |
| 879 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_uint16x8_t]: __arm_vsetq_lane_u16 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, uint16x8_t), p2), \ |
| 880 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_uint32x4_t]: __arm_vsetq_lane_u32 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, uint32x4_t), p2), \ |
| 881 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_uint64x2_t]: __arm_vsetq_lane_u64 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, uint64x2_t), p2), \ |
| 882 |
int (*)[__ARM_mve_type_fp_n][__ARM_mve_type_float16x8_t]: __arm_vsetq_lane_f16 (__ARM_mve_coerce_f_scalar(__p0, double), __ARM_mve_coerce(__p1, float16x8_t), p2), \ |
| 883 |
int (*)[__ARM_mve_type_fp_n][__ARM_mve_type_float32x4_t]: __arm_vsetq_lane_f32 (__ARM_mve_coerce_f_scalar(__p0, double), __ARM_mve_coerce(__p1, float32x4_t), p2));}) |
| 884 |
|
| 885 |
#else /* MVE Integer. */ |
| 886 |
|
| 887 |
#define __arm_vuninitializedq(p0) ({ __typeof(p0) __p0 = (p0); \ |
| 888 |
_Generic( (int (*)[__ARM_mve_typeid(__p0)])0, \ |
| 889 |
int (*)[__ARM_mve_type_int8x16_t]: __arm_vuninitializedq_s8 (), \ |
| 890 |
int (*)[__ARM_mve_type_int16x8_t]: __arm_vuninitializedq_s16 (), \ |
| 891 |
int (*)[__ARM_mve_type_int32x4_t]: __arm_vuninitializedq_s32 (), \ |
| 892 |
int (*)[__ARM_mve_type_int64x2_t]: __arm_vuninitializedq_s64 (), \ |
| 893 |
int (*)[__ARM_mve_type_uint8x16_t]: __arm_vuninitializedq_u8 (), \ |
| 894 |
int (*)[__ARM_mve_type_uint16x8_t]: __arm_vuninitializedq_u16 (), \ |
| 895 |
int (*)[__ARM_mve_type_uint32x4_t]: __arm_vuninitializedq_u32 (), \ |
| 896 |
int (*)[__ARM_mve_type_uint64x2_t]: __arm_vuninitializedq_u64 ());}) |
| 897 |
|
| 898 |
#define __arm_vgetq_lane(p0,p1) ({ __typeof(p0) __p0 = (p0); \ |
| 899 |
_Generic( (int (*)[__ARM_mve_typeid(__p0)])0, \ |
| 900 |
int (*)[__ARM_mve_type_int8x16_t]: __arm_vgetq_lane_s8 (__ARM_mve_coerce(__p0, int8x16_t), p1), \ |
| 901 |
int (*)[__ARM_mve_type_int16x8_t]: __arm_vgetq_lane_s16 (__ARM_mve_coerce(__p0, int16x8_t), p1), \ |
| 902 |
int (*)[__ARM_mve_type_int32x4_t]: __arm_vgetq_lane_s32 (__ARM_mve_coerce(__p0, int32x4_t), p1), \ |
| 903 |
int (*)[__ARM_mve_type_int64x2_t]: __arm_vgetq_lane_s64 (__ARM_mve_coerce(__p0, int64x2_t), p1), \ |
| 904 |
int (*)[__ARM_mve_type_uint8x16_t]: __arm_vgetq_lane_u8 (__ARM_mve_coerce(__p0, uint8x16_t), p1), \ |
| 905 |
int (*)[__ARM_mve_type_uint16x8_t]: __arm_vgetq_lane_u16 (__ARM_mve_coerce(__p0, uint16x8_t), p1), \ |
| 906 |
int (*)[__ARM_mve_type_uint32x4_t]: __arm_vgetq_lane_u32 (__ARM_mve_coerce(__p0, uint32x4_t), p1), \ |
| 907 |
int (*)[__ARM_mve_type_uint64x2_t]: __arm_vgetq_lane_u64 (__ARM_mve_coerce(__p0, uint64x2_t), p1));}) |
| 908 |
|
| 909 |
#define __arm_vsetq_lane(p0,p1,p2) ({ __typeof(p0) __p0 = (p0); \ |
| 910 |
__typeof(p1) __p1 = (p1); \ |
| 911 |
_Generic( (int (*)[__ARM_mve_typeid(__p0)][__ARM_mve_typeid(__p1)])0, \ |
| 912 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_int8x16_t]: __arm_vsetq_lane_s8 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, int8x16_t), p2), \ |
| 913 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_int16x8_t]: __arm_vsetq_lane_s16 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, int16x8_t), p2), \ |
| 914 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_int32x4_t]: __arm_vsetq_lane_s32 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, int32x4_t), p2), \ |
| 915 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_int64x2_t]: __arm_vsetq_lane_s64 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, int64x2_t), p2), \ |
| 916 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_uint8x16_t]: __arm_vsetq_lane_u8 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, uint8x16_t), p2), \ |
| 917 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_uint16x8_t]: __arm_vsetq_lane_u16 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, uint16x8_t), p2), \ |
| 918 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_uint32x4_t]: __arm_vsetq_lane_u32 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, uint32x4_t), p2), \ |
| 919 |
int (*)[__ARM_mve_type_int_n][__ARM_mve_type_uint64x2_t]: __arm_vsetq_lane_u64 (__ARM_mve_coerce_i_scalar(__p0, int), __ARM_mve_coerce(__p1, uint64x2_t), p2));}) |
| 920 |
|
| 921 |
#endif /* MVE Integer. */ |
| 922 |
|
| 923 |
#endif /* __cplusplus */ |
| 924 |
#endif /* __ARM_FEATURE_MVE */ |
| 925 |
#endif /* _GCC_ARM_MVE_H. */ |