1 //===-- AArch64SVEACLETypes.def - Metadata about SVE types ------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file defines various SVE builtin types. The macros are:
11 // SVE_TYPE(Name, Id, SingletonId) - A builtin type that has not been
12 // covered by any other #define. Defining this macro covers all
15 // SVE_VECTOR_TYPE(Name, Id, SingletonId, ElKind, ElBits, IsSigned, IsFP) -
16 // An SVE scalable vector.
18 // SVE_PREDICATE_TYPE(Name, Id, SingletonId, ElKind) - An SVE scalable
23 // - Name is the name of the builtin type.
25 // - BuiltinType::Id is the enumerator defining the type.
27 // - Context.SingletonId is the global singleton of this type.
29 // - ElKind enumerates the type of the elements.
31 // - ElBits is the size of one element in bits.
33 // - IsSigned is true for vectors of signed integer elements and
34 // for vectors of floating-point elements.
36 // - IsFP is true for vectors of floating-point elements.
38 //===----------------------------------------------------------------------===//
40 #ifndef SVE_VECTOR_TYPE
41 #define SVE_VECTOR_TYPE(Name, Id, SingletonId, ElKind, ElBits, IsSigned, IsFP)\
42 SVE_TYPE(Name, Id, SingletonId)
45 #ifndef SVE_PREDICATE_TYPE
46 #define SVE_PREDICATE_TYPE(Name, Id, SingletonId, ElKind)\
47 SVE_TYPE(Name, Id, SingletonId)
50 //===- Vector point types -----------------------------------------------===//
52 SVE_VECTOR_TYPE("__SVInt8_t", SveInt8, SveInt8Ty, SveElSInt8, 8, true, false)
53 SVE_VECTOR_TYPE("__SVInt16_t", SveInt16, SveInt16Ty, SveElSInt16, 16, true, false)
54 SVE_VECTOR_TYPE("__SVInt32_t", SveInt32, SveInt32Ty, SveElSInt32, 32, true, false)
55 SVE_VECTOR_TYPE("__SVInt64_t", SveInt64, SveInt64Ty, SveElSInt64, 64, true, false)
57 SVE_VECTOR_TYPE("__SVUint8_t", SveUint8, SveUint8Ty, SveElUInt8, 8, false, false)
58 SVE_VECTOR_TYPE("__SVUint16_t", SveUint16, SveUint16Ty, SveElUInt16, 16, false, false)
59 SVE_VECTOR_TYPE("__SVUint32_t", SveUint32, SveUint32Ty, SveElUInt32, 32, false, false)
60 SVE_VECTOR_TYPE("__SVUint64_t", SveUint64, SveUint64Ty, SveElUInt64, 64, false, false)
62 SVE_VECTOR_TYPE("__SVFloat16_t", SveFloat16, SveFloat16Ty, SveElHalf, 16, true, true)
63 SVE_VECTOR_TYPE("__SVFloat32_t", SveFloat32, SveFloat32Ty, SveElFloat, 32, true, true)
64 SVE_VECTOR_TYPE("__SVFloat64_t", SveFloat64, SveFloat64Ty, SveElDouble, 64, true, true)
66 SVE_PREDICATE_TYPE("__SVBool_t", SveBool, SveBoolTy, SveElBool)
68 #undef SVE_VECTOR_TYPE
69 #undef SVE_PREDICATE_TYPE