aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2024-11-11 12:32:15 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2024-11-11 12:32:15 +0000
commit23b7fe39d716c73a8cbae0f0585bc918041e3f74 (patch)
treecae35c65a2dbc4d319987126344aa023a7f26ebc /gcc
parent22d25b1fee6656df3203dc8ffee6d1d55fc1a7fd (diff)
downloadgcc-23b7fe39d716c73a8cbae0f0585bc918041e3f74.zip
gcc-23b7fe39d716c73a8cbae0f0585bc918041e3f74.tar.gz
gcc-23b7fe39d716c73a8cbae0f0585bc918041e3f74.tar.bz2
aarch64: Tweak definition of all_data & co
Past extensions to SVE have required new subsets of all_data; the SVE2.1 patches will add another. This patch tries to make this more scalable by defining the multi-size *_data macros to be unions of single-size *_data macros. gcc/ * config/aarch64/aarch64-sve-builtins.cc (TYPES_all_data): Redefine in terms of single-size *_data definitions. (TYPES_bhs_data, TYPES_hs_data, TYPES_sd_data): Likewise. (TYPES_b_data, TYPES_h_data, TYPES_s_data): New macros.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/aarch64/aarch64-sve-builtins.cc51
1 files changed, 31 insertions, 20 deletions
diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc
index 44b7f6e..c0b5115 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins.cc
@@ -231,12 +231,11 @@ CONSTEXPR const group_suffix_info group_suffixes[] = {
#define TYPES_all_arith(S, D) \
TYPES_all_float (S, D), TYPES_all_integer (S, D)
-/* _bf16
- _f16 _f32 _f64
- _s8 _s16 _s32 _s64
- _u8 _u16 _u32 _u64. */
#define TYPES_all_data(S, D) \
- S (bf16), TYPES_all_arith (S, D)
+ TYPES_b_data (S, D), \
+ TYPES_h_data (S, D), \
+ TYPES_s_data (S, D), \
+ TYPES_d_data (S, D)
/* _b only. */
#define TYPES_b(S, D) \
@@ -255,6 +254,11 @@ CONSTEXPR const group_suffix_info group_suffixes[] = {
#define TYPES_b_integer(S, D) \
S (s8), TYPES_b_unsigned (S, D)
+/* _s8
+ _u8. */
+#define TYPES_b_data(S, D) \
+ TYPES_b_integer (S, D)
+
/* _s8 _s16
_u8 _u16. */
#define TYPES_bh_integer(S, D) \
@@ -277,12 +281,10 @@ CONSTEXPR const group_suffix_info group_suffixes[] = {
#define TYPES_bhs_integer(S, D) \
TYPES_bhs_signed (S, D), TYPES_bhs_unsigned (S, D)
-/* _bf16
- _f16 _f32
- _s8 _s16 _s32
- _u8 _u16 _u32. */
#define TYPES_bhs_data(S, D) \
- S (bf16), S (f16), S (f32), TYPES_bhs_integer (S, D)
+ TYPES_b_data (S, D), \
+ TYPES_h_data (S, D), \
+ TYPES_s_data (S, D)
/* _s16_s8 _s32_s16 _s64_s32
_u16_u8 _u32_u16 _u64_u32. */
@@ -295,6 +297,13 @@ CONSTEXPR const group_suffix_info group_suffixes[] = {
#define TYPES_h_integer(S, D) \
S (s16), S (u16)
+/* _bf16
+ _f16
+ _s16
+ _u16. */
+#define TYPES_h_data(S, D) \
+ S (bf16), S (f16), TYPES_h_integer (S, D)
+
/* _s16 _s32. */
#define TYPES_hs_signed(S, D) \
S (s16), S (s32)
@@ -308,12 +317,9 @@ CONSTEXPR const group_suffix_info group_suffixes[] = {
#define TYPES_hs_float(S, D) \
S (f16), S (f32)
-/* _bf16
- _f16 _f32
- _s16 _s32
- _u16 _u32. */
#define TYPES_hs_data(S, D) \
- S (bf16), S (f16), S (f32), TYPES_hs_integer (S, D)
+ TYPES_h_data (S, D), \
+ TYPES_s_data (S, D)
/* _u16 _u64. */
#define TYPES_hd_unsigned(S, D) \
@@ -352,10 +358,17 @@ CONSTEXPR const group_suffix_info group_suffixes[] = {
#define TYPES_s_unsigned(S, D) \
S (u32)
-/* _s32 _u32. */
+/* _s32
+ _u32. */
#define TYPES_s_integer(S, D) \
TYPES_s_signed (S, D), TYPES_s_unsigned (S, D)
+/* _f32
+ _s32
+ _u32. */
+#define TYPES_s_data(S, D) \
+ TYPES_s_float (S, D), TYPES_s_integer (S, D)
+
/* _s32 _s64. */
#define TYPES_sd_signed(S, D) \
S (s32), S (s64)
@@ -369,11 +382,9 @@ CONSTEXPR const group_suffix_info group_suffixes[] = {
#define TYPES_sd_integer(S, D) \
TYPES_sd_signed (S, D), TYPES_sd_unsigned (S, D)
-/* _f32 _f64
- _s32 _s64
- _u32 _u64. */
#define TYPES_sd_data(S, D) \
- S (f32), S (f64), TYPES_sd_integer (S, D)
+ TYPES_s_data (S, D), \
+ TYPES_d_data (S, D)
/* _f16 _f32 _f64
_s32 _s64