1//===-- AArch64SVEACLETypes.def - Metadata about SVE types ------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9//  This file defines various SVE builtin types.  The macros are:
10//
11//    SVE_TYPE(Name, Id, SingletonId) - A builtin type that has not been
12//    covered by any other #define.  Defining this macro covers all
13//    the builtins.
14//
15//    SVE_VECTOR_TYPE(Name, Id, SingletonId, ElKind, ElBits, IsSigned, IsFP) -
16//    An SVE scalable vector.
17//
18//    SVE_PREDICATE_TYPE(Name, Id, SingletonId, ElKind) - An SVE scalable
19//    predicate.
20//
21// where:
22//
23//  - Name is the name of the builtin type.
24//
25//  - BuiltinType::Id is the enumerator defining the type.
26//
27//  - Context.SingletonId is the global singleton of this type.
28//
29//  - ElKind enumerates the type of the elements.
30//
31//  - ElBits is the size of one element in bits.
32//
33//  - IsSigned is true for vectors of signed integer elements and
34//    for vectors of floating-point elements.
35//
36//  - IsFP is true for vectors of floating-point elements.
37//
38//===----------------------------------------------------------------------===//
39
40#ifndef SVE_VECTOR_TYPE
41#define SVE_VECTOR_TYPE(Name, Id, SingletonId, ElKind, ElBits, IsSigned, IsFP)\
42  SVE_TYPE(Name, Id, SingletonId)
43#endif
44
45#ifndef SVE_PREDICATE_TYPE
46#define SVE_PREDICATE_TYPE(Name, Id, SingletonId, ElKind)\
47  SVE_TYPE(Name, Id, SingletonId)
48#endif
49
50//===- Vector point types -----------------------------------------------===//
51
52SVE_VECTOR_TYPE("__SVInt8_t",  SveInt8, SveInt8Ty, SveElSInt8, 8, true, false)
53SVE_VECTOR_TYPE("__SVInt16_t", SveInt16, SveInt16Ty, SveElSInt16, 16, true, false)
54SVE_VECTOR_TYPE("__SVInt32_t", SveInt32, SveInt32Ty, SveElSInt32, 32, true, false)
55SVE_VECTOR_TYPE("__SVInt64_t", SveInt64, SveInt64Ty, SveElSInt64, 64, true, false)
56
57SVE_VECTOR_TYPE("__SVUint8_t",  SveUint8, SveUint8Ty, SveElUInt8, 8, false, false)
58SVE_VECTOR_TYPE("__SVUint16_t", SveUint16, SveUint16Ty, SveElUInt16, 16, false, false)
59SVE_VECTOR_TYPE("__SVUint32_t", SveUint32, SveUint32Ty, SveElUInt32, 32, false, false)
60SVE_VECTOR_TYPE("__SVUint64_t", SveUint64, SveUint64Ty, SveElUInt64, 64, false, false)
61
62SVE_VECTOR_TYPE("__SVFloat16_t", SveFloat16, SveFloat16Ty, SveElHalf, 16, true, true)
63SVE_VECTOR_TYPE("__SVFloat32_t", SveFloat32, SveFloat32Ty, SveElFloat, 32, true, true)
64SVE_VECTOR_TYPE("__SVFloat64_t", SveFloat64, SveFloat64Ty, SveElDouble, 64, true, true)
65
66SVE_PREDICATE_TYPE("__SVBool_t", SveBool, SveBoolTy, SveElBool)
67
68#undef SVE_VECTOR_TYPE
69#undef SVE_PREDICATE_TYPE
70#undef SVE_TYPE
71