|
6 | 6 | // |
7 | 7 | //===----------------------------------------------------------------------===// |
8 | 8 | // |
9 | | -// This file defines various SVE builtin types. The macros are: |
| 9 | +// This file defines various Neon and SVE builtin types. The macros are: |
| 10 | +// |
| 11 | +// NEON_VECTOR_TYPE: |
| 12 | +// - (Name, BaseType, ElBits, NumEls, VectorKind) |
| 13 | +// Unlike the SVE types, the Neon vector types are not builtin types and |
| 14 | +// mapped to the equivalent __attribute__(neon_vector_type(...)) vector type. |
| 15 | +// They are not builtin types. |
10 | 16 | // |
11 | 17 | // SVE_TYPE: |
12 | 18 | // - (Name, MangledName, Id, SingletonId) |
|
57 | 63 | // - IsBF true for vector of brain float elements. |
58 | 64 | //===----------------------------------------------------------------------===// |
59 | 65 |
|
| 66 | +#ifndef NEON_VECTOR_TYPE |
| 67 | +#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) |
| 68 | +#endif |
| 69 | + |
60 | 70 | #ifndef SVE_TYPE |
61 | 71 | #define SVE_TYPE(Name, Id, SingletonId) |
62 | 72 | #endif |
|
111 | 121 | SVE_TYPE(Name, Id, SingletonId) |
112 | 122 | #endif |
113 | 123 |
|
114 | | -//===- Vector point types -----------------------------------------------===// |
| 124 | +//===- Neon Vector point types --------------------------------------------===// |
| 125 | + |
| 126 | +NEON_VECTOR_TYPE(__Int8x8_t, CharTy, 8, 8, VectorKind::Neon) |
| 127 | +NEON_VECTOR_TYPE(__Int16x4_t, ShortTy, 16, 4, VectorKind::Neon) |
| 128 | +NEON_VECTOR_TYPE(__Int32x2_t, IntTy, 32, 2, VectorKind::Neon) |
| 129 | +NEON_VECTOR_TYPE(__Uint8x8_t, CharTy, 8, 8, VectorKind::Neon) |
| 130 | +NEON_VECTOR_TYPE(__Uint16x4_t, UnsignedShortTy, 16, 4, VectorKind::Neon) |
| 131 | +NEON_VECTOR_TYPE(__Uint32x2_t, UnsignedIntTy, 32, 2, VectorKind::Neon) |
| 132 | +NEON_VECTOR_TYPE(__Float16x4_t, Float16Ty, 16, 4, VectorKind::Neon) |
| 133 | +NEON_VECTOR_TYPE(__Float32x2_t, FloatTy, 32, 2, VectorKind::Neon) |
| 134 | +NEON_VECTOR_TYPE(__Poly8x8_t, CharTy, 8, 8, VectorKind::NeonPoly) |
| 135 | +NEON_VECTOR_TYPE(__Poly16x4_t, UnsignedShortTy, 16, 4, VectorKind::NeonPoly) |
| 136 | +NEON_VECTOR_TYPE(__Bfloat16x4_t, BFloat16Ty, 16, 4, VectorKind::Neon) |
| 137 | +NEON_VECTOR_TYPE(__Int8x16_t, CharTy, 8, 16, VectorKind::Neon) |
| 138 | +NEON_VECTOR_TYPE(__Int16x8_t, ShortTy, 16, 8, VectorKind::Neon) |
| 139 | +NEON_VECTOR_TYPE(__Int32x4_t, IntTy, 32, 4, VectorKind::Neon) |
| 140 | +NEON_VECTOR_TYPE(__Int64x2_t, LongLongTy, 64, 2, VectorKind::Neon) |
| 141 | +NEON_VECTOR_TYPE(__Uint8x16_t, CharTy, 8, 16, VectorKind::Neon) |
| 142 | +NEON_VECTOR_TYPE(__Uint16x8_t, UnsignedShortTy, 16, 8, VectorKind::Neon) |
| 143 | +NEON_VECTOR_TYPE(__Uint32x4_t, UnsignedIntTy, 32, 4, VectorKind::Neon) |
| 144 | +NEON_VECTOR_TYPE(__Uint64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::Neon) |
| 145 | +NEON_VECTOR_TYPE(__Float16x8_t, Float16Ty, 16, 8, VectorKind::Neon) |
| 146 | +NEON_VECTOR_TYPE(__Float32x4_t, FloatTy, 32, 4, VectorKind::Neon) |
| 147 | +NEON_VECTOR_TYPE(__Float64x2_t, DoubleTy, 64, 2, VectorKind::Neon) |
| 148 | +NEON_VECTOR_TYPE(__Poly8x16_t, CharTy, 8, 16, VectorKind::NeonPoly) |
| 149 | +NEON_VECTOR_TYPE(__Poly16x8_t, UnsignedShortTy, 16, 8, VectorKind::NeonPoly) |
| 150 | +NEON_VECTOR_TYPE(__Poly64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::NeonPoly) |
| 151 | +NEON_VECTOR_TYPE(__Bfloat16x8_t, BFloat16Ty, 16, 8, VectorKind::Neon) |
| 152 | +NEON_VECTOR_TYPE(__Mfloat8x8_t, MFloat8Ty, 8, 8, VectorKind::Neon) |
| 153 | +NEON_VECTOR_TYPE(__Mfloat8x16_t, MFloat8Ty, 8, 16, VectorKind::Neon) |
| 154 | + |
| 155 | +//===- SVE Vector point types ---------------------------------------------===// |
115 | 156 |
|
116 | 157 | SVE_VECTOR_TYPE_INT(__SVInt8_t, __SVInt8_t, SveInt8, SveInt8Ty, 16, 8, 1, true) |
117 | 158 | SVE_VECTOR_TYPE_INT(__SVInt16_t, __SVInt16_t, SveInt16, SveInt16Ty, 8, 16, 1, true) |
@@ -205,6 +246,7 @@ SVE_OPAQUE_TYPE(__SVCount_t, __SVCount_t, SveCount, SveCountTy) |
205 | 246 |
|
206 | 247 | SVE_SCALAR_TYPE(__mfp8, __mfp8, MFloat8, MFloat8Ty, 8) |
207 | 248 |
|
| 249 | +#undef NEON_VECTOR_TYPE |
208 | 250 | #undef SVE_VECTOR_TYPE |
209 | 251 | #undef SVE_VECTOR_TYPE_MFLOAT |
210 | 252 | #undef SVE_VECTOR_TYPE_BFLOAT |
|
0 commit comments