1//===-- BuiltinsSystemZ.def - SystemZ Builtin function database -*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines the SystemZ-specific builtin function database.  Users of
11// this file must define the BUILTIN macro to make use of this information.
12//
13//===----------------------------------------------------------------------===//
14
15// The format of this database matches clang/Basic/Builtins.def.
16
17// Transactional-memory intrinsics
18BUILTIN(__builtin_tbegin, "iv*", "j")
19BUILTIN(__builtin_tbegin_nofloat, "iv*", "j")
20BUILTIN(__builtin_tbeginc, "v", "nj")
21BUILTIN(__builtin_tabort, "vi", "r")
22BUILTIN(__builtin_tend, "i", "n")
23BUILTIN(__builtin_tx_nesting_depth, "i", "nc")
24BUILTIN(__builtin_tx_assist, "vi", "n")
25BUILTIN(__builtin_non_tx_store, "vULi*ULi", "")
26
27// Vector intrinsics.
28// These all map directly to z instructions, except that some variants ending
29// in "s" have a final "int *" that receives the post-instruction CC value.
30
31// Vector support instructions (chapter 21 of the PoP)
32BUILTIN(__builtin_s390_lcbb, "UivC*Ii", "nc")
33BUILTIN(__builtin_s390_vlbb, "V16ScvC*Ii", "")
34BUILTIN(__builtin_s390_vll, "V16ScUivC*", "")
35BUILTIN(__builtin_s390_vstl, "vV16ScUiv*", "")
36BUILTIN(__builtin_s390_vperm, "V16UcV16UcV16UcV16Uc", "nc")
37BUILTIN(__builtin_s390_vpdi, "V2ULLiV2ULLiV2ULLiIi", "nc")
38BUILTIN(__builtin_s390_vpksh, "V16ScV8SsV8Ss", "nc")
39BUILTIN(__builtin_s390_vpkshs, "V16ScV8SsV8Ssi*", "nc")
40BUILTIN(__builtin_s390_vpksf, "V8SsV4SiV4Si", "nc")
41BUILTIN(__builtin_s390_vpksfs, "V8SsV4SiV4Sii*", "nc")
42BUILTIN(__builtin_s390_vpksg, "V4SiV2SLLiV2SLLi", "nc")
43BUILTIN(__builtin_s390_vpksgs, "V4SiV2SLLiV2SLLii*", "nc")
44BUILTIN(__builtin_s390_vpklsh, "V16UcV8UsV8Us", "nc")
45BUILTIN(__builtin_s390_vpklshs, "V16UcV8UsV8Usi*", "nc")
46BUILTIN(__builtin_s390_vpklsf, "V8UsV4UiV4Ui", "nc")
47BUILTIN(__builtin_s390_vpklsfs, "V8UsV4UiV4Uii*", "nc")
48BUILTIN(__builtin_s390_vpklsg, "V4UiV2ULLiV2ULLi", "nc")
49BUILTIN(__builtin_s390_vpklsgs, "V4UiV2ULLiV2ULLii*", "nc")
50BUILTIN(__builtin_s390_vuphb, "V8SsV16Sc", "nc")
51BUILTIN(__builtin_s390_vuphh, "V4SiV8Ss", "nc")
52BUILTIN(__builtin_s390_vuphf, "V2SLLiV4Si", "nc")
53BUILTIN(__builtin_s390_vuplb, "V8SsV16Sc", "nc")
54BUILTIN(__builtin_s390_vuplhw, "V4SiV8Ss", "nc")
55BUILTIN(__builtin_s390_vuplf, "V2SLLiV4Si", "nc")
56BUILTIN(__builtin_s390_vuplhb, "V8UsV16Uc", "nc")
57BUILTIN(__builtin_s390_vuplhh, "V4UiV8Us", "nc")
58BUILTIN(__builtin_s390_vuplhf, "V2ULLiV4Ui", "nc")
59BUILTIN(__builtin_s390_vupllb, "V8UsV16Uc", "nc")
60BUILTIN(__builtin_s390_vupllh, "V4UiV8Us", "nc")
61BUILTIN(__builtin_s390_vupllf, "V2ULLiV4Ui", "nc")
62
63// Vector integer instructions (chapter 22 of the PoP)
64BUILTIN(__builtin_s390_vaq, "V16UcV16UcV16Uc", "nc")
65BUILTIN(__builtin_s390_vacq, "V16UcV16UcV16UcV16Uc", "nc")
66BUILTIN(__builtin_s390_vaccb, "V16UcV16UcV16Uc", "nc")
67BUILTIN(__builtin_s390_vacch, "V8UsV8UsV8Us", "nc")
68BUILTIN(__builtin_s390_vaccf, "V4UiV4UiV4Ui", "nc")
69BUILTIN(__builtin_s390_vaccg, "V2ULLiV2ULLiV2ULLi", "nc")
70BUILTIN(__builtin_s390_vaccq, "V16UcV16UcV16Uc", "nc")
71BUILTIN(__builtin_s390_vacccq, "V16UcV16UcV16UcV16Uc", "nc")
72BUILTIN(__builtin_s390_vavgb, "V16ScV16ScV16Sc", "nc")
73BUILTIN(__builtin_s390_vavgh, "V8SsV8SsV8Ss", "nc")
74BUILTIN(__builtin_s390_vavgf, "V4SiV4SiV4Si", "nc")
75BUILTIN(__builtin_s390_vavgg, "V2SLLiV2SLLiV2SLLi", "nc")
76BUILTIN(__builtin_s390_vavglb, "V16UcV16UcV16Uc", "nc")
77BUILTIN(__builtin_s390_vavglh, "V8UsV8UsV8Us", "nc")
78BUILTIN(__builtin_s390_vavglf, "V4UiV4UiV4Ui", "nc")
79BUILTIN(__builtin_s390_vavglg, "V2ULLiV2ULLiV2ULLi", "nc")
80BUILTIN(__builtin_s390_vceqbs, "V16ScV16ScV16Sci*", "nc")
81BUILTIN(__builtin_s390_vceqhs, "V8SsV8SsV8Ssi*", "nc")
82BUILTIN(__builtin_s390_vceqfs, "V4SiV4SiV4Sii*", "nc")
83BUILTIN(__builtin_s390_vceqgs, "V2SLLiV2SLLiV2SLLii*", "nc")
84BUILTIN(__builtin_s390_vchbs, "V16ScV16ScV16Sci*", "nc")
85BUILTIN(__builtin_s390_vchhs, "V8SsV8SsV8Ssi*", "nc")
86BUILTIN(__builtin_s390_vchfs, "V4SiV4SiV4Sii*", "nc")
87BUILTIN(__builtin_s390_vchgs, "V2SLLiV2SLLiV2SLLii*", "nc")
88BUILTIN(__builtin_s390_vchlbs, "V16ScV16UcV16Uci*", "nc")
89BUILTIN(__builtin_s390_vchlhs, "V8SsV8UsV8Usi*", "nc")
90BUILTIN(__builtin_s390_vchlfs, "V4SiV4UiV4Uii*", "nc")
91BUILTIN(__builtin_s390_vchlgs, "V2SLLiV2ULLiV2ULLii*", "nc")
92BUILTIN(__builtin_s390_vcksm, "V4UiV4UiV4Ui", "nc")
93BUILTIN(__builtin_s390_vclzb, "V16UcV16Uc", "nc")
94BUILTIN(__builtin_s390_vclzh, "V8UsV8Us", "nc")
95BUILTIN(__builtin_s390_vclzf, "V4UiV4Ui", "nc")
96BUILTIN(__builtin_s390_vclzg, "V2ULLiV2ULLi", "nc")
97BUILTIN(__builtin_s390_vctzb, "V16UcV16Uc", "nc")
98BUILTIN(__builtin_s390_vctzh, "V8UsV8Us", "nc")
99BUILTIN(__builtin_s390_vctzf, "V4UiV4Ui", "nc")
100BUILTIN(__builtin_s390_vctzg, "V2ULLiV2ULLi", "nc")
101BUILTIN(__builtin_s390_verimb, "V16UcV16UcV16UcV16UcIi", "nc")
102BUILTIN(__builtin_s390_verimh, "V8UsV8UsV8UsV8UsIi", "nc")
103BUILTIN(__builtin_s390_verimf, "V4UiV4UiV4UiV4UiIi", "nc")
104BUILTIN(__builtin_s390_verimg, "V2ULLiV2ULLiV2ULLiV2ULLiIi", "nc")
105BUILTIN(__builtin_s390_verllb, "V16UcV16UcUi", "nc")
106BUILTIN(__builtin_s390_verllh, "V8UsV8UsUi", "nc")
107BUILTIN(__builtin_s390_verllf, "V4UiV4UiUi", "nc")
108BUILTIN(__builtin_s390_verllg, "V2ULLiV2ULLiUi", "nc")
109BUILTIN(__builtin_s390_verllvb, "V16UcV16UcV16Uc", "nc")
110BUILTIN(__builtin_s390_verllvh, "V8UsV8UsV8Us", "nc")
111BUILTIN(__builtin_s390_verllvf, "V4UiV4UiV4Ui", "nc")
112BUILTIN(__builtin_s390_verllvg, "V2ULLiV2ULLiV2ULLi", "nc")
113BUILTIN(__builtin_s390_vgfmb, "V8UsV16UcV16Uc", "nc")
114BUILTIN(__builtin_s390_vgfmh, "V4UiV8UsV8Us", "nc")
115BUILTIN(__builtin_s390_vgfmf, "V2ULLiV4UiV4Ui", "nc")
116BUILTIN(__builtin_s390_vgfmg, "V16UcV2ULLiV2ULLi", "nc")
117BUILTIN(__builtin_s390_vgfmab, "V8UsV16UcV16UcV8Us", "nc")
118BUILTIN(__builtin_s390_vgfmah, "V4UiV8UsV8UsV4Ui", "nc")
119BUILTIN(__builtin_s390_vgfmaf, "V2ULLiV4UiV4UiV2ULLi", "nc")
120BUILTIN(__builtin_s390_vgfmag, "V16UcV2ULLiV2ULLiV16Uc", "nc")
121BUILTIN(__builtin_s390_vmahb, "V16ScV16ScV16ScV16Sc", "nc")
122BUILTIN(__builtin_s390_vmahh, "V8SsV8SsV8SsV8Ss", "nc")
123BUILTIN(__builtin_s390_vmahf, "V4SiV4SiV4SiV4Si", "nc")
124BUILTIN(__builtin_s390_vmalhb, "V16UcV16UcV16UcV16Uc", "nc")
125BUILTIN(__builtin_s390_vmalhh, "V8UsV8UsV8UsV8Us", "nc")
126BUILTIN(__builtin_s390_vmalhf, "V4UiV4UiV4UiV4Ui", "nc")
127BUILTIN(__builtin_s390_vmaeb, "V8SsV16ScV16ScV8Ss", "nc")
128BUILTIN(__builtin_s390_vmaeh, "V4SiV8SsV8SsV4Si", "nc")
129BUILTIN(__builtin_s390_vmaef, "V2SLLiV4SiV4SiV2SLLi", "nc")
130BUILTIN(__builtin_s390_vmaleb, "V8UsV16UcV16UcV8Us", "nc")
131BUILTIN(__builtin_s390_vmaleh, "V4UiV8UsV8UsV4Ui", "nc")
132BUILTIN(__builtin_s390_vmalef, "V2ULLiV4UiV4UiV2ULLi", "nc")
133BUILTIN(__builtin_s390_vmaob, "V8SsV16ScV16ScV8Ss", "nc")
134BUILTIN(__builtin_s390_vmaoh, "V4SiV8SsV8SsV4Si", "nc")
135BUILTIN(__builtin_s390_vmaof, "V2SLLiV4SiV4SiV2SLLi", "nc")
136BUILTIN(__builtin_s390_vmalob, "V8UsV16UcV16UcV8Us", "nc")
137BUILTIN(__builtin_s390_vmaloh, "V4UiV8UsV8UsV4Ui", "nc")
138BUILTIN(__builtin_s390_vmalof, "V2ULLiV4UiV4UiV2ULLi", "nc")
139BUILTIN(__builtin_s390_vmhb, "V16ScV16ScV16Sc", "nc")
140BUILTIN(__builtin_s390_vmhh, "V8SsV8SsV8Ss", "nc")
141BUILTIN(__builtin_s390_vmhf, "V4SiV4SiV4Si", "nc")
142BUILTIN(__builtin_s390_vmlhb, "V16UcV16UcV16Uc", "nc")
143BUILTIN(__builtin_s390_vmlhh, "V8UsV8UsV8Us", "nc")
144BUILTIN(__builtin_s390_vmlhf, "V4UiV4UiV4Ui", "nc")
145BUILTIN(__builtin_s390_vmeb, "V8SsV16ScV16Sc", "nc")
146BUILTIN(__builtin_s390_vmeh, "V4SiV8SsV8Ss", "nc")
147BUILTIN(__builtin_s390_vmef, "V2SLLiV4SiV4Si", "nc")
148BUILTIN(__builtin_s390_vmleb, "V8UsV16UcV16Uc", "nc")
149BUILTIN(__builtin_s390_vmleh, "V4UiV8UsV8Us", "nc")
150BUILTIN(__builtin_s390_vmlef, "V2ULLiV4UiV4Ui", "nc")
151BUILTIN(__builtin_s390_vmob, "V8SsV16ScV16Sc", "nc")
152BUILTIN(__builtin_s390_vmoh, "V4SiV8SsV8Ss", "nc")
153BUILTIN(__builtin_s390_vmof, "V2SLLiV4SiV4Si", "nc")
154BUILTIN(__builtin_s390_vmlob, "V8UsV16UcV16Uc", "nc")
155BUILTIN(__builtin_s390_vmloh, "V4UiV8UsV8Us", "nc")
156BUILTIN(__builtin_s390_vmlof, "V2ULLiV4UiV4Ui", "nc")
157BUILTIN(__builtin_s390_vpopctb, "V16UcV16Uc", "nc")
158BUILTIN(__builtin_s390_vpopcth, "V8UsV8Us", "nc")
159BUILTIN(__builtin_s390_vpopctf, "V4UiV4Ui", "nc")
160BUILTIN(__builtin_s390_vpopctg, "V2ULLiV2ULLi", "nc")
161BUILTIN(__builtin_s390_vsq, "V16UcV16UcV16Uc", "nc")
162BUILTIN(__builtin_s390_vsbcbiq, "V16UcV16UcV16UcV16Uc", "nc")
163BUILTIN(__builtin_s390_vsbiq, "V16UcV16UcV16UcV16Uc", "nc")
164BUILTIN(__builtin_s390_vscbib, "V16UcV16UcV16Uc", "nc")
165BUILTIN(__builtin_s390_vscbih, "V8UsV8UsV8Us", "nc")
166BUILTIN(__builtin_s390_vscbif, "V4UiV4UiV4Ui", "nc")
167BUILTIN(__builtin_s390_vscbig, "V2ULLiV2ULLiV2ULLi", "nc")
168BUILTIN(__builtin_s390_vscbiq, "V16UcV16UcV16Uc", "nc")
169BUILTIN(__builtin_s390_vsl, "V16UcV16UcV16Uc", "nc")
170BUILTIN(__builtin_s390_vslb, "V16UcV16UcV16Uc", "nc")
171BUILTIN(__builtin_s390_vsldb, "V16UcV16UcV16UcIi", "nc")
172BUILTIN(__builtin_s390_vsra, "V16UcV16UcV16Uc", "nc")
173BUILTIN(__builtin_s390_vsrab, "V16UcV16UcV16Uc", "nc")
174BUILTIN(__builtin_s390_vsrl, "V16UcV16UcV16Uc", "nc")
175BUILTIN(__builtin_s390_vsrlb, "V16UcV16UcV16Uc", "nc")
176BUILTIN(__builtin_s390_vsumb, "V4UiV16UcV16Uc", "nc")
177BUILTIN(__builtin_s390_vsumh, "V4UiV8UsV8Us", "nc")
178BUILTIN(__builtin_s390_vsumgh, "V2ULLiV8UsV8Us", "nc")
179BUILTIN(__builtin_s390_vsumgf, "V2ULLiV4UiV4Ui", "nc")
180BUILTIN(__builtin_s390_vsumqf, "V16UcV4UiV4Ui", "nc")
181BUILTIN(__builtin_s390_vsumqg, "V16UcV2ULLiV2ULLi", "nc")
182BUILTIN(__builtin_s390_vtm, "iV16UcV16Uc", "nc")
183
184// Vector string instructions (chapter 23 of the PoP)
185BUILTIN(__builtin_s390_vfaeb, "V16UcV16UcV16UcIi", "nc")
186BUILTIN(__builtin_s390_vfaebs, "V16UcV16UcV16UcIii*", "nc")
187BUILTIN(__builtin_s390_vfaeh, "V8UsV8UsV8UsIi", "nc")
188BUILTIN(__builtin_s390_vfaehs, "V8UsV8UsV8UsIii*", "nc")
189BUILTIN(__builtin_s390_vfaef, "V4UiV4UiV4UiIi", "nc")
190BUILTIN(__builtin_s390_vfaefs, "V4UiV4UiV4UiIii*", "nc")
191BUILTIN(__builtin_s390_vfaezb, "V16UcV16UcV16UcIi", "nc")
192BUILTIN(__builtin_s390_vfaezbs, "V16UcV16UcV16UcIii*", "nc")
193BUILTIN(__builtin_s390_vfaezh, "V8UsV8UsV8UsIi", "nc")
194BUILTIN(__builtin_s390_vfaezhs, "V8UsV8UsV8UsIii*", "nc")
195BUILTIN(__builtin_s390_vfaezf, "V4UiV4UiV4UiIi", "nc")
196BUILTIN(__builtin_s390_vfaezfs, "V4UiV4UiV4UiIii*", "nc")
197BUILTIN(__builtin_s390_vfeeb, "V16UcV16UcV16Uc", "nc")
198BUILTIN(__builtin_s390_vfeebs, "V16UcV16UcV16Uci*", "nc")
199BUILTIN(__builtin_s390_vfeeh, "V8UsV8UsV8Us", "nc")
200BUILTIN(__builtin_s390_vfeehs, "V8UsV8UsV8Usi*", "nc")
201BUILTIN(__builtin_s390_vfeef, "V4UiV4UiV4Ui", "nc")
202BUILTIN(__builtin_s390_vfeefs, "V4UiV4UiV4Uii*", "nc")
203BUILTIN(__builtin_s390_vfeezb, "V16UcV16UcV16Uc", "nc")
204BUILTIN(__builtin_s390_vfeezbs, "V16UcV16UcV16Uci*", "nc")
205BUILTIN(__builtin_s390_vfeezh, "V8UsV8UsV8Us", "nc")
206BUILTIN(__builtin_s390_vfeezhs, "V8UsV8UsV8Usi*", "nc")
207BUILTIN(__builtin_s390_vfeezf, "V4UiV4UiV4Ui", "nc")
208BUILTIN(__builtin_s390_vfeezfs, "V4UiV4UiV4Uii*", "nc")
209BUILTIN(__builtin_s390_vfeneb, "V16UcV16UcV16Uc", "nc")
210BUILTIN(__builtin_s390_vfenebs, "V16UcV16UcV16Uci*", "nc")
211BUILTIN(__builtin_s390_vfeneh, "V8UsV8UsV8Us", "nc")
212BUILTIN(__builtin_s390_vfenehs, "V8UsV8UsV8Usi*", "nc")
213BUILTIN(__builtin_s390_vfenef, "V4UiV4UiV4Ui", "nc")
214BUILTIN(__builtin_s390_vfenefs, "V4UiV4UiV4Uii*", "nc")
215BUILTIN(__builtin_s390_vfenezb, "V16UcV16UcV16Uc", "nc")
216BUILTIN(__builtin_s390_vfenezbs, "V16UcV16UcV16Uci*", "nc")
217BUILTIN(__builtin_s390_vfenezh, "V8UsV8UsV8Us", "nc")
218BUILTIN(__builtin_s390_vfenezhs, "V8UsV8UsV8Usi*", "nc")
219BUILTIN(__builtin_s390_vfenezf, "V4UiV4UiV4Ui", "nc")
220BUILTIN(__builtin_s390_vfenezfs, "V4UiV4UiV4Uii*", "nc")
221BUILTIN(__builtin_s390_vistrb, "V16UcV16Uc", "nc")
222BUILTIN(__builtin_s390_vistrbs, "V16UcV16Uci*", "nc")
223BUILTIN(__builtin_s390_vistrh, "V8UsV8Us", "nc")
224BUILTIN(__builtin_s390_vistrhs, "V8UsV8Usi*", "nc")
225BUILTIN(__builtin_s390_vistrf, "V4UiV4Ui", "nc")
226BUILTIN(__builtin_s390_vistrfs, "V4UiV4Uii*", "nc")
227BUILTIN(__builtin_s390_vstrcb, "V16UcV16UcV16UcV16UcIi", "nc")
228BUILTIN(__builtin_s390_vstrcbs, "V16UcV16UcV16UcV16UcIii*", "nc")
229BUILTIN(__builtin_s390_vstrch, "V8UsV8UsV8UsV8UsIi", "nc")
230BUILTIN(__builtin_s390_vstrchs, "V8UsV8UsV8UsV8UsIii*", "nc")
231BUILTIN(__builtin_s390_vstrcf, "V4UiV4UiV4UiV4UiIi", "nc")
232BUILTIN(__builtin_s390_vstrcfs, "V4UiV4UiV4UiV4UiIii*", "nc")
233BUILTIN(__builtin_s390_vstrczb, "V16UcV16UcV16UcV16UcIi", "nc")
234BUILTIN(__builtin_s390_vstrczbs, "V16UcV16UcV16UcV16UcIii*", "nc")
235BUILTIN(__builtin_s390_vstrczh, "V8UsV8UsV8UsV8UsIi", "nc")
236BUILTIN(__builtin_s390_vstrczhs, "V8UsV8UsV8UsV8UsIii*", "nc")
237BUILTIN(__builtin_s390_vstrczf, "V4UiV4UiV4UiV4UiIi", "nc")
238BUILTIN(__builtin_s390_vstrczfs, "V4UiV4UiV4UiV4UiIii*", "nc")
239
240// Vector floating-point instructions (chapter 24 of the PoP)
241BUILTIN(__builtin_s390_vfcedbs, "V2SLLiV2dV2di*", "nc")
242BUILTIN(__builtin_s390_vfchdbs, "V2SLLiV2dV2di*", "nc")
243BUILTIN(__builtin_s390_vfchedbs, "V2SLLiV2dV2di*", "nc")
244BUILTIN(__builtin_s390_vfidb, "V2dV2dIiIi", "nc")
245BUILTIN(__builtin_s390_vflndb, "V2dV2d", "nc")
246BUILTIN(__builtin_s390_vflpdb, "V2dV2d", "nc")
247BUILTIN(__builtin_s390_vfmadb, "V2dV2dV2dV2d", "nc")
248BUILTIN(__builtin_s390_vfmsdb, "V2dV2dV2dV2d", "nc")
249BUILTIN(__builtin_s390_vfsqdb, "V2dV2d", "nc")
250BUILTIN(__builtin_s390_vftcidb, "V2SLLiV2dIii*", "nc")
251
252#undef BUILTIN
253