|
1 |
| -//===-- AArch64SVEACLETypes.def - Metadata about SVE types ------*- C++ -*-===// |
| 1 | +//===-- AArch64ACLETypes.def - Metadata about SVE types ---------*- C++ -*-===// |
2 | 2 | //
|
3 | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
4 | 4 | // See https://llvm.org/LICENSE.txt for license information.
|
5 | 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
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 | + |
| 70 | +#ifndef SVE_TYPE |
| 71 | +#define SVE_TYPE(Name, Id, SingletonId) |
| 72 | +#endif |
| 73 | + |
60 | 74 | #ifndef SVE_SCALAR_TYPE
|
61 | 75 | #define SVE_SCALAR_TYPE(Name, MangledName, Id, SingletonId, Bits) \
|
62 | 76 | SVE_TYPE(Name, Id, SingletonId)
|
|
107 | 121 | SVE_TYPE(Name, Id, SingletonId)
|
108 | 122 | #endif
|
109 | 123 |
|
110 |
| -//===- 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 ---------------------------------------------===// |
111 | 156 |
|
112 | 157 | SVE_VECTOR_TYPE_INT(__SVInt8_t, __SVInt8_t, SveInt8, SveInt8Ty, 16, 8, 1, true)
|
113 | 158 | SVE_VECTOR_TYPE_INT(__SVInt16_t, __SVInt16_t, SveInt16, SveInt16Ty, 8, 16, 1, true)
|
@@ -201,41 +246,6 @@ SVE_OPAQUE_TYPE(__SVCount_t, __SVCount_t, SveCount, SveCountTy)
|
201 | 246 |
|
202 | 247 | SVE_SCALAR_TYPE(__mfp8, __mfp8, MFloat8, MFloat8Ty, 8)
|
203 | 248 |
|
204 |
| -// Unlike the SVE types above, the Neon vector types are parsed as keywords and |
205 |
| -// mapped to the equivalent __attribute__(neon_vector_type(...)) vector type. |
206 |
| -// They are not builtin types. |
207 |
| -#ifndef NEON_VECTOR_TYPE |
208 |
| -#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) |
209 |
| -#endif |
210 |
| -NEON_VECTOR_TYPE(__Int8x8_t, CharTy, 8, 8, VectorKind::Neon) |
211 |
| -NEON_VECTOR_TYPE(__Int16x4_t, ShortTy, 16, 4, VectorKind::Neon) |
212 |
| -NEON_VECTOR_TYPE(__Int32x2_t, IntTy, 32, 2, VectorKind::Neon) |
213 |
| -NEON_VECTOR_TYPE(__Uint8x8_t, CharTy, 8, 8, VectorKind::Neon) |
214 |
| -NEON_VECTOR_TYPE(__Uint16x4_t, UnsignedShortTy, 16, 4, VectorKind::Neon) |
215 |
| -NEON_VECTOR_TYPE(__Uint32x2_t, UnsignedIntTy, 32, 2, VectorKind::Neon) |
216 |
| -NEON_VECTOR_TYPE(__Float16x4_t, Float16Ty, 16, 4, VectorKind::Neon) |
217 |
| -NEON_VECTOR_TYPE(__Float32x2_t, FloatTy, 32, 2, VectorKind::Neon) |
218 |
| -NEON_VECTOR_TYPE(__Poly8x8_t, CharTy, 8, 8, VectorKind::NeonPoly) |
219 |
| -NEON_VECTOR_TYPE(__Poly16x4_t, UnsignedShortTy, 16, 4, VectorKind::NeonPoly) |
220 |
| -NEON_VECTOR_TYPE(__Bfloat16x4_t, BFloat16Ty, 16, 4, VectorKind::Neon) |
221 |
| -NEON_VECTOR_TYPE(__Int8x16_t, CharTy, 8, 16, VectorKind::Neon) |
222 |
| -NEON_VECTOR_TYPE(__Int16x8_t, ShortTy, 16, 8, VectorKind::Neon) |
223 |
| -NEON_VECTOR_TYPE(__Int32x4_t, IntTy, 32, 4, VectorKind::Neon) |
224 |
| -NEON_VECTOR_TYPE(__Int64x2_t, LongLongTy, 64, 2, VectorKind::Neon) |
225 |
| -NEON_VECTOR_TYPE(__Uint8x16_t, CharTy, 8, 16, VectorKind::Neon) |
226 |
| -NEON_VECTOR_TYPE(__Uint16x8_t, UnsignedShortTy, 16, 8, VectorKind::Neon) |
227 |
| -NEON_VECTOR_TYPE(__Uint32x4_t, UnsignedIntTy, 32, 4, VectorKind::Neon) |
228 |
| -NEON_VECTOR_TYPE(__Uint64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::Neon) |
229 |
| -NEON_VECTOR_TYPE(__Float16x8_t, Float16Ty, 16, 8, VectorKind::Neon) |
230 |
| -NEON_VECTOR_TYPE(__Float32x4_t, FloatTy, 32, 4, VectorKind::Neon) |
231 |
| -NEON_VECTOR_TYPE(__Float64x2_t, DoubleTy, 64, 2, VectorKind::Neon) |
232 |
| -NEON_VECTOR_TYPE(__Poly8x16_t, CharTy, 8, 16, VectorKind::NeonPoly) |
233 |
| -NEON_VECTOR_TYPE(__Poly16x8_t, UnsignedShortTy, 16, 8, VectorKind::NeonPoly) |
234 |
| -NEON_VECTOR_TYPE(__Poly64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::NeonPoly) |
235 |
| -NEON_VECTOR_TYPE(__Bfloat16x8_t, BFloat16Ty, 16, 8, VectorKind::Neon) |
236 |
| -NEON_VECTOR_TYPE(__Mfloat8x8_t, MFloat8Ty, 8, 8, VectorKind::Neon) |
237 |
| -NEON_VECTOR_TYPE(__Mfloat8x16_t, MFloat8Ty, 16, 8, VectorKind::Neon) |
238 |
| - |
239 | 249 | #undef NEON_VECTOR_TYPE
|
240 | 250 | #undef SVE_VECTOR_TYPE
|
241 | 251 | #undef SVE_VECTOR_TYPE_MFLOAT
|
|
0 commit comments