1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- G N A T . A L T I V E C . L O W _ L E V E L _ V E C T O R S --
8 -- (Hard Binding Version) --
10 -- Copyright (C) 2004-2018, Free Software Foundation, Inc. --
12 -- GNAT is free software; you can redistribute it and/or modify it under --
13 -- terms of the GNU General Public License as published by the Free Soft- --
14 -- ware Foundation; either version 3, or (at your option) any later ver- --
15 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE. --
19 -- As a special exception under Section 7 of GPL version 3, you are granted --
20 -- additional permissions described in the GCC Runtime Library Exception, --
21 -- version 3.1, as published by the Free Software Foundation. --
23 -- You should have received a copy of the GNU General Public License and --
24 -- a copy of the GCC Runtime Library Exception along with this program; --
25 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
26 -- <http://www.gnu.org/licenses/>. --
28 -- GNAT was originally developed by the GNAT team at New York University. --
29 -- Extensive contributions were provided by Ada Core Technologies Inc. --
31 ------------------------------------------------------------------------------
33 -- This unit exposes the low level vector support for the Hard binding,
34 -- intended for AltiVec capable targets. See Altivec.Design for a description
35 -- of what is expected to be exposed.
37 package GNAT
.Altivec
.Low_Level_Vectors
is
38 pragma Elaborate_Body
;
40 ----------------------------------------
41 -- Low-level Vector Type Declarations --
42 ----------------------------------------
44 type LL_VUC
is private;
45 type LL_VSC
is private;
46 type LL_VBC
is private;
48 type LL_VUS
is private;
49 type LL_VSS
is private;
50 type LL_VBS
is private;
52 type LL_VUI
is private;
53 type LL_VSI
is private;
54 type LL_VBI
is private;
56 type LL_VF
is private;
57 type LL_VP
is private;
59 ------------------------------------
60 -- Low-level Functional Interface --
61 ------------------------------------
63 function abs_v16qi
(A
: LL_VSC
) return LL_VSC
;
64 function abs_v8hi
(A
: LL_VSS
) return LL_VSS
;
65 function abs_v4si
(A
: LL_VSI
) return LL_VSI
;
66 function abs_v4sf
(A
: LL_VF
) return LL_VF
;
68 function abss_v16qi
(A
: LL_VSC
) return LL_VSC
;
69 function abss_v8hi
(A
: LL_VSS
) return LL_VSS
;
70 function abss_v4si
(A
: LL_VSI
) return LL_VSI
;
72 function vaddubm
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
73 function vadduhm
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
74 function vadduwm
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
75 function vaddfp
(A
: LL_VF
; B
: LL_VF
) return LL_VF
;
77 function vaddcuw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
79 function vaddubs
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
80 function vaddsbs
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
81 function vadduhs
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
82 function vaddshs
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
83 function vadduws
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
84 function vaddsws
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
86 function vand
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
87 function vandc
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
89 function vavgub
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
90 function vavgsb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
91 function vavguh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
92 function vavgsh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
93 function vavguw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
94 function vavgsw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
96 function vcmpbfp
(A
: LL_VF
; B
: LL_VF
) return LL_VSI
;
98 function vcmpequb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
99 function vcmpequh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
100 function vcmpequw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
101 function vcmpeqfp
(A
: LL_VF
; B
: LL_VF
) return LL_VF
;
103 function vcmpgefp
(A
: LL_VF
; B
: LL_VF
) return LL_VF
;
105 function vcmpgtub
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
106 function vcmpgtsb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
107 function vcmpgtuh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
108 function vcmpgtsh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
109 function vcmpgtuw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
110 function vcmpgtsw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
111 function vcmpgtfp
(A
: LL_VF
; B
: LL_VF
) return LL_VF
;
113 function vcfux
(A
: LL_VUI
; B
: c_int
) return LL_VF
;
114 function vcfsx
(A
: LL_VSI
; B
: c_int
) return LL_VF
;
116 function vctsxs
(A
: LL_VF
; B
: c_int
) return LL_VSI
;
117 function vctuxs
(A
: LL_VF
; B
: c_int
) return LL_VUI
;
119 procedure dss
(A
: c_int
);
122 procedure dst
(A
: c_ptr
; B
: c_int
; C
: c_int
);
123 procedure dstst
(A
: c_ptr
; B
: c_int
; C
: c_int
);
124 procedure dststt
(A
: c_ptr
; B
: c_int
; C
: c_int
);
125 procedure dstt
(A
: c_ptr
; B
: c_int
; C
: c_int
);
127 function vexptefp
(A
: LL_VF
) return LL_VF
;
129 function vrfim
(A
: LL_VF
) return LL_VF
;
131 function lvx
(A
: c_long
; B
: c_ptr
) return LL_VSI
;
132 function lvebx
(A
: c_long
; B
: c_ptr
) return LL_VSC
;
133 function lvehx
(A
: c_long
; B
: c_ptr
) return LL_VSS
;
134 function lvewx
(A
: c_long
; B
: c_ptr
) return LL_VSI
;
135 function lvxl
(A
: c_long
; B
: c_ptr
) return LL_VSI
;
137 function vlogefp
(A
: LL_VF
) return LL_VF
;
139 function lvsl
(A
: c_long
; B
: c_ptr
) return LL_VSC
;
140 function lvsr
(A
: c_long
; B
: c_ptr
) return LL_VSC
;
142 function vmaddfp
(A
: LL_VF
; B
: LL_VF
; C
: LL_VF
) return LL_VF
;
144 function vmhaddshs
(A
: LL_VSS
; B
: LL_VSS
; C
: LL_VSS
) return LL_VSS
;
146 function vmaxub
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
147 function vmaxsb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
148 function vmaxuh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
149 function vmaxsh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
150 function vmaxuw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
151 function vmaxsw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
152 function vmaxfp
(A
: LL_VF
; B
: LL_VF
) return LL_VF
;
154 function vmrghb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
155 function vmrghh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
156 function vmrghw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
157 function vmrglb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
158 function vmrglh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
159 function vmrglw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
161 function mfvscr
return LL_VSS
;
163 function vminfp
(A
: LL_VF
; B
: LL_VF
) return LL_VF
;
164 function vminsb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
165 function vminsh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
166 function vminsw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
167 function vminub
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
168 function vminuh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
169 function vminuw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
171 function vmladduhm
(A
: LL_VSS
; B
: LL_VSS
; C
: LL_VSS
) return LL_VSS
;
173 function vmhraddshs
(A
: LL_VSS
; B
: LL_VSS
; C
: LL_VSS
) return LL_VSS
;
175 function vmsumubm
(A
: LL_VSC
; B
: LL_VSC
; C
: LL_VSI
) return LL_VSI
;
176 function vmsummbm
(A
: LL_VSC
; B
: LL_VSC
; C
: LL_VSI
) return LL_VSI
;
177 function vmsumuhm
(A
: LL_VSS
; B
: LL_VSS
; C
: LL_VSI
) return LL_VSI
;
178 function vmsumshm
(A
: LL_VSS
; B
: LL_VSS
; C
: LL_VSI
) return LL_VSI
;
179 function vmsumuhs
(A
: LL_VSS
; B
: LL_VSS
; C
: LL_VSI
) return LL_VSI
;
180 function vmsumshs
(A
: LL_VSS
; B
: LL_VSS
; C
: LL_VSI
) return LL_VSI
;
182 procedure mtvscr
(A
: LL_VSI
);
184 function vmuleub
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSS
;
185 function vmuleuh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSI
;
186 function vmulesb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSS
;
187 function vmulesh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSI
;
189 function vmulosb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSS
;
190 function vmulosh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSI
;
191 function vmuloub
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSS
;
192 function vmulouh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSI
;
194 function vnmsubfp
(A
: LL_VF
; B
: LL_VF
; C
: LL_VF
) return LL_VF
;
196 function vxor
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
197 function vnor
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
198 function vor
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
200 function vpkuhum
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSC
;
201 function vpkuwum
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSS
;
202 function vpkpx
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSS
;
203 function vpkuhus
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSC
;
204 function vpkuwus
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSS
;
205 function vpkshss
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSC
;
206 function vpkswss
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSS
;
207 function vpkshus
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSC
;
208 function vpkswus
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSS
;
210 function vperm_4si
(A
: LL_VSI
; B
: LL_VSI
; C
: LL_VSC
) return LL_VSI
;
212 function vrefp
(A
: LL_VF
) return LL_VF
;
214 function vrlb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
215 function vrlh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
216 function vrlw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
218 function vrfin
(A
: LL_VF
) return LL_VF
;
219 function vrfip
(A
: LL_VF
) return LL_VF
;
220 function vrfiz
(A
: LL_VF
) return LL_VF
;
222 function vrsqrtefp
(A
: LL_VF
) return LL_VF
;
224 function vsel_4si
(A
: LL_VSI
; B
: LL_VSI
; C
: LL_VSI
) return LL_VSI
;
226 function vslb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
227 function vslh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
228 function vslw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
230 function vsldoi_4si
(A
: LL_VSI
; B
: LL_VSI
; C
: c_int
) return LL_VSI
;
231 function vsldoi_8hi
(A
: LL_VSS
; B
: LL_VSS
; C
: c_int
) return LL_VSS
;
232 function vsldoi_16qi
(A
: LL_VSC
; B
: LL_VSC
; C
: c_int
) return LL_VSC
;
233 function vsldoi_4sf
(A
: LL_VF
; B
: LL_VF
; C
: c_int
) return LL_VF
;
235 function vsl
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
236 function vslo
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
238 function vspltb
(A
: LL_VSC
; B
: c_int
) return LL_VSC
;
239 function vsplth
(A
: LL_VSS
; B
: c_int
) return LL_VSS
;
240 function vspltw
(A
: LL_VSI
; B
: c_int
) return LL_VSI
;
242 function vspltisb
(A
: c_int
) return LL_VSC
;
243 function vspltish
(A
: c_int
) return LL_VSS
;
244 function vspltisw
(A
: c_int
) return LL_VSI
;
246 function vsrb
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
247 function vsrh
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
248 function vsrw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
250 function vsrab
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
251 function vsrah
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
252 function vsraw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
254 function vsr
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
255 function vsro
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
257 procedure stvx
(A
: LL_VSI
; B
: c_int
; C
: c_ptr
);
258 procedure stvebx
(A
: LL_VSC
; B
: c_int
; C
: c_ptr
);
259 procedure stvehx
(A
: LL_VSS
; B
: c_int
; C
: c_ptr
);
260 procedure stvewx
(A
: LL_VSI
; B
: c_int
; C
: c_ptr
);
261 procedure stvxl
(A
: LL_VSI
; B
: c_int
; C
: c_ptr
);
263 function vsububm
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
264 function vsubuhm
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
265 function vsubuwm
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
266 function vsubfp
(A
: LL_VF
; B
: LL_VF
) return LL_VF
;
268 function vsubcuw
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
270 function vsububs
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
271 function vsubsbs
(A
: LL_VSC
; B
: LL_VSC
) return LL_VSC
;
272 function vsubuhs
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
273 function vsubshs
(A
: LL_VSS
; B
: LL_VSS
) return LL_VSS
;
274 function vsubuws
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
275 function vsubsws
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
277 function vsum4ubs
(A
: LL_VSC
; B
: LL_VSI
) return LL_VSI
;
278 function vsum4sbs
(A
: LL_VSC
; B
: LL_VSI
) return LL_VSI
;
279 function vsum4shs
(A
: LL_VSS
; B
: LL_VSI
) return LL_VSI
;
281 function vsum2sws
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
282 function vsumsws
(A
: LL_VSI
; B
: LL_VSI
) return LL_VSI
;
284 function vupkhsb
(A
: LL_VSC
) return LL_VSS
;
285 function vupkhsh
(A
: LL_VSS
) return LL_VSI
;
286 function vupkhpx
(A
: LL_VSS
) return LL_VSI
;
288 function vupklsb
(A
: LL_VSC
) return LL_VSS
;
289 function vupklsh
(A
: LL_VSS
) return LL_VSI
;
290 function vupklpx
(A
: LL_VSS
) return LL_VSI
;
292 function vcmpequb_p
(A
: c_int
; B
: LL_VSC
; C
: LL_VSC
) return c_int
;
293 function vcmpequh_p
(A
: c_int
; B
: LL_VSS
; C
: LL_VSS
) return c_int
;
294 function vcmpequw_p
(A
: c_int
; B
: LL_VSI
; C
: LL_VSI
) return c_int
;
295 function vcmpeqfp_p
(A
: c_int
; B
: LL_VF
; C
: LL_VF
) return c_int
;
297 function vcmpgtub_p
(A
: c_int
; B
: LL_VSC
; C
: LL_VSC
) return c_int
;
298 function vcmpgtuh_p
(A
: c_int
; B
: LL_VSS
; C
: LL_VSS
) return c_int
;
299 function vcmpgtuw_p
(A
: c_int
; B
: LL_VSI
; C
: LL_VSI
) return c_int
;
300 function vcmpgtsb_p
(A
: c_int
; B
: LL_VSC
; C
: LL_VSC
) return c_int
;
301 function vcmpgtsh_p
(A
: c_int
; B
: LL_VSS
; C
: LL_VSS
) return c_int
;
302 function vcmpgtsw_p
(A
: c_int
; B
: LL_VSI
; C
: LL_VSI
) return c_int
;
303 function vcmpgtfp_p
(A
: c_int
; B
: LL_VF
; C
: LL_VF
) return c_int
;
305 function vcmpgefp_p
(A
: c_int
; B
: LL_VF
; C
: LL_VF
) return c_int
;
306 function vcmpbfp_p
(A
: c_int
; B
: LL_VF
; C
: LL_VF
) return c_int
;
310 ---------------------------------------
311 -- Low-level Vector Type Definitions --
312 ---------------------------------------
314 -- [PIM-2.3.3 Alignment of aggregate and unions containing vector types]:
316 -- "Aggregates (structures and arrays) and unions containing vector
317 -- types must be aligned on 16-byte boundaries and their internal
318 -- organization padded, if necessary, so that each internal vector
319 -- type is aligned on a 16-byte boundary. This is an extension to
320 -- all ABIs (AIX, Apple, SVR4, and EABI).
322 --------------------------
323 -- char Core Components --
324 --------------------------
326 type LL_VUC
is array (1 .. 16) of unsigned_char
;
327 for LL_VUC
'Alignment use VECTOR_ALIGNMENT
;
328 pragma Machine_Attribute
(LL_VUC
, "vector_type");
329 pragma Suppress
(All_Checks
, LL_VUC
);
331 type LL_VSC
is array (1 .. 16) of signed_char
;
332 for LL_VSC
'Alignment use VECTOR_ALIGNMENT
;
333 pragma Machine_Attribute
(LL_VSC
, "vector_type");
334 pragma Suppress
(All_Checks
, LL_VSC
);
336 type LL_VBC
is array (1 .. 16) of unsigned_char
;
337 for LL_VBC
'Alignment use VECTOR_ALIGNMENT
;
338 pragma Machine_Attribute
(LL_VBC
, "vector_type");
339 pragma Suppress
(All_Checks
, LL_VBC
);
341 ---------------------------
342 -- short Core Components --
343 ---------------------------
345 type LL_VUS
is array (1 .. 8) of unsigned_short
;
346 for LL_VUS
'Alignment use VECTOR_ALIGNMENT
;
347 pragma Machine_Attribute
(LL_VUS
, "vector_type");
348 pragma Suppress
(All_Checks
, LL_VUS
);
350 type LL_VSS
is array (1 .. 8) of signed_short
;
351 for LL_VSS
'Alignment use VECTOR_ALIGNMENT
;
352 pragma Machine_Attribute
(LL_VSS
, "vector_type");
353 pragma Suppress
(All_Checks
, LL_VSS
);
355 type LL_VBS
is array (1 .. 8) of unsigned_short
;
356 for LL_VBS
'Alignment use VECTOR_ALIGNMENT
;
357 pragma Machine_Attribute
(LL_VBS
, "vector_type");
358 pragma Suppress
(All_Checks
, LL_VBS
);
360 -------------------------
361 -- int Core Components --
362 -------------------------
364 type LL_VUI
is array (1 .. 4) of unsigned_int
;
365 for LL_VUI
'Alignment use VECTOR_ALIGNMENT
;
366 pragma Machine_Attribute
(LL_VUI
, "vector_type");
367 pragma Suppress
(All_Checks
, LL_VUI
);
369 type LL_VSI
is array (1 .. 4) of signed_int
;
370 for LL_VSI
'Alignment use VECTOR_ALIGNMENT
;
371 pragma Machine_Attribute
(LL_VSI
, "vector_type");
372 pragma Suppress
(All_Checks
, LL_VSI
);
374 type LL_VBI
is array (1 .. 4) of unsigned_int
;
375 for LL_VBI
'Alignment use VECTOR_ALIGNMENT
;
376 pragma Machine_Attribute
(LL_VBI
, "vector_type");
377 pragma Suppress
(All_Checks
, LL_VBI
);
379 ---------------------------
380 -- Float Core Components --
381 ---------------------------
383 type LL_VF
is array (1 .. 4) of Float;
384 for LL_VF
'Alignment use VECTOR_ALIGNMENT
;
385 pragma Machine_Attribute
(LL_VF
, "vector_type");
386 pragma Suppress
(All_Checks
, LL_VF
);
388 ---------------------------
389 -- pixel Core Components --
390 ---------------------------
392 type LL_VP
is array (1 .. 8) of pixel
;
393 for LL_VP
'Alignment use VECTOR_ALIGNMENT
;
394 pragma Machine_Attribute
(LL_VP
, "vector_type");
395 pragma Suppress
(All_Checks
, LL_VP
);
397 ------------------------------------
398 -- Low-level Functional Interface --
399 ------------------------------------
401 -- The functions we have to expose here are exactly those for which
402 -- GCC builtins are available. Calls to these functions will be turned
403 -- into real AltiVec instructions by the GCC back-end.
405 pragma Convention_Identifier
(LL_Altivec
, Intrinsic
);
407 pragma Import
(LL_Altivec
, dss
, "__builtin_altivec_dss");
408 pragma Import
(LL_Altivec
, dssall
, "__builtin_altivec_dssall");
409 pragma Import
(LL_Altivec
, dst
, "__builtin_altivec_dst");
410 pragma Import
(LL_Altivec
, dstst
, "__builtin_altivec_dstst");
411 pragma Import
(LL_Altivec
, dststt
, "__builtin_altivec_dststt");
412 pragma Import
(LL_Altivec
, dstt
, "__builtin_altivec_dstt");
413 pragma Import
(LL_Altivec
, mtvscr
, "__builtin_altivec_mtvscr");
414 pragma Import
(LL_Altivec
, mfvscr
, "__builtin_altivec_mfvscr");
415 pragma Import
(LL_Altivec
, stvebx
, "__builtin_altivec_stvebx");
416 pragma Import
(LL_Altivec
, stvehx
, "__builtin_altivec_stvehx");
417 pragma Import
(LL_Altivec
, stvewx
, "__builtin_altivec_stvewx");
418 pragma Import
(LL_Altivec
, stvx
, "__builtin_altivec_stvx");
419 pragma Import
(LL_Altivec
, stvxl
, "__builtin_altivec_stvxl");
420 pragma Import
(LL_Altivec
, lvebx
, "__builtin_altivec_lvebx");
421 pragma Import
(LL_Altivec
, lvehx
, "__builtin_altivec_lvehx");
422 pragma Import
(LL_Altivec
, lvewx
, "__builtin_altivec_lvewx");
423 pragma Import
(LL_Altivec
, lvx
, "__builtin_altivec_lvx");
424 pragma Import
(LL_Altivec
, lvxl
, "__builtin_altivec_lvxl");
425 pragma Import
(LL_Altivec
, lvsl
, "__builtin_altivec_lvsl");
426 pragma Import
(LL_Altivec
, lvsr
, "__builtin_altivec_lvsr");
427 pragma Import
(LL_Altivec
, abs_v16qi
, "__builtin_altivec_abs_v16qi");
428 pragma Import
(LL_Altivec
, abs_v8hi
, "__builtin_altivec_abs_v8hi");
429 pragma Import
(LL_Altivec
, abs_v4si
, "__builtin_altivec_abs_v4si");
430 pragma Import
(LL_Altivec
, abs_v4sf
, "__builtin_altivec_abs_v4sf");
431 pragma Import
(LL_Altivec
, abss_v16qi
, "__builtin_altivec_abss_v16qi");
432 pragma Import
(LL_Altivec
, abss_v8hi
, "__builtin_altivec_abss_v8hi");
433 pragma Import
(LL_Altivec
, abss_v4si
, "__builtin_altivec_abss_v4si");
434 pragma Import
(LL_Altivec
, vaddcuw
, "__builtin_altivec_vaddcuw");
435 pragma Import
(LL_Altivec
, vaddfp
, "__builtin_altivec_vaddfp");
436 pragma Import
(LL_Altivec
, vaddsbs
, "__builtin_altivec_vaddsbs");
437 pragma Import
(LL_Altivec
, vaddshs
, "__builtin_altivec_vaddshs");
438 pragma Import
(LL_Altivec
, vaddsws
, "__builtin_altivec_vaddsws");
439 pragma Import
(LL_Altivec
, vaddubm
, "__builtin_altivec_vaddubm");
440 pragma Import
(LL_Altivec
, vaddubs
, "__builtin_altivec_vaddubs");
441 pragma Import
(LL_Altivec
, vadduhm
, "__builtin_altivec_vadduhm");
442 pragma Import
(LL_Altivec
, vadduhs
, "__builtin_altivec_vadduhs");
443 pragma Import
(LL_Altivec
, vadduwm
, "__builtin_altivec_vadduwm");
444 pragma Import
(LL_Altivec
, vadduws
, "__builtin_altivec_vadduws");
445 pragma Import
(LL_Altivec
, vand
, "__builtin_altivec_vand");
446 pragma Import
(LL_Altivec
, vandc
, "__builtin_altivec_vandc");
447 pragma Import
(LL_Altivec
, vavgsb
, "__builtin_altivec_vavgsb");
448 pragma Import
(LL_Altivec
, vavgsh
, "__builtin_altivec_vavgsh");
449 pragma Import
(LL_Altivec
, vavgsw
, "__builtin_altivec_vavgsw");
450 pragma Import
(LL_Altivec
, vavgub
, "__builtin_altivec_vavgub");
451 pragma Import
(LL_Altivec
, vavguh
, "__builtin_altivec_vavguh");
452 pragma Import
(LL_Altivec
, vavguw
, "__builtin_altivec_vavguw");
453 pragma Import
(LL_Altivec
, vcfsx
, "__builtin_altivec_vcfsx");
454 pragma Import
(LL_Altivec
, vcfux
, "__builtin_altivec_vcfux");
455 pragma Import
(LL_Altivec
, vcmpbfp
, "__builtin_altivec_vcmpbfp");
456 pragma Import
(LL_Altivec
, vcmpeqfp
, "__builtin_altivec_vcmpeqfp");
457 pragma Import
(LL_Altivec
, vcmpequb
, "__builtin_altivec_vcmpequb");
458 pragma Import
(LL_Altivec
, vcmpequh
, "__builtin_altivec_vcmpequh");
459 pragma Import
(LL_Altivec
, vcmpequw
, "__builtin_altivec_vcmpequw");
460 pragma Import
(LL_Altivec
, vcmpgefp
, "__builtin_altivec_vcmpgefp");
461 pragma Import
(LL_Altivec
, vcmpgtfp
, "__builtin_altivec_vcmpgtfp");
462 pragma Import
(LL_Altivec
, vcmpgtsb
, "__builtin_altivec_vcmpgtsb");
463 pragma Import
(LL_Altivec
, vcmpgtsh
, "__builtin_altivec_vcmpgtsh");
464 pragma Import
(LL_Altivec
, vcmpgtsw
, "__builtin_altivec_vcmpgtsw");
465 pragma Import
(LL_Altivec
, vcmpgtub
, "__builtin_altivec_vcmpgtub");
466 pragma Import
(LL_Altivec
, vcmpgtuh
, "__builtin_altivec_vcmpgtuh");
467 pragma Import
(LL_Altivec
, vcmpgtuw
, "__builtin_altivec_vcmpgtuw");
468 pragma Import
(LL_Altivec
, vctsxs
, "__builtin_altivec_vctsxs");
469 pragma Import
(LL_Altivec
, vctuxs
, "__builtin_altivec_vctuxs");
470 pragma Import
(LL_Altivec
, vexptefp
, "__builtin_altivec_vexptefp");
471 pragma Import
(LL_Altivec
, vlogefp
, "__builtin_altivec_vlogefp");
472 pragma Import
(LL_Altivec
, vmaddfp
, "__builtin_altivec_vmaddfp");
473 pragma Import
(LL_Altivec
, vmaxfp
, "__builtin_altivec_vmaxfp");
474 pragma Import
(LL_Altivec
, vmaxsb
, "__builtin_altivec_vmaxsb");
475 pragma Import
(LL_Altivec
, vmaxsh
, "__builtin_altivec_vmaxsh");
476 pragma Import
(LL_Altivec
, vmaxsw
, "__builtin_altivec_vmaxsw");
477 pragma Import
(LL_Altivec
, vmaxub
, "__builtin_altivec_vmaxub");
478 pragma Import
(LL_Altivec
, vmaxuh
, "__builtin_altivec_vmaxuh");
479 pragma Import
(LL_Altivec
, vmaxuw
, "__builtin_altivec_vmaxuw");
480 pragma Import
(LL_Altivec
, vmhaddshs
, "__builtin_altivec_vmhaddshs");
481 pragma Import
(LL_Altivec
, vmhraddshs
, "__builtin_altivec_vmhraddshs");
482 pragma Import
(LL_Altivec
, vminfp
, "__builtin_altivec_vminfp");
483 pragma Import
(LL_Altivec
, vminsb
, "__builtin_altivec_vminsb");
484 pragma Import
(LL_Altivec
, vminsh
, "__builtin_altivec_vminsh");
485 pragma Import
(LL_Altivec
, vminsw
, "__builtin_altivec_vminsw");
486 pragma Import
(LL_Altivec
, vminub
, "__builtin_altivec_vminub");
487 pragma Import
(LL_Altivec
, vminuh
, "__builtin_altivec_vminuh");
488 pragma Import
(LL_Altivec
, vminuw
, "__builtin_altivec_vminuw");
489 pragma Import
(LL_Altivec
, vmladduhm
, "__builtin_altivec_vmladduhm");
490 pragma Import
(LL_Altivec
, vmrghb
, "__builtin_altivec_vmrghb");
491 pragma Import
(LL_Altivec
, vmrghh
, "__builtin_altivec_vmrghh");
492 pragma Import
(LL_Altivec
, vmrghw
, "__builtin_altivec_vmrghw");
493 pragma Import
(LL_Altivec
, vmrglb
, "__builtin_altivec_vmrglb");
494 pragma Import
(LL_Altivec
, vmrglh
, "__builtin_altivec_vmrglh");
495 pragma Import
(LL_Altivec
, vmrglw
, "__builtin_altivec_vmrglw");
496 pragma Import
(LL_Altivec
, vmsummbm
, "__builtin_altivec_vmsummbm");
497 pragma Import
(LL_Altivec
, vmsumshm
, "__builtin_altivec_vmsumshm");
498 pragma Import
(LL_Altivec
, vmsumshs
, "__builtin_altivec_vmsumshs");
499 pragma Import
(LL_Altivec
, vmsumubm
, "__builtin_altivec_vmsumubm");
500 pragma Import
(LL_Altivec
, vmsumuhm
, "__builtin_altivec_vmsumuhm");
501 pragma Import
(LL_Altivec
, vmsumuhs
, "__builtin_altivec_vmsumuhs");
502 pragma Import
(LL_Altivec
, vmulesb
, "__builtin_altivec_vmulesb");
503 pragma Import
(LL_Altivec
, vmulesh
, "__builtin_altivec_vmulesh");
504 pragma Import
(LL_Altivec
, vmuleub
, "__builtin_altivec_vmuleub");
505 pragma Import
(LL_Altivec
, vmuleuh
, "__builtin_altivec_vmuleuh");
506 pragma Import
(LL_Altivec
, vmulosb
, "__builtin_altivec_vmulosb");
507 pragma Import
(LL_Altivec
, vmulosh
, "__builtin_altivec_vmulosh");
508 pragma Import
(LL_Altivec
, vmuloub
, "__builtin_altivec_vmuloub");
509 pragma Import
(LL_Altivec
, vmulouh
, "__builtin_altivec_vmulouh");
510 pragma Import
(LL_Altivec
, vnmsubfp
, "__builtin_altivec_vnmsubfp");
511 pragma Import
(LL_Altivec
, vnor
, "__builtin_altivec_vnor");
512 pragma Import
(LL_Altivec
, vxor
, "__builtin_altivec_vxor");
513 pragma Import
(LL_Altivec
, vor
, "__builtin_altivec_vor");
514 pragma Import
(LL_Altivec
, vperm_4si
, "__builtin_altivec_vperm_4si");
515 pragma Import
(LL_Altivec
, vpkpx
, "__builtin_altivec_vpkpx");
516 pragma Import
(LL_Altivec
, vpkshss
, "__builtin_altivec_vpkshss");
517 pragma Import
(LL_Altivec
, vpkshus
, "__builtin_altivec_vpkshus");
518 pragma Import
(LL_Altivec
, vpkswss
, "__builtin_altivec_vpkswss");
519 pragma Import
(LL_Altivec
, vpkswus
, "__builtin_altivec_vpkswus");
520 pragma Import
(LL_Altivec
, vpkuhum
, "__builtin_altivec_vpkuhum");
521 pragma Import
(LL_Altivec
, vpkuhus
, "__builtin_altivec_vpkuhus");
522 pragma Import
(LL_Altivec
, vpkuwum
, "__builtin_altivec_vpkuwum");
523 pragma Import
(LL_Altivec
, vpkuwus
, "__builtin_altivec_vpkuwus");
524 pragma Import
(LL_Altivec
, vrefp
, "__builtin_altivec_vrefp");
525 pragma Import
(LL_Altivec
, vrfim
, "__builtin_altivec_vrfim");
526 pragma Import
(LL_Altivec
, vrfin
, "__builtin_altivec_vrfin");
527 pragma Import
(LL_Altivec
, vrfip
, "__builtin_altivec_vrfip");
528 pragma Import
(LL_Altivec
, vrfiz
, "__builtin_altivec_vrfiz");
529 pragma Import
(LL_Altivec
, vrlb
, "__builtin_altivec_vrlb");
530 pragma Import
(LL_Altivec
, vrlh
, "__builtin_altivec_vrlh");
531 pragma Import
(LL_Altivec
, vrlw
, "__builtin_altivec_vrlw");
532 pragma Import
(LL_Altivec
, vrsqrtefp
, "__builtin_altivec_vrsqrtefp");
533 pragma Import
(LL_Altivec
, vsel_4si
, "__builtin_altivec_vsel_4si");
534 pragma Import
(LL_Altivec
, vsldoi_4si
, "__builtin_altivec_vsldoi_4si");
535 pragma Import
(LL_Altivec
, vsldoi_8hi
, "__builtin_altivec_vsldoi_8hi");
536 pragma Import
(LL_Altivec
, vsldoi_16qi
, "__builtin_altivec_vsldoi_16qi");
537 pragma Import
(LL_Altivec
, vsldoi_4sf
, "__builtin_altivec_vsldoi_4sf");
538 pragma Import
(LL_Altivec
, vsl
, "__builtin_altivec_vsl");
539 pragma Import
(LL_Altivec
, vslb
, "__builtin_altivec_vslb");
540 pragma Import
(LL_Altivec
, vslh
, "__builtin_altivec_vslh");
541 pragma Import
(LL_Altivec
, vslo
, "__builtin_altivec_vslo");
542 pragma Import
(LL_Altivec
, vslw
, "__builtin_altivec_vslw");
543 pragma Import
(LL_Altivec
, vspltb
, "__builtin_altivec_vspltb");
544 pragma Import
(LL_Altivec
, vsplth
, "__builtin_altivec_vsplth");
545 pragma Import
(LL_Altivec
, vspltisb
, "__builtin_altivec_vspltisb");
546 pragma Import
(LL_Altivec
, vspltish
, "__builtin_altivec_vspltish");
547 pragma Import
(LL_Altivec
, vspltisw
, "__builtin_altivec_vspltisw");
548 pragma Import
(LL_Altivec
, vspltw
, "__builtin_altivec_vspltw");
549 pragma Import
(LL_Altivec
, vsr
, "__builtin_altivec_vsr");
550 pragma Import
(LL_Altivec
, vsrab
, "__builtin_altivec_vsrab");
551 pragma Import
(LL_Altivec
, vsrah
, "__builtin_altivec_vsrah");
552 pragma Import
(LL_Altivec
, vsraw
, "__builtin_altivec_vsraw");
553 pragma Import
(LL_Altivec
, vsrb
, "__builtin_altivec_vsrb");
554 pragma Import
(LL_Altivec
, vsrh
, "__builtin_altivec_vsrh");
555 pragma Import
(LL_Altivec
, vsro
, "__builtin_altivec_vsro");
556 pragma Import
(LL_Altivec
, vsrw
, "__builtin_altivec_vsrw");
557 pragma Import
(LL_Altivec
, vsubcuw
, "__builtin_altivec_vsubcuw");
558 pragma Import
(LL_Altivec
, vsubfp
, "__builtin_altivec_vsubfp");
559 pragma Import
(LL_Altivec
, vsubsbs
, "__builtin_altivec_vsubsbs");
560 pragma Import
(LL_Altivec
, vsubshs
, "__builtin_altivec_vsubshs");
561 pragma Import
(LL_Altivec
, vsubsws
, "__builtin_altivec_vsubsws");
562 pragma Import
(LL_Altivec
, vsububm
, "__builtin_altivec_vsububm");
563 pragma Import
(LL_Altivec
, vsububs
, "__builtin_altivec_vsububs");
564 pragma Import
(LL_Altivec
, vsubuhm
, "__builtin_altivec_vsubuhm");
565 pragma Import
(LL_Altivec
, vsubuhs
, "__builtin_altivec_vsubuhs");
566 pragma Import
(LL_Altivec
, vsubuwm
, "__builtin_altivec_vsubuwm");
567 pragma Import
(LL_Altivec
, vsubuws
, "__builtin_altivec_vsubuws");
568 pragma Import
(LL_Altivec
, vsum2sws
, "__builtin_altivec_vsum2sws");
569 pragma Import
(LL_Altivec
, vsum4sbs
, "__builtin_altivec_vsum4sbs");
570 pragma Import
(LL_Altivec
, vsum4shs
, "__builtin_altivec_vsum4shs");
571 pragma Import
(LL_Altivec
, vsum4ubs
, "__builtin_altivec_vsum4ubs");
572 pragma Import
(LL_Altivec
, vsumsws
, "__builtin_altivec_vsumsws");
573 pragma Import
(LL_Altivec
, vupkhpx
, "__builtin_altivec_vupkhpx");
574 pragma Import
(LL_Altivec
, vupkhsb
, "__builtin_altivec_vupkhsb");
575 pragma Import
(LL_Altivec
, vupkhsh
, "__builtin_altivec_vupkhsh");
576 pragma Import
(LL_Altivec
, vupklpx
, "__builtin_altivec_vupklpx");
577 pragma Import
(LL_Altivec
, vupklsb
, "__builtin_altivec_vupklsb");
578 pragma Import
(LL_Altivec
, vupklsh
, "__builtin_altivec_vupklsh");
579 pragma Import
(LL_Altivec
, vcmpbfp_p
, "__builtin_altivec_vcmpbfp_p");
580 pragma Import
(LL_Altivec
, vcmpeqfp_p
, "__builtin_altivec_vcmpeqfp_p");
581 pragma Import
(LL_Altivec
, vcmpgefp_p
, "__builtin_altivec_vcmpgefp_p");
582 pragma Import
(LL_Altivec
, vcmpgtfp_p
, "__builtin_altivec_vcmpgtfp_p");
583 pragma Import
(LL_Altivec
, vcmpequw_p
, "__builtin_altivec_vcmpequw_p");
584 pragma Import
(LL_Altivec
, vcmpgtsw_p
, "__builtin_altivec_vcmpgtsw_p");
585 pragma Import
(LL_Altivec
, vcmpgtuw_p
, "__builtin_altivec_vcmpgtuw_p");
586 pragma Import
(LL_Altivec
, vcmpgtuh_p
, "__builtin_altivec_vcmpgtuh_p");
587 pragma Import
(LL_Altivec
, vcmpgtsh_p
, "__builtin_altivec_vcmpgtsh_p");
588 pragma Import
(LL_Altivec
, vcmpequh_p
, "__builtin_altivec_vcmpequh_p");
589 pragma Import
(LL_Altivec
, vcmpequb_p
, "__builtin_altivec_vcmpequb_p");
590 pragma Import
(LL_Altivec
, vcmpgtsb_p
, "__builtin_altivec_vcmpgtsb_p");
591 pragma Import
(LL_Altivec
, vcmpgtub_p
, "__builtin_altivec_vcmpgtub_p");
593 end GNAT
.Altivec
.Low_Level_Vectors
;