[PR testsuite/116860] Testsuite adjustment for recently added tests
[official-gcc.git] / gcc / config / aarch64 / aarch64-sve-builtins-sme.def
blobf75c0a5b8b133f996ade32eef7f505f20b3c51d8
1 /* ACLE support for AArch64 SME.
2 Copyright (C) 2023-2025 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
9 any later version.
11 GCC is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
20 #ifndef DEF_SME_FUNCTION
21 #define DEF_SME_FUNCTION(NAME, SHAPE, TYPES, PREDS) \
22 DEF_SME_FUNCTION_GS (NAME, SHAPE, TYPES, none, PREDS)
23 #endif
25 #ifndef DEF_SME_ZA_FUNCTION_GS
26 #define DEF_SME_ZA_FUNCTION_GS(NAME, SHAPE, TYPES, GROUP, PREDS) \
27 DEF_SME_FUNCTION_GS (NAME, SHAPE, TYPES, GROUP, PREDS)
28 #endif
30 #ifndef DEF_SME_ZA_FUNCTION
31 #define DEF_SME_ZA_FUNCTION(NAME, SHAPE, TYPES, PREDS) \
32 DEF_SME_ZA_FUNCTION_GS (NAME, SHAPE, TYPES, none, PREDS)
33 #endif
35 #define REQUIRED_EXTENSIONS streaming_compatible (0)
36 DEF_SME_FUNCTION (arm_has_sme, bool_inherent, none, none)
37 DEF_SME_FUNCTION (arm_in_streaming_mode, bool_inherent, none, none)
38 #undef REQUIRED_EXTENSIONS
40 #define REQUIRED_EXTENSIONS streaming_compatible (AARCH64_FL_SME)
41 DEF_SME_FUNCTION (svcntsb, count_inherent, none, none)
42 DEF_SME_FUNCTION (svcntsd, count_inherent, none, none)
43 DEF_SME_FUNCTION (svcntsh, count_inherent, none, none)
44 DEF_SME_FUNCTION (svcntsw, count_inherent, none, none)
45 DEF_SME_ZA_FUNCTION (svldr, ldr_za, za, none)
46 DEF_SME_ZA_FUNCTION (svstr, str_za, za, none)
47 DEF_SME_ZA_FUNCTION (svundef, inherent_za, za, none)
48 DEF_SME_ZA_FUNCTION (svzero, inherent_za, za, none)
49 DEF_SME_ZA_FUNCTION (svzero_mask, inherent_mask_za, za, none)
50 #undef REQUIRED_EXTENSIONS
52 #define REQUIRED_EXTENSIONS streaming_only (0)
53 DEF_SME_ZA_FUNCTION (svaddha, unary_za_m, za_s_integer, za_m)
54 DEF_SME_ZA_FUNCTION (svaddva, unary_za_m, za_s_integer, za_m)
55 DEF_SME_ZA_FUNCTION (svld1_hor, load_za, all_za, none)
56 DEF_SME_ZA_FUNCTION (svld1_ver, load_za, all_za, none)
57 DEF_SME_ZA_FUNCTION (svmopa, binary_za_m, mop_base, za_m)
58 DEF_SME_ZA_FUNCTION (svmopa, binary_za_m, d_za, za_m)
59 DEF_SME_ZA_FUNCTION (svmops, binary_za_m, mop_base, za_m)
60 DEF_SME_ZA_FUNCTION (svmops, binary_za_m, d_za, za_m)
61 DEF_SME_ZA_FUNCTION (svread_hor, read_za_m, za_all_data, m)
62 DEF_SME_ZA_FUNCTION (svread_ver, read_za_m, za_all_data, m)
63 DEF_SME_ZA_FUNCTION (svst1_hor, store_za, all_za, none)
64 DEF_SME_ZA_FUNCTION (svst1_ver, store_za, all_za, none)
65 DEF_SME_ZA_FUNCTION (svsumopa, binary_za_uint_m, mop_base_signed, za_m)
66 DEF_SME_ZA_FUNCTION (svsumops, binary_za_uint_m, mop_base_signed, za_m)
67 DEF_SME_ZA_FUNCTION (svusmopa, binary_za_int_m, mop_base_unsigned, za_m)
68 DEF_SME_ZA_FUNCTION (svusmops, binary_za_int_m, mop_base_unsigned, za_m)
69 DEF_SME_ZA_FUNCTION (svwrite_hor, write_za_m, za_all_data, za_m)
70 DEF_SME_ZA_FUNCTION (svwrite_ver, write_za_m, za_all_data, za_m)
71 #undef REQUIRED_EXTENSIONS
73 #define REQUIRED_EXTENSIONS streaming_only (AARCH64_FL_SME_I16I64)
74 DEF_SME_ZA_FUNCTION (svaddha, unary_za_m, za_d_integer, za_m)
75 DEF_SME_ZA_FUNCTION (svaddva, unary_za_m, za_d_integer, za_m)
76 DEF_SME_ZA_FUNCTION (svmopa, binary_za_m, mop_i16i64, za_m)
77 DEF_SME_ZA_FUNCTION (svmops, binary_za_m, mop_i16i64, za_m)
78 DEF_SME_ZA_FUNCTION (svsumopa, binary_za_uint_m, mop_i16i64_signed, za_m)
79 DEF_SME_ZA_FUNCTION (svsumops, binary_za_uint_m, mop_i16i64_signed, za_m)
80 DEF_SME_ZA_FUNCTION (svusmopa, binary_za_int_m, mop_i16i64_unsigned, za_m)
81 DEF_SME_ZA_FUNCTION (svusmops, binary_za_int_m, mop_i16i64_unsigned, za_m)
82 #undef REQUIRED_EXTENSIONS
84 #define REQUIRED_EXTENSIONS streaming_only (AARCH64_FL_SME_F64F64)
85 DEF_SME_ZA_FUNCTION (svmopa, binary_za_m, za_d_float, za_m)
86 DEF_SME_ZA_FUNCTION (svmops, binary_za_m, za_d_float, za_m)
87 #undef REQUIRED_EXTENSIONS
89 #define REQUIRED_EXTENSIONS streaming_compatible (AARCH64_FL_SME2)
90 DEF_SME_FUNCTION (svldr_zt, ldr_zt, none, none)
91 DEF_SME_FUNCTION (svstr_zt, str_zt, none, none)
92 DEF_SME_FUNCTION (svzero_zt, inherent_zt, none, none)
93 #undef REQUIRED_EXTENSIONS
95 /* The d_za entries in this section just declare C _za64 overloads,
96 which will then be resolved to either an integer function or a
97 floating-point function. They are needed because the integer and
98 floating-point functions have different architecture requirements. */
99 #define REQUIRED_EXTENSIONS streaming_only (AARCH64_FL_SME2)
100 DEF_SME_ZA_FUNCTION_GS (svadd, unary_za_slice, za_s_data, vg1x24, none)
101 DEF_SME_ZA_FUNCTION_GS (svadd, unary_za_slice, d_za, vg1x24, none)
102 DEF_SME_ZA_FUNCTION_GS (svadd_write, binary_za_slice_opt_single, za_s_integer,
103 vg1x24, none)
104 DEF_SME_ZA_FUNCTION (svbmopa, binary_za_m, za_s_unsigned, za_m)
105 DEF_SME_ZA_FUNCTION (svbmops, binary_za_m, za_s_unsigned, za_m)
106 DEF_SME_ZA_FUNCTION_GS (svdot, binary_za_slice_opt_single, za_s_h_data,
107 vg1x24, none)
108 DEF_SME_ZA_FUNCTION_GS (svdot, binary_za_slice_opt_single, za_s_b_integer,
109 vg1x24, none)
110 DEF_SME_ZA_FUNCTION_GS (svdot_lane, dot_za_slice_lane, za_s_h_data,
111 vg1x24, none)
112 DEF_SME_ZA_FUNCTION_GS (svdot_lane, dot_za_slice_lane, za_s_b_integer,
113 vg1x24, none)
114 DEF_SME_FUNCTION_GS (svluti2_lane_zt, luti2_lane_zt, bhs_data, x124, none)
115 DEF_SME_FUNCTION_GS (svluti4_lane_zt, luti4_lane_zt, bhs_data, x12, none)
116 DEF_SME_FUNCTION_GS (svluti4_lane_zt, luti4_lane_zt, hs_data, x4, none)
117 DEF_SME_ZA_FUNCTION_GS (svmla, binary_za_slice_opt_single, za_s_float,
118 vg1x24, none)
119 DEF_SME_ZA_FUNCTION_GS (svmla, binary_za_slice_opt_single, za_s_h_data,
120 vg2, none)
121 DEF_SME_ZA_FUNCTION_GS (svmla, binary_za_slice_opt_single, za_s_b_integer,
122 vg4, none)
123 DEF_SME_ZA_FUNCTION_GS (svmla_lane, binary_za_slice_lane, za_s_float,
124 vg1x24, none)
125 DEF_SME_ZA_FUNCTION_GS (svmla_lane, binary_za_slice_lane, za_s_h_data,
126 vg2, none)
127 DEF_SME_ZA_FUNCTION_GS (svmla_lane, binary_za_slice_lane, za_s_b_integer,
128 vg4, none)
129 DEF_SME_ZA_FUNCTION_GS (svmls, binary_za_slice_opt_single, za_s_float,
130 vg1x24, none)
131 DEF_SME_ZA_FUNCTION_GS (svmls, binary_za_slice_opt_single, za_s_h_data,
132 vg2, none)
133 DEF_SME_ZA_FUNCTION_GS (svmls, binary_za_slice_opt_single, za_s_b_integer,
134 vg4, none)
135 DEF_SME_ZA_FUNCTION_GS (svmls_lane, binary_za_slice_lane, za_s_float,
136 vg1x24, none)
137 DEF_SME_ZA_FUNCTION_GS (svmls_lane, binary_za_slice_lane, za_s_h_data,
138 vg2, none)
139 DEF_SME_ZA_FUNCTION_GS (svmls_lane, binary_za_slice_lane, za_s_b_integer,
140 vg4, none)
141 DEF_SME_ZA_FUNCTION (svmopa, binary_za_m, za_s_h_integer, za_m)
142 DEF_SME_ZA_FUNCTION (svmops, binary_za_m, za_s_h_integer, za_m)
143 DEF_SME_ZA_FUNCTION_GS (svread, read_za_slice, za_bhsd_data, vg1x24, none)
144 DEF_SME_ZA_FUNCTION_GS (svread_hor, read_za, za_bhsd_data, vg24, none)
145 DEF_SME_ZA_FUNCTION_GS (svread_ver, read_za, za_bhsd_data, vg24, none)
146 DEF_SME_ZA_FUNCTION_GS (svsub, unary_za_slice, za_s_data, vg1x24, none)
147 DEF_SME_ZA_FUNCTION_GS (svsub, unary_za_slice, d_za, vg1x24, none)
148 DEF_SME_ZA_FUNCTION_GS (svsub_write, binary_za_slice_opt_single, za_s_integer,
149 vg1x24, none)
150 DEF_SME_ZA_FUNCTION_GS (svsudot, binary_za_slice_uint_opt_single,
151 za_s_b_signed, vg1x24, none)
152 DEF_SME_ZA_FUNCTION_GS (svsudot_lane, dot_za_slice_uint_lane,
153 za_s_b_signed, vg1x24, none)
154 DEF_SME_ZA_FUNCTION_GS (svsuvdot_lane, dot_za_slice_uint_lane,
155 za_s_b_signed, vg1x4, none)
156 DEF_SME_ZA_FUNCTION_GS (svusdot, binary_za_slice_int_opt_single,
157 za_s_b_unsigned, vg1x24, none)
158 DEF_SME_ZA_FUNCTION_GS (svusdot_lane, dot_za_slice_int_lane,
159 za_s_b_unsigned, vg1x24, none)
160 DEF_SME_ZA_FUNCTION_GS (svusvdot_lane, dot_za_slice_int_lane,
161 za_s_b_unsigned, vg1x4, none)
162 DEF_SME_ZA_FUNCTION_GS (svvdot_lane, dot_za_slice_lane, za_s_h_data,
163 vg1x2, none)
164 DEF_SME_ZA_FUNCTION_GS (svvdot_lane, dot_za_slice_lane, za_s_b_integer,
165 vg1x4, none)
166 DEF_SME_ZA_FUNCTION_GS (svwrite, write_za_slice, za_bhsd_data, vg1x24, none)
167 DEF_SME_ZA_FUNCTION_GS (svwrite_hor, write_za, za_bhsd_data, vg24, none)
168 DEF_SME_ZA_FUNCTION_GS (svwrite_ver, write_za, za_bhsd_data, vg24, none)
169 #undef REQUIRED_EXTENSIONS
171 #define REQUIRED_EXTENSIONS streaming_only (AARCH64_FL_SME2 \
172 | AARCH64_FL_SME_I16I64)
173 DEF_SME_ZA_FUNCTION_GS (svadd, unary_za_slice, za_d_integer, vg1x24, none)
174 DEF_SME_ZA_FUNCTION_GS (svadd_write, binary_za_slice_opt_single, za_d_integer,
175 vg1x24, none)
176 DEF_SME_ZA_FUNCTION_GS (svdot, binary_za_slice_opt_single, za_d_h_integer,
177 vg1x24, none)
178 DEF_SME_ZA_FUNCTION_GS (svdot_lane, dot_za_slice_lane, za_d_h_integer,
179 vg1x24, none)
180 DEF_SME_ZA_FUNCTION_GS (svmla, binary_za_slice_opt_single, za_d_h_integer,
181 vg4, none)
182 DEF_SME_ZA_FUNCTION_GS (svmla_lane, binary_za_slice_lane, za_d_h_integer,
183 vg4, none)
184 DEF_SME_ZA_FUNCTION_GS (svmls, binary_za_slice_opt_single, za_d_h_integer,
185 vg4, none)
186 DEF_SME_ZA_FUNCTION_GS (svmls_lane, binary_za_slice_lane, za_d_h_integer,
187 vg4, none)
188 DEF_SME_ZA_FUNCTION_GS (svsub, unary_za_slice, za_d_integer, vg1x24, none)
189 DEF_SME_ZA_FUNCTION_GS (svsub_write, binary_za_slice_opt_single, za_d_integer,
190 vg1x24, none)
191 DEF_SME_ZA_FUNCTION_GS (svvdot_lane, dot_za_slice_lane, za_d_h_integer,
192 vg1x4, none)
193 #undef REQUIRED_EXTENSIONS
195 #define REQUIRED_EXTENSIONS streaming_only (AARCH64_FL_SME2 \
196 | AARCH64_FL_SME_F64F64)
197 DEF_SME_ZA_FUNCTION_GS (svadd, unary_za_slice, za_d_float, vg1x24, none)
198 DEF_SME_ZA_FUNCTION_GS (svmla, binary_za_slice_opt_single, za_d_float,
199 vg1x24, none)
200 DEF_SME_ZA_FUNCTION_GS (svmla_lane, binary_za_slice_lane, za_d_float,
201 vg1x24, none)
202 DEF_SME_ZA_FUNCTION_GS (svmls, binary_za_slice_opt_single, za_d_float,
203 vg1x24, none)
204 DEF_SME_ZA_FUNCTION_GS (svmls_lane, binary_za_slice_lane, za_d_float,
205 vg1x24, none)
206 DEF_SME_ZA_FUNCTION_GS (svsub, unary_za_slice, za_d_float, vg1x24, none)
207 #undef REQUIRED_EXTENSIONS
209 #define REQUIRED_EXTENSIONS streaming_only (AARCH64_FL_SME_F16F16)
210 DEF_SME_ZA_FUNCTION_GS (svadd, unary_za_slice, za_h_float, vg1x24, none)
211 DEF_SME_ZA_FUNCTION_GS (svmla, binary_za_slice_opt_single, za_h_float,
212 vg1x24, none)
213 DEF_SME_ZA_FUNCTION_GS (svmla_lane, binary_za_slice_lane, za_h_float,
214 vg1x24, none)
215 DEF_SME_ZA_FUNCTION_GS (svmls, binary_za_slice_opt_single, za_h_float,
216 vg1x24, none)
217 DEF_SME_ZA_FUNCTION_GS (svmls_lane, binary_za_slice_lane, za_h_float,
218 vg1x24, none)
219 DEF_SME_ZA_FUNCTION (svmopa, binary_za_m, za_h_float, za_m)
220 DEF_SME_ZA_FUNCTION (svmops, binary_za_m, za_h_float, za_m)
221 DEF_SME_ZA_FUNCTION_GS (svsub, unary_za_slice, za_h_float, vg1x24, none)
222 #undef REQUIRED_EXTENSIONS
224 #define REQUIRED_EXTENSIONS streaming_only (AARCH64_FL_SME_B16B16)
225 DEF_SME_ZA_FUNCTION_GS (svadd, unary_za_slice, za_h_bfloat, vg1x24, none)
226 DEF_SME_ZA_FUNCTION_GS (svmla, binary_za_slice_opt_single, za_h_bfloat,
227 vg1x24, none)
228 DEF_SME_ZA_FUNCTION_GS (svmla_lane, binary_za_slice_lane, za_h_bfloat,
229 vg1x24, none)
230 DEF_SME_ZA_FUNCTION_GS (svmls, binary_za_slice_opt_single, za_h_bfloat,
231 vg1x24, none)
232 DEF_SME_ZA_FUNCTION_GS (svmls_lane, binary_za_slice_lane, za_h_bfloat,
233 vg1x24, none)
234 DEF_SME_ZA_FUNCTION (svmopa, binary_za_m, za_h_bfloat, za_m)
235 DEF_SME_ZA_FUNCTION (svmops, binary_za_m, za_h_bfloat, za_m)
236 DEF_SME_ZA_FUNCTION_GS (svsub, unary_za_slice, za_h_bfloat, vg1x24, none)
237 #undef REQUIRED_EXTENSIONS
239 #define REQUIRED_EXTENSIONS streaming_only (AARCH64_FL_SME2p1)
240 DEF_SME_ZA_FUNCTION_GS (svreadz, read_za_slice, za_bhsd_data, vg1x24, none)
241 DEF_SME_ZA_FUNCTION (svreadz_hor, read_za, za_all_data, none)
242 DEF_SME_ZA_FUNCTION_GS (svreadz_hor, read_za, za_bhsd_data, vg24, none)
243 DEF_SME_ZA_FUNCTION (svreadz_ver, read_za, za_all_data, none)
244 DEF_SME_ZA_FUNCTION_GS (svreadz_ver, read_za, za_bhsd_data, vg24, none)
245 DEF_SME_ZA_FUNCTION_GS (svzero, inherent_za_slice, d_za, vg1x24, none)
246 DEF_SME_ZA_FUNCTION_GS (svzero, inherent_za_slice, d_za, vg2, none)
247 DEF_SME_ZA_FUNCTION_GS (svzero, inherent_za_slice, d_za, vg4, none)
248 #undef REQUIRED_EXTENSIONS
250 #undef DEF_SME_ZA_FUNCTION
251 #undef DEF_SME_ZA_FUNCTION_GS
252 #undef DEF_SME_FUNCTION