]>
Commit | Line | Data |
---|---|---|
6f59caf1 CL |
1 | /* ACLE support for Arm MVE (__ARM_FEATURE_MVE intrinsics) |
2 | Copyright (C) 2023 Free Software Foundation, Inc. | |
3 | ||
4 | This file is part of GCC. | |
5 | ||
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. | |
10 | ||
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. | |
15 | ||
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/>. */ | |
19 | ||
20 | #define REQUIRES_FLOAT false | |
817a406a | 21 | DEF_MVE_FUNCTION (vabavq, binary_acca_int32, all_integer, p_or_none) |
6079d94a | 22 | DEF_MVE_FUNCTION (vabdq, binary, all_integer, mx_or_none) |
c32e1a71 | 23 | DEF_MVE_FUNCTION (vabsq, unary, all_signed, mx_or_none) |
2d1a5a44 | 24 | DEF_MVE_FUNCTION (vaddlvaq, unary_widen_acc, integer_32, p_or_none) |
218e01ee | 25 | DEF_MVE_FUNCTION (vaddlvq, unary_acc, integer_32, p_or_none) |
1942c5ab | 26 | DEF_MVE_FUNCTION (vaddq, binary_opt_n, all_integer, mx_or_none) |
cf24e531 | 27 | DEF_MVE_FUNCTION (vaddvaq, unary_int32_acc, all_integer, p_or_none) |
56b099f6 | 28 | DEF_MVE_FUNCTION (vaddvq, unary_int32, all_integer, p_or_none) |
632f70d8 | 29 | DEF_MVE_FUNCTION (vandq, binary, all_integer, mx_or_none) |
5e000215 | 30 | DEF_MVE_FUNCTION (vbrsrq, binary_imm32, all_integer, mx_or_none) |
446b5be4 CL |
31 | DEF_MVE_FUNCTION (vcaddq_rot90, binary, all_integer, mx_or_none) |
32 | DEF_MVE_FUNCTION (vcaddq_rot270, binary, all_integer, mx_or_none) | |
c32e1a71 CL |
33 | DEF_MVE_FUNCTION (vclsq, unary, all_signed, mx_or_none) |
34 | DEF_MVE_FUNCTION (vclzq, unary, all_integer, mx_or_none) | |
7674ae25 CL |
35 | DEF_MVE_FUNCTION (vcmpcsq, cmp, all_unsigned, m_or_none) |
36 | DEF_MVE_FUNCTION (vcmpeqq, cmp, all_integer, m_or_none) | |
37 | DEF_MVE_FUNCTION (vcmpgeq, cmp, all_signed, m_or_none) | |
38 | DEF_MVE_FUNCTION (vcmpgtq, cmp, all_signed, m_or_none) | |
39 | DEF_MVE_FUNCTION (vcmphiq, cmp, all_unsigned, m_or_none) | |
40 | DEF_MVE_FUNCTION (vcmpleq, cmp, all_signed, m_or_none) | |
41 | DEF_MVE_FUNCTION (vcmpltq, cmp, all_signed, m_or_none) | |
42 | DEF_MVE_FUNCTION (vcmpneq, cmp, all_integer, m_or_none) | |
07685b39 | 43 | DEF_MVE_FUNCTION (vcreateq, create, all_integer_with_64, none) |
fbcb43fa | 44 | DEF_MVE_FUNCTION (vdupq, unary_n, all_integer, mx_or_none) |
632f70d8 | 45 | DEF_MVE_FUNCTION (veorq, binary, all_integer, mx_or_none) |
6cff5f3d | 46 | DEF_MVE_FUNCTION (vhaddq, binary_opt_n, all_integer, mx_or_none) |
446b5be4 CL |
47 | DEF_MVE_FUNCTION (vhcaddq_rot90, binary, all_signed, mx_or_none) |
48 | DEF_MVE_FUNCTION (vhcaddq_rot270, binary, all_signed, mx_or_none) | |
6cff5f3d | 49 | DEF_MVE_FUNCTION (vhsubq, binary_opt_n, all_integer, mx_or_none) |
4d7647ed | 50 | DEF_MVE_FUNCTION (vld1q, load, all_integer, none) |
cf2c47b1 | 51 | DEF_MVE_FUNCTION (vmaxaq, binary_maxamina, all_signed, m_or_none) |
83fff825 | 52 | DEF_MVE_FUNCTION (vmaxavq, binary_maxavminav, all_signed, p_or_none) |
644f4758 | 53 | DEF_MVE_FUNCTION (vmaxq, binary, all_integer, mx_or_none) |
83fff825 | 54 | DEF_MVE_FUNCTION (vmaxvq, binary_maxvminv, all_integer, p_or_none) |
cf2c47b1 | 55 | DEF_MVE_FUNCTION (vminaq, binary_maxamina, all_signed, m_or_none) |
83fff825 | 56 | DEF_MVE_FUNCTION (vminavq, binary_maxavminav, all_signed, p_or_none) |
644f4758 | 57 | DEF_MVE_FUNCTION (vminq, binary, all_integer, mx_or_none) |
83fff825 | 58 | DEF_MVE_FUNCTION (vminvq, binary_maxvminv, all_integer, p_or_none) |
a39810ad CL |
59 | DEF_MVE_FUNCTION (vmladavaq, binary_acca_int32, all_integer, p_or_none) |
60 | DEF_MVE_FUNCTION (vmladavaxq, binary_acca_int32, all_signed, p_or_none) | |
0077e82f CL |
61 | DEF_MVE_FUNCTION (vmladavq, binary_acc_int32, all_integer, p_or_none) |
62 | DEF_MVE_FUNCTION (vmladavxq, binary_acc_int32, all_signed, p_or_none) | |
1c775537 CL |
63 | DEF_MVE_FUNCTION (vmlaldavaq, binary_acca_int64, integer_16_32, p_or_none) |
64 | DEF_MVE_FUNCTION (vmlaldavaxq, binary_acca_int64, signed_16_32, p_or_none) | |
0e6b57d3 CL |
65 | DEF_MVE_FUNCTION (vmlaldavq, binary_acc_int64, integer_16_32, p_or_none) |
66 | DEF_MVE_FUNCTION (vmlaldavxq, binary_acc_int64, signed_16_32, p_or_none) | |
9eea27e7 CL |
67 | DEF_MVE_FUNCTION (vmlaq, ternary_n, all_integer, m_or_none) |
68 | DEF_MVE_FUNCTION (vmlasq, ternary_n, all_integer, m_or_none) | |
a39810ad CL |
69 | DEF_MVE_FUNCTION (vmlsdavaq, binary_acca_int32, all_signed, p_or_none) |
70 | DEF_MVE_FUNCTION (vmlsdavaxq, binary_acca_int32, all_signed, p_or_none) | |
0077e82f CL |
71 | DEF_MVE_FUNCTION (vmlsdavq, binary_acc_int32, all_integer, p_or_none) |
72 | DEF_MVE_FUNCTION (vmlsdavxq, binary_acc_int32, all_signed, p_or_none) | |
1c775537 CL |
73 | DEF_MVE_FUNCTION (vmlsldavaq, binary_acca_int64, signed_16_32, p_or_none) |
74 | DEF_MVE_FUNCTION (vmlsldavaxq, binary_acca_int64, signed_16_32, p_or_none) | |
0e6b57d3 CL |
75 | DEF_MVE_FUNCTION (vmlsldavq, binary_acc_int64, signed_16_32, p_or_none) |
76 | DEF_MVE_FUNCTION (vmlsldavxq, binary_acc_int64, signed_16_32, p_or_none) | |
fb704499 CL |
77 | DEF_MVE_FUNCTION (vmovlbq, unary_widen, integer_8_16, mx_or_none) |
78 | DEF_MVE_FUNCTION (vmovltq, unary_widen, integer_8_16, mx_or_none) | |
865c8956 CL |
79 | DEF_MVE_FUNCTION (vmovnbq, binary_move_narrow, integer_16_32, m_or_none) |
80 | DEF_MVE_FUNCTION (vmovntq, binary_move_narrow, integer_16_32, m_or_none) | |
6cff5f3d | 81 | DEF_MVE_FUNCTION (vmulhq, binary, all_integer, mx_or_none) |
ee1ec8e3 CL |
82 | DEF_MVE_FUNCTION (vmullbq_int, binary_widen, all_integer, mx_or_none) |
83 | DEF_MVE_FUNCTION (vmulltq_int, binary_widen, all_integer, mx_or_none) | |
b52b09c1 CL |
84 | DEF_MVE_FUNCTION (vmullbq_poly, binary_widen_poly, poly_8_16, mx_or_none) |
85 | DEF_MVE_FUNCTION (vmulltq_poly, binary_widen_poly, poly_8_16, mx_or_none) | |
1942c5ab | 86 | DEF_MVE_FUNCTION (vmulq, binary_opt_n, all_integer, mx_or_none) |
5ca0f988 | 87 | DEF_MVE_FUNCTION (vmvnq, mvn, all_integer, mx_or_none) |
c32e1a71 | 88 | DEF_MVE_FUNCTION (vnegq, unary, all_signed, mx_or_none) |
f74588ac | 89 | DEF_MVE_FUNCTION (vorrq, binary_orrq, all_integer, mx_or_none) |
d607ae03 | 90 | DEF_MVE_FUNCTION (vpselq, vpsel, all_integer_with_64, none) |
c32e1a71 | 91 | DEF_MVE_FUNCTION (vqabsq, unary, all_signed, m_or_none) |
6cff5f3d | 92 | DEF_MVE_FUNCTION (vqaddq, binary_opt_n, all_integer, m_or_none) |
8fe848c4 CL |
93 | DEF_MVE_FUNCTION (vqdmladhq, ternary, all_signed, m_or_none) |
94 | DEF_MVE_FUNCTION (vqdmladhxq, ternary, all_signed, m_or_none) | |
9eea27e7 CL |
95 | DEF_MVE_FUNCTION (vqdmlahq, ternary_n, all_signed, m_or_none) |
96 | DEF_MVE_FUNCTION (vqdmlashq, ternary_n, all_signed, m_or_none) | |
8fe848c4 CL |
97 | DEF_MVE_FUNCTION (vqdmlsdhq, ternary, all_signed, m_or_none) |
98 | DEF_MVE_FUNCTION (vqdmlsdhxq, ternary, all_signed, m_or_none) | |
6cff5f3d | 99 | DEF_MVE_FUNCTION (vqdmulhq, binary_opt_n, all_signed, m_or_none) |
111a4f54 CL |
100 | DEF_MVE_FUNCTION (vqdmullbq, binary_widen_opt_n, signed_16_32, m_or_none) |
101 | DEF_MVE_FUNCTION (vqdmulltq, binary_widen_opt_n, signed_16_32, m_or_none) | |
865c8956 CL |
102 | DEF_MVE_FUNCTION (vqmovnbq, binary_move_narrow, integer_16_32, m_or_none) |
103 | DEF_MVE_FUNCTION (vqmovntq, binary_move_narrow, integer_16_32, m_or_none) | |
104 | DEF_MVE_FUNCTION (vqmovunbq, binary_move_narrow_unsigned, signed_16_32, m_or_none) | |
105 | DEF_MVE_FUNCTION (vqmovuntq, binary_move_narrow_unsigned, signed_16_32, m_or_none) | |
c32e1a71 | 106 | DEF_MVE_FUNCTION (vqnegq, unary, all_signed, m_or_none) |
8fe848c4 CL |
107 | DEF_MVE_FUNCTION (vqrdmladhq, ternary, all_signed, m_or_none) |
108 | DEF_MVE_FUNCTION (vqrdmladhxq, ternary, all_signed, m_or_none) | |
9eea27e7 CL |
109 | DEF_MVE_FUNCTION (vqrdmlahq, ternary_n, all_signed, m_or_none) |
110 | DEF_MVE_FUNCTION (vqrdmlashq, ternary_n, all_signed, m_or_none) | |
8fe848c4 CL |
111 | DEF_MVE_FUNCTION (vqrdmlsdhq, ternary, all_signed, m_or_none) |
112 | DEF_MVE_FUNCTION (vqrdmlsdhxq, ternary, all_signed, m_or_none) | |
0c90fe02 | 113 | DEF_MVE_FUNCTION (vqrdmulhq, binary_opt_n, all_signed, m_or_none) |
548e0613 | 114 | DEF_MVE_FUNCTION (vqrshlq, binary_round_lshift, all_integer, m_or_none) |
d8da15d6 CL |
115 | DEF_MVE_FUNCTION (vqrshrnbq, binary_rshift_narrow, integer_16_32, m_or_none) |
116 | DEF_MVE_FUNCTION (vqrshrntq, binary_rshift_narrow, integer_16_32, m_or_none) | |
b26c104f CL |
117 | DEF_MVE_FUNCTION (vqrshrunbq, binary_rshift_narrow_unsigned, signed_16_32, m_or_none) |
118 | DEF_MVE_FUNCTION (vqrshruntq, binary_rshift_narrow_unsigned, signed_16_32, m_or_none) | |
9e838ad1 CL |
119 | DEF_MVE_FUNCTION (vqshlq, binary_lshift, all_integer, m_or_none) |
120 | DEF_MVE_FUNCTION (vqshlq, binary_lshift_r, all_integer, m_or_none) | |
120290ad | 121 | DEF_MVE_FUNCTION (vqshluq, binary_lshift_unsigned, all_signed, m_or_none) |
d8da15d6 CL |
122 | DEF_MVE_FUNCTION (vqshrnbq, binary_rshift_narrow, integer_16_32, m_or_none) |
123 | DEF_MVE_FUNCTION (vqshrntq, binary_rshift_narrow, integer_16_32, m_or_none) | |
b26c104f CL |
124 | DEF_MVE_FUNCTION (vqshrunbq, binary_rshift_narrow_unsigned, signed_16_32, m_or_none) |
125 | DEF_MVE_FUNCTION (vqshruntq, binary_rshift_narrow_unsigned, signed_16_32, m_or_none) | |
6cff5f3d | 126 | DEF_MVE_FUNCTION (vqsubq, binary_opt_n, all_integer, m_or_none) |
00d97bf3 | 127 | DEF_MVE_FUNCTION (vreinterpretq, unary_convert, reinterpret_integer, none) |
dd691524 CL |
128 | DEF_MVE_FUNCTION (vrev16q, unary, integer_8, mx_or_none) |
129 | DEF_MVE_FUNCTION (vrev32q, unary, integer_8_16, mx_or_none) | |
130 | DEF_MVE_FUNCTION (vrev64q, unary, all_integer, mx_or_none) | |
6cff5f3d | 131 | DEF_MVE_FUNCTION (vrhaddq, binary, all_integer, mx_or_none) |
e77a5ade CL |
132 | DEF_MVE_FUNCTION (vrmlaldavhaq, binary_acca_int64, integer_32, p_or_none) |
133 | DEF_MVE_FUNCTION (vrmlaldavhaxq, binary_acca_int64, integer_32, p_or_none) | |
23ff8097 CL |
134 | DEF_MVE_FUNCTION (vrmlaldavhq, binary_acc_int64, integer_32, p_or_none) |
135 | DEF_MVE_FUNCTION (vrmlaldavhxq, binary_acc_int64, signed_32, p_or_none) | |
e77a5ade CL |
136 | DEF_MVE_FUNCTION (vrmlsldavhaq, binary_acca_int64, integer_32, p_or_none) |
137 | DEF_MVE_FUNCTION (vrmlsldavhaxq, binary_acca_int64, integer_32, p_or_none) | |
23ff8097 CL |
138 | DEF_MVE_FUNCTION (vrmlsldavhq, binary_acc_int64, signed_32, p_or_none) |
139 | DEF_MVE_FUNCTION (vrmlsldavhxq, binary_acc_int64, signed_32, p_or_none) | |
6cff5f3d | 140 | DEF_MVE_FUNCTION (vrmulhq, binary, all_integer, mx_or_none) |
548e0613 | 141 | DEF_MVE_FUNCTION (vrshlq, binary_round_lshift, all_integer, mx_or_none) |
d8da15d6 CL |
142 | DEF_MVE_FUNCTION (vrshrnbq, binary_rshift_narrow, integer_16_32, m_or_none) |
143 | DEF_MVE_FUNCTION (vrshrntq, binary_rshift_narrow, integer_16_32, m_or_none) | |
bb043cd3 | 144 | DEF_MVE_FUNCTION (vrshrq, binary_rshift, all_integer, mx_or_none) |
8440230e CL |
145 | DEF_MVE_FUNCTION (vshllbq, binary_widen_n, integer_8_16, mx_or_none) |
146 | DEF_MVE_FUNCTION (vshlltq, binary_widen_n, integer_8_16, mx_or_none) | |
9e838ad1 CL |
147 | DEF_MVE_FUNCTION (vshlq, binary_lshift, all_integer, mx_or_none) |
148 | DEF_MVE_FUNCTION (vshlq, binary_lshift_r, all_integer, m_or_none) // "_r" forms do not support the "x" predicate | |
d8da15d6 CL |
149 | DEF_MVE_FUNCTION (vshrnbq, binary_rshift_narrow, integer_16_32, m_or_none) |
150 | DEF_MVE_FUNCTION (vshrntq, binary_rshift_narrow, integer_16_32, m_or_none) | |
bb043cd3 | 151 | DEF_MVE_FUNCTION (vshrq, binary_rshift, all_integer, mx_or_none) |
6caaf36e | 152 | DEF_MVE_FUNCTION (vsliq, ternary_lshift, all_integer, m_or_none) |
f52bf590 | 153 | DEF_MVE_FUNCTION (vsriq, ternary_rshift, all_integer, m_or_none) |
4d7647ed | 154 | DEF_MVE_FUNCTION (vst1q, store, all_integer, none) |
1942c5ab | 155 | DEF_MVE_FUNCTION (vsubq, binary_opt_n, all_integer, mx_or_none) |
937ac2cd | 156 | DEF_MVE_FUNCTION (vuninitializedq, inherent, all_integer_with_64, none) |
6f59caf1 CL |
157 | #undef REQUIRES_FLOAT |
158 | ||
159 | #define REQUIRES_FLOAT true | |
6079d94a | 160 | DEF_MVE_FUNCTION (vabdq, binary, all_float, mx_or_none) |
c32e1a71 | 161 | DEF_MVE_FUNCTION (vabsq, unary, all_float, mx_or_none) |
1942c5ab | 162 | DEF_MVE_FUNCTION (vaddq, binary_opt_n, all_float, mx_or_none) |
632f70d8 | 163 | DEF_MVE_FUNCTION (vandq, binary, all_float, mx_or_none) |
5e000215 | 164 | DEF_MVE_FUNCTION (vbrsrq, binary_imm32, all_float, mx_or_none) |
446b5be4 CL |
165 | DEF_MVE_FUNCTION (vcaddq_rot90, binary, all_float, mx_or_none) |
166 | DEF_MVE_FUNCTION (vcaddq_rot270, binary, all_float, mx_or_none) | |
49a2a63e CL |
167 | DEF_MVE_FUNCTION (vcmlaq, ternary, all_float, m_or_none) |
168 | DEF_MVE_FUNCTION (vcmlaq_rot90, ternary, all_float, m_or_none) | |
169 | DEF_MVE_FUNCTION (vcmlaq_rot180, ternary, all_float, m_or_none) | |
170 | DEF_MVE_FUNCTION (vcmlaq_rot270, ternary, all_float, m_or_none) | |
a96e2dd1 CL |
171 | DEF_MVE_FUNCTION (vcmulq, binary, all_float, mx_or_none) |
172 | DEF_MVE_FUNCTION (vcmulq_rot90, binary, all_float, mx_or_none) | |
173 | DEF_MVE_FUNCTION (vcmulq_rot180, binary, all_float, mx_or_none) | |
174 | DEF_MVE_FUNCTION (vcmulq_rot270, binary, all_float, mx_or_none) | |
7674ae25 CL |
175 | DEF_MVE_FUNCTION (vcmpeqq, cmp, all_float, m_or_none) |
176 | DEF_MVE_FUNCTION (vcmpgeq, cmp, all_float, m_or_none) | |
177 | DEF_MVE_FUNCTION (vcmpgtq, cmp, all_float, m_or_none) | |
178 | DEF_MVE_FUNCTION (vcmpleq, cmp, all_float, m_or_none) | |
179 | DEF_MVE_FUNCTION (vcmpltq, cmp, all_float, m_or_none) | |
180 | DEF_MVE_FUNCTION (vcmpneq, cmp, all_float, m_or_none) | |
07685b39 | 181 | DEF_MVE_FUNCTION (vcreateq, create, all_float, none) |
fbcb43fa | 182 | DEF_MVE_FUNCTION (vdupq, unary_n, all_float, mx_or_none) |
632f70d8 | 183 | DEF_MVE_FUNCTION (veorq, binary, all_float, mx_or_none) |
17950739 CL |
184 | DEF_MVE_FUNCTION (vfmaq, ternary_opt_n, all_float, m_or_none) |
185 | DEF_MVE_FUNCTION (vfmasq, ternary_n, all_float, m_or_none) | |
186 | DEF_MVE_FUNCTION (vfmsq, ternary, all_float, m_or_none) | |
4d7647ed | 187 | DEF_MVE_FUNCTION (vld1q, load, all_float, none) |
adff073b | 188 | DEF_MVE_FUNCTION (vmaxnmaq, binary, all_float, m_or_none) |
400453c3 | 189 | DEF_MVE_FUNCTION (vmaxnmavq, binary_maxvminv, all_float, p_or_none) |
9c4fea24 | 190 | DEF_MVE_FUNCTION (vmaxnmq, binary, all_float, mx_or_none) |
400453c3 | 191 | DEF_MVE_FUNCTION (vmaxnmvq, binary_maxvminv, all_float, p_or_none) |
adff073b | 192 | DEF_MVE_FUNCTION (vminnmaq, binary, all_float, m_or_none) |
400453c3 | 193 | DEF_MVE_FUNCTION (vminnmavq, binary_maxvminv, all_float, p_or_none) |
9c4fea24 | 194 | DEF_MVE_FUNCTION (vminnmq, binary, all_float, mx_or_none) |
400453c3 | 195 | DEF_MVE_FUNCTION (vminnmvq, binary_maxvminv, all_float, p_or_none) |
1942c5ab | 196 | DEF_MVE_FUNCTION (vmulq, binary_opt_n, all_float, mx_or_none) |
c32e1a71 | 197 | DEF_MVE_FUNCTION (vnegq, unary, all_float, mx_or_none) |
f74588ac | 198 | DEF_MVE_FUNCTION (vorrq, binary_orrq, all_float, mx_or_none) |
d607ae03 | 199 | DEF_MVE_FUNCTION (vpselq, vpsel, all_float, none) |
00d97bf3 | 200 | DEF_MVE_FUNCTION (vreinterpretq, unary_convert, reinterpret_float, none) |
dd691524 CL |
201 | DEF_MVE_FUNCTION (vrev32q, unary, float16, mx_or_none) |
202 | DEF_MVE_FUNCTION (vrev64q, unary, all_float, mx_or_none) | |
95908b98 CL |
203 | DEF_MVE_FUNCTION (vrndaq, unary, all_float, mx_or_none) |
204 | DEF_MVE_FUNCTION (vrndmq, unary, all_float, mx_or_none) | |
205 | DEF_MVE_FUNCTION (vrndnq, unary, all_float, mx_or_none) | |
206 | DEF_MVE_FUNCTION (vrndpq, unary, all_float, mx_or_none) | |
207 | DEF_MVE_FUNCTION (vrndq, unary, all_float, mx_or_none) | |
208 | DEF_MVE_FUNCTION (vrndxq, unary, all_float, mx_or_none) | |
4d7647ed | 209 | DEF_MVE_FUNCTION (vst1q, store, all_float, none) |
1942c5ab | 210 | DEF_MVE_FUNCTION (vsubq, binary_opt_n, all_float, mx_or_none) |
937ac2cd | 211 | DEF_MVE_FUNCTION (vuninitializedq, inherent, all_float, none) |
6f59caf1 | 212 | #undef REQUIRES_FLOAT |