1 /* This file contains the definitions and documentation for the
2 HSAIL builtins used in the GNU compiler.
3 Copyright (C) 2016-2017 Free Software Foundation, Inc.
5 Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
6 for General Processor Tech.
8 This file is part of GCC.
10 GCC is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free
12 Software Foundation; either version 3, or (at your option) any later
15 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
16 WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 You should have received a copy of the GNU General Public License
21 along with GCC; see the file COPYING3. If not see
22 <http://www.gnu.org/licenses/>. */
24 /* Following builtins are used by the BRIG (the binary representation of
25 HSAIL) frontend. Software implementations are available in libhsail-rt.
26 Use leading double underscore in the name to avoid name space clashes
27 with kernel program symbols in case the builtin is implemented as
30 /* Work-item ID related builtins are not constant in the work-group function
31 mode (each WI has a different return value). */
33 #ifndef DEF_HSAIL_BUILTIN
34 #define DEF_HSAIL_BUILTIN(ENUM, HSAIL_OPCODE, HSAIL_TYPE, \
38 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKITEMABSID, BRIG_OPCODE_WORKITEMABSID,
39 BRIG_TYPE_U32, "__hsail_workitemabsid", BT_FN_UINT_UINT_PTR,
40 ATTR_NOTHROW_LEAF_LIST)
42 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_GRIDSIZE, BRIG_OPCODE_GRIDSIZE,
43 BRIG_TYPE_U32, "__hsail_gridsize", BT_FN_UINT_UINT_PTR,
44 ATTR_PURE_NOTHROW_LEAF_LIST)
46 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKITEMFLATABSID_U32,
47 BRIG_OPCODE_WORKITEMFLATABSID, BRIG_TYPE_U32,
48 "__hsail_workitemflatabsid_u32", BT_FN_UINT_PTR,
49 ATTR_NOTHROW_LEAF_LIST)
51 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKITEMFLATABSID_U64,
52 BRIG_OPCODE_WORKITEMFLATABSID, BRIG_TYPE_U64,
53 "__hsail_workitemflatabsid_u64", BT_FN_ULONG_PTR,
54 ATTR_NOTHROW_LEAF_LIST)
56 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKITEMFLATID, BRIG_OPCODE_WORKITEMFLATID,
57 BRIG_TYPE_U32, "__hsail_workitemflatid", BT_FN_UINT_PTR,
58 ATTR_NOTHROW_LEAF_LIST)
60 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKITEMID, BRIG_OPCODE_WORKITEMID,
61 BRIG_TYPE_U32, "__hsail_workitemid", BT_FN_UINT_UINT_PTR,
62 ATTR_NOTHROW_LEAF_LIST)
64 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKGROUPID, BRIG_OPCODE_WORKGROUPID,
65 BRIG_TYPE_U32, "__hsail_workgroupid", BT_FN_UINT_UINT_PTR,
66 ATTR_PURE_NOTHROW_LEAF_LIST)
68 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CURRENTWORKITEMFLATID,
69 BRIG_OPCODE_CURRENTWORKITEMFLATID,
70 BRIG_TYPE_U32, "__hsail_currentworkitemflatid",
71 BT_FN_UINT_PTR, ATTR_NOTHROW_LEAF_LIST)
73 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKITEMABSID_U64, BRIG_OPCODE_WORKITEMABSID,
74 BRIG_TYPE_U64, "__hsail_workitemabsid_u64",
75 BT_FN_ULONG_UINT_PTR, ATTR_NOTHROW_LEAF_LIST)
77 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_PACKETID, BRIG_OPCODE_PACKETID,
78 BRIG_TYPE_U64, "__hsail_packetid", BT_FN_ULONG_PTR,
79 ATTR_PURE_NOTHROW_LEAF_LIST)
81 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_PACKETCOMPLETIONSIG_SIG64,
82 BRIG_OPCODE_PACKETCOMPLETIONSIG, BRIG_TYPE_SIG64,
83 "__hsail_packetcompletionsig_sig64", BT_FN_ULONG_PTR,
84 ATTR_PURE_NOTHROW_LEAF_LIST)
86 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_PACKETCOMPLETIONSIG_SIG32,
87 BRIG_OPCODE_PACKETCOMPLETIONSIG, BRIG_TYPE_SIG32,
88 "__hsail_packetcompletionsig_sig32", BT_FN_UINT_PTR,
89 ATTR_PURE_NOTHROW_LEAF_LIST)
91 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CURRENTWORKGROUPSIZE,
92 BRIG_OPCODE_CURRENTWORKGROUPSIZE, BRIG_TYPE_U32,
93 "__hsail_currentworkgroupsize", BT_FN_UINT_UINT_PTR,
94 ATTR_PURE_NOTHROW_LEAF_LIST)
96 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKGROUPSIZE, BRIG_OPCODE_WORKGROUPSIZE,
97 BRIG_TYPE_U32, "__hsail_workgroupsize", BT_FN_UINT_UINT_PTR,
98 ATTR_PURE_NOTHROW_LEAF_LIST)
100 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_DIM, BRIG_OPCODE_DIM,
101 BRIG_TYPE_U32, "__hsail_dim", BT_FN_UINT_PTR,
102 ATTR_PURE_NOTHROW_LEAF_LIST)
104 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_GRIDGROUPS, BRIG_OPCODE_GRIDGROUPS,
105 BRIG_TYPE_U32, "__hsail_gridgroups", BT_FN_UINT_UINT_PTR,
106 ATTR_PURE_NOTHROW_LEAF_LIST)
108 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITEXTRACT_S32, BRIG_OPCODE_BITEXTRACT,
109 BRIG_TYPE_S32, "__hsail_bitextract_s32",
110 BT_FN_INT_INT_UINT_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
112 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITEXTRACT_U32, BRIG_OPCODE_BITEXTRACT,
113 BRIG_TYPE_U32, "__hsail_bitextract_u32",
114 BT_FN_UINT_UINT_UINT_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
116 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITEXTRACT_S64, BRIG_OPCODE_BITEXTRACT,
117 BRIG_TYPE_S64, "__hsail_bitextract_s64",
118 BT_FN_LONG_LONG_UINT_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
120 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITEXTRACT_U64, BRIG_OPCODE_BITEXTRACT,
121 BRIG_TYPE_U64, "__hsail_bitextract_u64",
122 BT_FN_ULONG_ULONG_UINT_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
124 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITINSERT_U32, BRIG_OPCODE_BITINSERT,
125 BRIG_TYPE_U32, "__hsail_bitinsert_u32",
126 BT_FN_UINT_UINT_UINT_UINT_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
128 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITINSERT_U64, BRIG_OPCODE_BITINSERT,
129 BRIG_TYPE_U64, "__hsail_bitinsert_u64",
130 BT_FN_ULONG_ULONG_ULONG_UINT_UINT,
131 ATTR_PURE_NOTHROW_LEAF_LIST)
133 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITMASK_B32, BRIG_OPCODE_BITMASK,
134 BRIG_TYPE_B32, "__hsail_bitmask_u32", BT_FN_UINT_UINT_UINT,
135 ATTR_PURE_NOTHROW_LEAF_LIST)
137 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITMASK_B64, BRIG_OPCODE_BITMASK,
138 BRIG_TYPE_B64, "__hsail_bitmask_u64", BT_FN_ULONG_UINT_UINT,
139 ATTR_PURE_NOTHROW_LEAF_LIST)
141 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITREV_B32, BRIG_OPCODE_BITREV,
142 BRIG_TYPE_B32, "__hsail_bitrev_u32", BT_FN_UINT_UINT,
143 ATTR_PURE_NOTHROW_LEAF_LIST)
145 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITREV_B64, BRIG_OPCODE_BITREV,
146 BRIG_TYPE_B64, "__hsail_bitrev_u64", BT_FN_ULONG_ULONG,
147 ATTR_PURE_NOTHROW_LEAF_LIST)
149 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITSELECT_B32, BRIG_OPCODE_BITSELECT,
150 BRIG_TYPE_B32, "__hsail_bitselect_u32",
151 BT_FN_UINT_UINT_UINT_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
153 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITSELECT_U64, BRIG_OPCODE_BITSELECT,
154 BRIG_TYPE_B64, "__hsail_bitselect_u64",
155 BT_FN_ULONG_ULONG_ULONG_ULONG, ATTR_PURE_NOTHROW_LEAF_LIST)
157 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FIRSTBIT_U32, BRIG_OPCODE_FIRSTBIT,
158 BRIG_TYPE_U32, "__hsail_firstbit_u32", BT_FN_UINT_UINT,
159 ATTR_PURE_NOTHROW_LEAF_LIST)
161 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FIRSTBIT_S32, BRIG_OPCODE_FIRSTBIT,
162 BRIG_TYPE_S32, "__hsail_firstbit_s32", BT_FN_UINT_INT,
163 ATTR_PURE_NOTHROW_LEAF_LIST)
165 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FIRSTBIT_U64, BRIG_OPCODE_FIRSTBIT,
166 BRIG_TYPE_U64, "__hsail_firstbit_u64", BT_FN_UINT_ULONG,
167 ATTR_PURE_NOTHROW_LEAF_LIST)
169 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FIRSTBIT_S64, BRIG_OPCODE_FIRSTBIT,
170 BRIG_TYPE_S64, "__hsail_firstbit_s64", BT_FN_UINT_LONG,
171 ATTR_PURE_NOTHROW_LEAF_LIST)
173 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LASTBIT_U32, BRIG_OPCODE_LASTBIT,
174 BRIG_TYPE_U32, "__hsail_lastbit_u32", BT_FN_UINT_UINT,
175 ATTR_PURE_NOTHROW_LEAF_LIST)
177 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LASTBIT_U64, BRIG_OPCODE_LASTBIT,
178 BRIG_TYPE_U64, "__hsail_lastbit_u64", BT_FN_UINT_ULONG,
179 ATTR_PURE_NOTHROW_LEAF_LIST)
181 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BORROW_U32, BRIG_OPCODE_BORROW,
182 BRIG_TYPE_U32, "__hsail_borrow_u32", BT_FN_UINT_UINT_UINT,
183 ATTR_PURE_NOTHROW_LEAF_LIST)
185 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BORROW_U64, BRIG_OPCODE_BORROW,
186 BRIG_TYPE_U64, "__hsail_borrow_u64", BT_FN_ULONG_ULONG_ULONG,
187 ATTR_PURE_NOTHROW_LEAF_LIST)
189 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CARRY_U32, BRIG_OPCODE_CARRY,
190 BRIG_TYPE_U32, "__hsail_carry_u32", BT_FN_UINT_UINT_UINT,
191 ATTR_PURE_NOTHROW_LEAF_LIST)
193 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CARRY_U64, BRIG_OPCODE_CARRY,
194 BRIG_TYPE_U64, "__hsail_carry_u64", BT_FN_ULONG_ULONG_ULONG,
195 ATTR_PURE_NOTHROW_LEAF_LIST)
197 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_REM_S32, BRIG_OPCODE_REM,
198 BRIG_TYPE_S32, "__hsail_rem_s32", BT_FN_INT_INT_INT,
199 ATTR_PURE_NOTHROW_LEAF_LIST)
201 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_REM_S64, BRIG_OPCODE_REM,
202 BRIG_TYPE_S64, "__hsail_rem_s64", BT_FN_LONG_LONG_LONG,
203 ATTR_PURE_NOTHROW_LEAF_LIST)
205 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_MIN_F32, BRIG_OPCODE_MIN,
206 BRIG_TYPE_F32, "__hsail_min_f32", BT_FN_FLOAT_FLOAT_FLOAT,
207 ATTR_PURE_NOTHROW_LEAF_LIST)
209 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_MAX_F32, BRIG_OPCODE_MAX,
210 BRIG_TYPE_F32, "__hsail_max_f32", BT_FN_FLOAT_FLOAT_FLOAT,
211 ATTR_PURE_NOTHROW_LEAF_LIST)
213 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_MIN_F64, BRIG_OPCODE_MIN,
214 BRIG_TYPE_F64, "__hsail_min_f64", BT_FN_DOUBLE_DOUBLE_DOUBLE,
215 ATTR_PURE_NOTHROW_LEAF_LIST)
217 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_MAX_F64, BRIG_OPCODE_MAX,
218 BRIG_TYPE_F64, "__hsail_max_f64", BT_FN_DOUBLE_DOUBLE_DOUBLE,
219 ATTR_PURE_NOTHROW_LEAF_LIST)
221 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CLASS_F32, BRIG_OPCODE_CLASS,
222 BRIG_TYPE_F32, "__hsail_class_f32", BT_FN_UINT_FLOAT_UINT,
223 ATTR_PURE_NOTHROW_LEAF_LIST)
225 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CLASS_F64, BRIG_OPCODE_CLASS,
226 BRIG_TYPE_F64, "__hsail_class_f64", BT_FN_UINT_DOUBLE_UINT,
227 ATTR_PURE_NOTHROW_LEAF_LIST)
229 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CLASS_F32_F16, BRIG_OPCODE_CLASS,
230 BRIG_TYPE_F16, "__hsail_class_f32_f16", BT_FN_UINT_FLOAT_UINT,
231 ATTR_PURE_NOTHROW_LEAF_LIST)
233 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FRACT_F32, BRIG_OPCODE_FRACT,
234 BRIG_TYPE_F32, "__hsail_fract_f32", BT_FN_FLOAT_FLOAT,
235 ATTR_PURE_NOTHROW_LEAF_LIST)
237 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FRACT_F64, BRIG_OPCODE_FRACT,
238 BRIG_TYPE_F64, "__hsail_fract_f64", BT_FN_DOUBLE_DOUBLE,
239 ATTR_PURE_NOTHROW_LEAF_LIST)
241 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BARRIER, BRIG_OPCODE_BARRIER,
242 BRIG_TYPE_NONE, "__hsail_barrier", BT_FN_VOID_PTR,
245 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_INITFBAR, BRIG_OPCODE_INITFBAR,
246 BRIG_TYPE_NONE, "__hsail_initfbar", BT_FN_VOID_UINT_PTR,
247 ATTR_NOTHROW_LEAF_LIST)
249 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_JOINFBAR, BRIG_OPCODE_JOINFBAR,
250 BRIG_TYPE_NONE, "__hsail_joinfbar", BT_FN_VOID_UINT_PTR,
253 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WAITFBAR, BRIG_OPCODE_WAITFBAR,
254 BRIG_TYPE_NONE, "__hsail_waitfbar", BT_FN_VOID_UINT_PTR,
257 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_ARRIVEFBAR, BRIG_OPCODE_ARRIVEFBAR,
258 BRIG_TYPE_NONE, "__hsail_arrivefbar", BT_FN_VOID_UINT_PTR,
261 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LEAVEFBAR, BRIG_OPCODE_LEAVEFBAR,
262 BRIG_TYPE_NONE, "__hsail_leavefbar", BT_FN_VOID_UINT_PTR,
265 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_RELEASEFBAR, BRIG_OPCODE_RELEASEFBAR,
266 BRIG_TYPE_NONE, "__hsail_releasefbar", BT_FN_VOID_UINT_PTR,
269 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITALIGN, BRIG_OPCODE_BITALIGN,
270 BRIG_TYPE_B32, "__hsail_bitalign",
271 BT_FN_UINT_ULONG_ULONG_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
273 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BYTEALIGN, BRIG_OPCODE_BYTEALIGN,
274 BRIG_TYPE_B32, "__hsail_bytealign",
275 BT_FN_UINT_ULONG_ULONG_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
277 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LERP, BRIG_OPCODE_LERP,
278 BRIG_TYPE_U8X4, "__hsail_lerp", BT_FN_UINT_UINT_UINT_UINT,
279 ATTR_PURE_NOTHROW_LEAF_LIST)
281 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_PACKCVT, BRIG_OPCODE_PACKCVT,
282 BRIG_TYPE_U8X4, "__hsail_packcvt",
283 BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT,
284 ATTR_PURE_NOTHROW_LEAF_LIST)
286 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_UNPACKCVT, BRIG_OPCODE_UNPACKCVT,
287 BRIG_TYPE_F32, "__hsail_unpackcvt", BT_FN_FLOAT_UINT_UINT,
288 ATTR_PURE_NOTHROW_LEAF_LIST)
290 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SAD_U16X2, BRIG_OPCODE_SAD,
291 BRIG_TYPE_U16X2, "__hsail_sad_u16x2",
292 BT_FN_UINT_UINT_UINT_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
294 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SAD_U32, BRIG_OPCODE_SAD,
295 BRIG_TYPE_U32, "__hsail_sad_u32", BT_FN_UINT_UINT_UINT_UINT,
296 ATTR_PURE_NOTHROW_LEAF_LIST)
298 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SAD_U8X4, BRIG_OPCODE_SAD,
299 BRIG_TYPE_U8X4, "__hsail_sad_u8x4", BT_FN_UINT_UINT_UINT_UINT,
300 ATTR_PURE_NOTHROW_LEAF_LIST)
302 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SADHI_U8X4, BRIG_OPCODE_SADHI,
303 BRIG_TYPE_U16X2, "__hsail_sadhi_u16x2_u8x4",
304 BT_FN_UINT_UINT_UINT_UINT,
305 ATTR_PURE_NOTHROW_LEAF_LIST)
307 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CLOCK, BRIG_OPCODE_CLOCK,
308 BRIG_TYPE_U64, "__hsail_clock", BT_FN_ULONG,
309 ATTR_NOTHROW_LEAF_LIST)
311 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CUID, BRIG_OPCODE_CUID,
312 BRIG_TYPE_U32, "__hsail_cuid", BT_FN_UINT_PTR,
313 ATTR_NOTHROW_LEAF_LIST)
315 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_MAXCUID, BRIG_OPCODE_MAXCUID,
316 BRIG_TYPE_U32, "__hsail_maxcuid", BT_FN_UINT_PTR,
317 ATTR_NOTHROW_LEAF_LIST)
319 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_DEBUGTRAP, BRIG_OPCODE_DEBUGTRAP,
320 BRIG_TYPE_U32, "__hsail_debugtrap", BT_FN_VOID_UINT_PTR,
321 ATTR_NORETURN_NOTHROW_LIST)
323 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_GROUPBASEPTR, BRIG_OPCODE_GROUPBASEPTR,
324 BRIG_TYPE_U32, "__hsail_groupbaseptr", BT_FN_UINT_PTR,
325 ATTR_PURE_NOTHROW_LEAF_LIST)
327 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_KERNARGBASEPTR_U64,
328 BRIG_OPCODE_KERNARGBASEPTR, BRIG_TYPE_U64,
329 "__hsail_kernargbaseptr_u64", BT_FN_ULONG_PTR,
330 ATTR_PURE_NOTHROW_LEAF_LIST)
332 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_KERNARGBASEPTR_U32,
333 BRIG_OPCODE_KERNARGBASEPTR, BRIG_TYPE_U32,
334 "__hsail_kernargbaseptr_u32", BT_FN_UINT_PTR,
335 ATTR_PURE_NOTHROW_LEAF_LIST)
337 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_ALLOCA, BRIG_OPCODE_ALLOCA,
338 BRIG_TYPE_U32, "__hsail_alloca", BT_FN_UINT_UINT_UINT_PTR,
339 ATTR_NOTHROW_LEAF_LIST)
341 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LDQUEUEWRITEINDEX,
342 BRIG_OPCODE_LDQUEUEWRITEINDEX,
343 BRIG_TYPE_U64, "__hsail_ldqueuewriteindex",
344 BT_FN_ULONG_ULONG, ATTR_NOTHROW_LEAF_LIST)
346 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LDQUEUEREADINDEX,
347 BRIG_OPCODE_LDQUEUEREADINDEX,
348 BRIG_TYPE_U64, "__hsail_ldqueuereadindex",
349 BT_FN_ULONG_ULONG, ATTR_NOTHROW_LEAF_LIST)
351 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_STQUEUEWRITEINDEX,
352 BRIG_OPCODE_STQUEUEWRITEINDEX,
353 BRIG_TYPE_U64, "__hsail_stqueuewriteindex",
354 BT_FN_VOID_UINT64_UINT64, ATTR_NOTHROW_LEAF_LIST)
356 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_STQUEUEREADINDEX,
357 BRIG_OPCODE_STQUEUEREADINDEX,
358 BRIG_TYPE_U64, "__hsail_stqueuereadindex",
359 BT_FN_VOID_UINT64_UINT64, ATTR_NOTHROW_LEAF_LIST)
361 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_ADDQUEUEWRITEINDEX,
362 BRIG_OPCODE_ADDQUEUEWRITEINDEX,
363 BRIG_TYPE_U64, "__hsail_addqueuewriteindex",
364 BT_FN_ULONG_ULONG_ULONG, ATTR_NOTHROW_LEAF_LIST)
366 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CASQUEUEWRITEINDEX,
367 BRIG_OPCODE_CASQUEUEWRITEINDEX,
368 BRIG_TYPE_U64, "__hsail_casqueuewriteindex",
369 BT_FN_ULONG_ULONG_ULONG_ULONG, ATTR_NOTHROW_LEAF_LIST)
371 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SEGMENTP_GLOBAL,
372 BRIG_OPCODE_SEGMENTP,
373 BRIG_TYPE_U32, "__hsail_segmentp_global",
374 BT_FN_UINT32_UINT64_PTR, ATTR_NOTHROW_LEAF_LIST)
376 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SEGMENTP_GROUP,
377 BRIG_OPCODE_SEGMENTP,
378 BRIG_TYPE_U32, "__hsail_segmentp_group",
379 BT_FN_UINT32_UINT64_PTR, ATTR_NOTHROW_LEAF_LIST)
381 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SEGMENTP_PRIVATE,
382 BRIG_OPCODE_SEGMENTP,
383 BRIG_TYPE_U32, "__hsail_segmentp_private",
384 BT_FN_UINT32_UINT64_PTR, ATTR_NOTHROW_LEAF_LIST)
386 #ifndef DEF_HSAIL_ATOMIC_BUILTIN
387 #define DEF_HSAIL_ATOMIC_BUILTIN(ENUM, ATOMIC_OPCODE, HSAIL_TYPE, \
391 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MIN_S32, BRIG_ATOMIC_MIN,
392 BRIG_TYPE_S32, "__hsail_atomic_min_s32",
393 BT_FN_INT_PTR_INT, ATTR_NOTHROW_LEAF_LIST)
395 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MIN_S64, BRIG_ATOMIC_MIN,
396 BRIG_TYPE_S64, "__hsail_atomic_min_s64",
397 BT_FN_LONG_PTR_LONG, ATTR_NOTHROW_LEAF_LIST)
399 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MIN_U32, BRIG_ATOMIC_MIN,
400 BRIG_TYPE_U32, "__hsail_atomic_min_u32",
401 BT_FN_UINT_PTR_UINT, ATTR_NOTHROW_LEAF_LIST)
403 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MIN_U64, BRIG_ATOMIC_MIN,
404 BRIG_TYPE_U64, "__hsail_atomic_min_u64",
405 BT_FN_ULONG_PTR_ULONG, ATTR_NOTHROW_LEAF_LIST)
407 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MAX_S32, BRIG_ATOMIC_MAX,
408 BRIG_TYPE_S32, "__hsail_atomic_max_s32",
409 BT_FN_INT_PTR_INT, ATTR_NOTHROW_LEAF_LIST)
411 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MAX_S64, BRIG_ATOMIC_MAX,
412 BRIG_TYPE_S64, "__hsail_atomic_max_s64",
413 BT_FN_LONG_PTR_LONG, ATTR_NOTHROW_LEAF_LIST)
415 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MAX_U32, BRIG_ATOMIC_MAX,
416 BRIG_TYPE_U32, "__hsail_atomic_max_u32",
417 BT_FN_UINT_PTR_UINT, ATTR_NOTHROW_LEAF_LIST)
419 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MAX_U64, BRIG_ATOMIC_MAX,
420 BRIG_TYPE_U64, "__hsail_atomic_max_u64",
421 BT_FN_ULONG_PTR_ULONG, ATTR_NOTHROW_LEAF_LIST)
423 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_WRAPDEC_U32,
424 BRIG_ATOMIC_WRAPDEC, BRIG_TYPE_U32,
425 "__hsail_atomic_wrapdec_u32",
426 BT_FN_UINT_PTR_UINT, ATTR_NOTHROW_LEAF_LIST)
428 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_WRAPDEC_U64,
429 BRIG_ATOMIC_WRAPDEC, BRIG_TYPE_U64,
430 "__hsail_atomic_wrapdec_u64",
431 BT_FN_ULONG_PTR_ULONG, ATTR_NOTHROW_LEAF_LIST)
433 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_WRAPINC_U32,
434 BRIG_ATOMIC_WRAPINC, BRIG_TYPE_U32,
435 "__hsail_atomic_wrapinc_u32",
436 BT_FN_UINT_PTR_UINT, ATTR_NOTHROW_LEAF_LIST)
438 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_WRAPINC_U64,
439 BRIG_ATOMIC_WRAPINC, BRIG_TYPE_U64,
440 "__hsail_atomic_wrapinc_u64",
441 BT_FN_ULONG_PTR_ULONG, ATTR_NOTHROW_LEAF_LIST)
443 #ifndef DEF_HSAIL_SAT_BUILTIN
444 #define DEF_HSAIL_SAT_BUILTIN(ENUM, HSAIL_OPCODE, HSAIL_TYPE, \
448 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_U64, BRIG_OPCODE_ADD,
449 BRIG_TYPE_U64, "__hsail_sat_add_u64",
450 BT_FN_ULONG_ULONG_ULONG, ATTR_PURE_NOTHROW_LEAF_LIST)
452 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_S64, BRIG_OPCODE_ADD,
453 BRIG_TYPE_S64, "__hsail_sat_add_s64",
454 BT_FN_LONG_LONG_LONG, ATTR_PURE_NOTHROW_LEAF_LIST)
456 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_U32, BRIG_OPCODE_ADD,
457 BRIG_TYPE_U32, "__hsail_sat_add_u32",
458 BT_FN_UINT_UINT_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
460 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_S32, BRIG_OPCODE_ADD,
461 BRIG_TYPE_S32, "__hsail_sat_add_s32",
462 BT_FN_INT_INT_INT, ATTR_PURE_NOTHROW_LEAF_LIST)
464 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_U16, BRIG_OPCODE_ADD,
465 BRIG_TYPE_U16, "__hsail_sat_add_u16",
466 BT_FN_UINT16_UINT16_UINT16, ATTR_PURE_NOTHROW_LEAF_LIST)
468 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_S16, BRIG_OPCODE_ADD,
469 BRIG_TYPE_S16, "__hsail_sat_add_s16",
470 BT_FN_INT16_INT16_INT16, ATTR_PURE_NOTHROW_LEAF_LIST)
472 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_U8, BRIG_OPCODE_ADD,
473 BRIG_TYPE_U8, "__hsail_sat_add_u8",
474 BT_FN_UINT8_UINT8_UINT8, ATTR_PURE_NOTHROW_LEAF_LIST)
476 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_S8, BRIG_OPCODE_ADD,
477 BRIG_TYPE_S8, "__hsail_sat_add_s8",
478 BT_FN_INT8_INT8_INT8, ATTR_PURE_NOTHROW_LEAF_LIST)
480 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_U64, BRIG_OPCODE_SUB,
481 BRIG_TYPE_U64, "__hsail_sat_sub_u64",
482 BT_FN_ULONG_ULONG_ULONG, ATTR_PURE_NOTHROW_LEAF_LIST)
484 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_S64, BRIG_OPCODE_SUB,
485 BRIG_TYPE_S64, "__hsail_sat_sub_s64",
486 BT_FN_LONG_LONG_LONG, ATTR_PURE_NOTHROW_LEAF_LIST)
488 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_U32, BRIG_OPCODE_SUB,
489 BRIG_TYPE_U32, "__hsail_sat_sub_u32",
490 BT_FN_UINT_UINT_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
492 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_S32, BRIG_OPCODE_SUB,
493 BRIG_TYPE_S32, "__hsail_sat_sub_s32",
494 BT_FN_INT_INT_INT, ATTR_PURE_NOTHROW_LEAF_LIST)
496 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_U16, BRIG_OPCODE_SUB,
497 BRIG_TYPE_U16, "__hsail_sat_sub_u16",
498 BT_FN_UINT16_UINT16_UINT16, ATTR_PURE_NOTHROW_LEAF_LIST)
500 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_S16, BRIG_OPCODE_SUB,
501 BRIG_TYPE_S16, "__hsail_sat_sub_s16",
502 BT_FN_INT16_INT16_INT16, ATTR_PURE_NOTHROW_LEAF_LIST)
504 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_U8, BRIG_OPCODE_SUB,
505 BRIG_TYPE_U8, "__hsail_sat_sub_u8",
506 BT_FN_UINT8_UINT8_UINT8, ATTR_PURE_NOTHROW_LEAF_LIST)
508 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_S8, BRIG_OPCODE_SUB,
509 BRIG_TYPE_S8, "__hsail_sat_sub_s8",
510 BT_FN_INT8_INT8_INT8, ATTR_PURE_NOTHROW_LEAF_LIST)
512 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_U64, BRIG_OPCODE_MUL,
513 BRIG_TYPE_U64, "__hsail_sat_mul_u64",
514 BT_FN_ULONG_ULONG_ULONG, ATTR_PURE_NOTHROW_LEAF_LIST)
516 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_S64, BRIG_OPCODE_MUL,
517 BRIG_TYPE_S64, "__hsail_sat_mul_s64",
518 BT_FN_LONG_LONG_LONG, ATTR_PURE_NOTHROW_LEAF_LIST)
520 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_U32, BRIG_OPCODE_MUL,
521 BRIG_TYPE_U32, "__hsail_sat_mul_u32",
522 BT_FN_UINT_UINT_UINT, ATTR_PURE_NOTHROW_LEAF_LIST)
524 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_S32, BRIG_OPCODE_MUL,
525 BRIG_TYPE_S32, "__hsail_sat_mul_s32",
526 BT_FN_INT_INT_INT, ATTR_PURE_NOTHROW_LEAF_LIST)
528 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_U16, BRIG_OPCODE_MUL,
529 BRIG_TYPE_U16, "__hsail_sat_mul_u16",
530 BT_FN_UINT16_UINT16_UINT16, ATTR_PURE_NOTHROW_LEAF_LIST)
532 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_S16, BRIG_OPCODE_MUL,
533 BRIG_TYPE_S16, "__hsail_sat_mul_s16",
534 BT_FN_INT16_INT16_INT16, ATTR_PURE_NOTHROW_LEAF_LIST)
536 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_U8, BRIG_OPCODE_MUL,
537 BRIG_TYPE_U8, "__hsail_sat_mul_u8",
538 BT_FN_UINT8_UINT8_UINT8, ATTR_PURE_NOTHROW_LEAF_LIST)
540 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_S8, BRIG_OPCODE_MUL,
541 BRIG_TYPE_S8, "__hsail_sat_mul_s8",
542 BT_FN_INT8_INT8_INT8, ATTR_PURE_NOTHROW_LEAF_LIST)
544 #ifndef DEF_HSAIL_INTR_BUILTIN
545 #define DEF_HSAIL_INTR_BUILTIN(ENUM, NAME, TYPE, ATTRS)
548 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_FTZ_F32_F16, "__hsail_ftz_f32_f16",
549 BT_FN_FLOAT_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
551 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_FTZ_F32, "__hsail_ftz_f32",
552 BT_FN_FLOAT_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
554 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_FTZ_F64, "__hsail_ftz_f64",
555 BT_FN_DOUBLE_DOUBLE, ATTR_PURE_NOTHROW_LEAF_LIST)
557 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_PUSH_FRAME, "__hsail_alloca_push_frame",
558 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
560 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_POP_FRAME, "__hsail_alloca_pop_frame",
561 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
563 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_SETWORKITEMID, "__hsail_setworkitemid",
564 BT_FN_VOID_UINT32_UINT32_PTR, ATTR_NOTHROW_LEAF_LIST)
566 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_LAUNCH_WG_FUNC,
567 "__hsail_launch_wg_function",
568 BT_FN_VOID_PTR_PTR_PTR, ATTR_NOTHROW_LEAF_LIST)
570 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_LAUNCH_KERNEL,
571 "__hsail_launch_kernel",
572 BT_FN_VOID_PTR_PTR_PTR, ATTR_NOTHROW_LEAF_LIST)
574 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_F32_TO_F16, "__hsail_f32_to_f16",
575 BT_FN_UINT16_UINT32, ATTR_PURE_NOTHROW_LEAF_LIST)
577 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_F16_TO_F32, "__hsail_f16_to_f32",
578 BT_FN_UINT32_UINT16, ATTR_PURE_NOTHROW_LEAF_LIST)
580 #ifndef DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN
581 #define DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN(ENUM, HSAIL_DEST_TYPE, HSAIL_SRC_TYPE, \
585 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U8_F32,
586 BRIG_TYPE_U8, BRIG_TYPE_F32,
587 "__hsail_cvt_zeroi_sat_u8_f32",
588 BT_FN_UINT8_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
590 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S8_F32,
591 BRIG_TYPE_S8, BRIG_TYPE_F32,
592 "__hsail_cvt_zeroi_sat_s8_f32",
593 BT_FN_INT8_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
595 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U16_F32,
596 BRIG_TYPE_U16, BRIG_TYPE_F32,
597 "__hsail_cvt_zeroi_sat_u16_f32",
598 BT_FN_UINT16_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
600 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S16_F32,
601 BRIG_TYPE_S16, BRIG_TYPE_F32,
602 "__hsail_cvt_zeroi_sat_s16_f32",
603 BT_FN_INT16_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
605 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U32_F32,
606 BRIG_TYPE_U32, BRIG_TYPE_F32,
607 "__hsail_cvt_zeroi_sat_u32_f32",
608 BT_FN_UINT32_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
610 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S32_F32,
611 BRIG_TYPE_S32, BRIG_TYPE_F32,
612 "__hsail_cvt_zeroi_sat_s32_f32",
613 BT_FN_INT_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
615 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U64_F32,
616 BRIG_TYPE_U64, BRIG_TYPE_F32,
617 "__hsail_cvt_zeroi_sat_u64_f32",
618 BT_FN_UINT64_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
620 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S64_F32,
621 BRIG_TYPE_S64, BRIG_TYPE_F32,
622 "__hsail_cvt_zeroi_sat_s64_f32",
623 BT_FN_LONG_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
625 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U8_F64,
626 BRIG_TYPE_U8, BRIG_TYPE_F64,
627 "__hsail_cvt_zeroi_sat_u8_f64",
628 BT_FN_UINT8_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
630 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S8_F64,
631 BRIG_TYPE_S8, BRIG_TYPE_F64,
632 "__hsail_cvt_zeroi_sat_s8_f64",
633 BT_FN_INT8_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
635 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U16_F64,
636 BRIG_TYPE_U16, BRIG_TYPE_F64,
637 "__hsail_cvt_zeroi_sat_u16_f64",
638 BT_FN_UINT16_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
640 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S16_F64,
641 BRIG_TYPE_S16, BRIG_TYPE_F64,
642 "__hsail_cvt_zeroi_sat_s16_f64",
643 BT_FN_INT16_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
645 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U32_F64,
646 BRIG_TYPE_U32, BRIG_TYPE_F64,
647 "__hsail_cvt_zeroi_sat_u32_f64",
648 BT_FN_UINT32_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
650 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S32_F64,
651 BRIG_TYPE_S32, BRIG_TYPE_F64,
652 "__hsail_cvt_zeroi_sat_s32_f64",
653 BT_FN_INT_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
655 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U64_F64,
656 BRIG_TYPE_U64, BRIG_TYPE_F64,
657 "__hsail_cvt_zeroi_sat_u64_f64",
658 BT_FN_UINT64_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)
660 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S64_F64,
661 BRIG_TYPE_S64, BRIG_TYPE_F64,
662 "__hsail_cvt_zeroi_sat_s64_f64",
663 BT_FN_LONG_FLOAT, ATTR_PURE_NOTHROW_LEAF_LIST)