PR libstdc++/86450 use -Wabi=2 and simplify -Werror use
[official-gcc.git] / gcc / brig-builtins.def
blobc2e8d2c034d7b538b4a826a4641ce2034a6b4c33
1 /* This file contains the definitions and documentation for the
2 HSAIL builtins used in the GNU compiler.
3 Copyright (C) 2016-2018 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
13 version.
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
18 for more details.
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
28 a function call. */
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, \
35 NAME, TYPE, ATTRS)
36 #endif
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_CONST_PTR,
49 ATTR_PURE_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_CONST_PTR,
54 ATTR_PURE_NOTHROW_LEAF_LIST)
56 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKITEMFLATID, BRIG_OPCODE_WORKITEMFLATID,
57 BRIG_TYPE_U32, "__hsail_workitemflatid", BT_FN_UINT_CONST_PTR,
58 ATTR_PURE_NOTHROW_LEAF_LIST)
60 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKITEMID, BRIG_OPCODE_WORKITEMID,
61 BRIG_TYPE_U32, "__hsail_workitemid",
62 BT_FN_UINT_UINT_CONST_PTR, ATTR_PURE_NOTHROW_LEAF_LIST)
64 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKGROUPID, BRIG_OPCODE_WORKGROUPID,
65 BRIG_TYPE_U32, "__hsail_workgroupid",
66 BT_FN_UINT_UINT_CONST_PTR, 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_CONST_PTR,
94 ATTR_PURE_NOTHROW_LEAF_LIST)
96 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WORKGROUPSIZE, BRIG_OPCODE_WORKGROUPSIZE,
97 BRIG_TYPE_U32, "__hsail_workgroupsize",
98 BT_FN_UINT_UINT_CONST_PTR,
99 ATTR_PURE_NOTHROW_LEAF_LIST)
101 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_DIM, BRIG_OPCODE_DIM,
102 BRIG_TYPE_U32, "__hsail_dim", BT_FN_UINT_PTR,
103 ATTR_PURE_NOTHROW_LEAF_LIST)
105 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_GRIDGROUPS, BRIG_OPCODE_GRIDGROUPS,
106 BRIG_TYPE_U32, "__hsail_gridgroups", BT_FN_UINT_UINT_PTR,
107 ATTR_PURE_NOTHROW_LEAF_LIST)
109 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITEXTRACT_S32, BRIG_OPCODE_BITEXTRACT,
110 BRIG_TYPE_S32, "__hsail_bitextract_s32",
111 BT_FN_INT_INT_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
113 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITEXTRACT_U32, BRIG_OPCODE_BITEXTRACT,
114 BRIG_TYPE_U32, "__hsail_bitextract_u32",
115 BT_FN_UINT_UINT_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
117 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITEXTRACT_S64, BRIG_OPCODE_BITEXTRACT,
118 BRIG_TYPE_S64, "__hsail_bitextract_s64",
119 BT_FN_LONG_LONG_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
121 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITEXTRACT_U64, BRIG_OPCODE_BITEXTRACT,
122 BRIG_TYPE_U64, "__hsail_bitextract_u64",
123 BT_FN_ULONG_ULONG_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
125 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITINSERT_U32, BRIG_OPCODE_BITINSERT,
126 BRIG_TYPE_U32, "__hsail_bitinsert_u32",
127 BT_FN_UINT_UINT_UINT_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
129 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITINSERT_U64, BRIG_OPCODE_BITINSERT,
130 BRIG_TYPE_U64, "__hsail_bitinsert_u64",
131 BT_FN_ULONG_ULONG_ULONG_UINT_UINT,
132 ATTR_CONST_NOTHROW_LEAF_LIST)
134 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITMASK_B32, BRIG_OPCODE_BITMASK,
135 BRIG_TYPE_B32, "__hsail_bitmask_u32", BT_FN_UINT_UINT_UINT,
136 ATTR_CONST_NOTHROW_LEAF_LIST)
138 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITMASK_B64, BRIG_OPCODE_BITMASK,
139 BRIG_TYPE_B64, "__hsail_bitmask_u64", BT_FN_ULONG_UINT_UINT,
140 ATTR_CONST_NOTHROW_LEAF_LIST)
142 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITREV_B32, BRIG_OPCODE_BITREV,
143 BRIG_TYPE_B32, "__hsail_bitrev_u32", BT_FN_UINT_UINT,
144 ATTR_CONST_NOTHROW_LEAF_LIST)
146 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITREV_B64, BRIG_OPCODE_BITREV,
147 BRIG_TYPE_B64, "__hsail_bitrev_u64", BT_FN_ULONG_ULONG,
148 ATTR_CONST_NOTHROW_LEAF_LIST)
150 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITSELECT_B32, BRIG_OPCODE_BITSELECT,
151 BRIG_TYPE_B32, "__hsail_bitselect_u32",
152 BT_FN_UINT_UINT_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
154 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITSELECT_U64, BRIG_OPCODE_BITSELECT,
155 BRIG_TYPE_B64, "__hsail_bitselect_u64",
156 BT_FN_ULONG_ULONG_ULONG_ULONG, ATTR_CONST_NOTHROW_LEAF_LIST)
158 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FIRSTBIT_U32, BRIG_OPCODE_FIRSTBIT,
159 BRIG_TYPE_U32, "__hsail_firstbit_u32", BT_FN_UINT_UINT,
160 ATTR_CONST_NOTHROW_LEAF_LIST)
162 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FIRSTBIT_S32, BRIG_OPCODE_FIRSTBIT,
163 BRIG_TYPE_S32, "__hsail_firstbit_s32", BT_FN_UINT_INT,
164 ATTR_CONST_NOTHROW_LEAF_LIST)
166 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FIRSTBIT_U64, BRIG_OPCODE_FIRSTBIT,
167 BRIG_TYPE_U64, "__hsail_firstbit_u64", BT_FN_UINT_ULONG,
168 ATTR_CONST_NOTHROW_LEAF_LIST)
170 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FIRSTBIT_S64, BRIG_OPCODE_FIRSTBIT,
171 BRIG_TYPE_S64, "__hsail_firstbit_s64", BT_FN_UINT_LONG,
172 ATTR_CONST_NOTHROW_LEAF_LIST)
174 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LASTBIT_U32, BRIG_OPCODE_LASTBIT,
175 BRIG_TYPE_U32, "__hsail_lastbit_u32", BT_FN_UINT_UINT,
176 ATTR_CONST_NOTHROW_LEAF_LIST)
178 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LASTBIT_U64, BRIG_OPCODE_LASTBIT,
179 BRIG_TYPE_U64, "__hsail_lastbit_u64", BT_FN_UINT_ULONG,
180 ATTR_CONST_NOTHROW_LEAF_LIST)
182 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BORROW_U32, BRIG_OPCODE_BORROW,
183 BRIG_TYPE_U32, "__hsail_borrow_u32", BT_FN_UINT_UINT_UINT,
184 ATTR_CONST_NOTHROW_LEAF_LIST)
186 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BORROW_U64, BRIG_OPCODE_BORROW,
187 BRIG_TYPE_U64, "__hsail_borrow_u64", BT_FN_ULONG_ULONG_ULONG,
188 ATTR_CONST_NOTHROW_LEAF_LIST)
190 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CARRY_U32, BRIG_OPCODE_CARRY,
191 BRIG_TYPE_U32, "__hsail_carry_u32", BT_FN_UINT_UINT_UINT,
192 ATTR_CONST_NOTHROW_LEAF_LIST)
194 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CARRY_U64, BRIG_OPCODE_CARRY,
195 BRIG_TYPE_U64, "__hsail_carry_u64", BT_FN_ULONG_ULONG_ULONG,
196 ATTR_CONST_NOTHROW_LEAF_LIST)
198 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_REM_S32, BRIG_OPCODE_REM,
199 BRIG_TYPE_S32, "__hsail_rem_s32", BT_FN_INT_INT_INT,
200 ATTR_CONST_NOTHROW_LEAF_LIST)
202 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_REM_S64, BRIG_OPCODE_REM,
203 BRIG_TYPE_S64, "__hsail_rem_s64", BT_FN_LONG_LONG_LONG,
204 ATTR_CONST_NOTHROW_LEAF_LIST)
206 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_MIN_F32, BRIG_OPCODE_MIN,
207 BRIG_TYPE_F32, "__hsail_min_f32", BT_FN_FLOAT_FLOAT_FLOAT,
208 ATTR_CONST_NOTHROW_LEAF_LIST)
210 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_MAX_F32, BRIG_OPCODE_MAX,
211 BRIG_TYPE_F32, "__hsail_max_f32", BT_FN_FLOAT_FLOAT_FLOAT,
212 ATTR_CONST_NOTHROW_LEAF_LIST)
214 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_MIN_F64, BRIG_OPCODE_MIN,
215 BRIG_TYPE_F64, "__hsail_min_f64", BT_FN_DOUBLE_DOUBLE_DOUBLE,
216 ATTR_CONST_NOTHROW_LEAF_LIST)
218 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_MAX_F64, BRIG_OPCODE_MAX,
219 BRIG_TYPE_F64, "__hsail_max_f64", BT_FN_DOUBLE_DOUBLE_DOUBLE,
220 ATTR_CONST_NOTHROW_LEAF_LIST)
222 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CLASS_F32, BRIG_OPCODE_CLASS,
223 BRIG_TYPE_F32, "__hsail_class_f32", BT_FN_UINT_FLOAT_UINT,
224 ATTR_CONST_NOTHROW_LEAF_LIST)
226 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CLASS_F64, BRIG_OPCODE_CLASS,
227 BRIG_TYPE_F64, "__hsail_class_f64", BT_FN_UINT_DOUBLE_UINT,
228 ATTR_CONST_NOTHROW_LEAF_LIST)
230 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CLASS_F32_F16, BRIG_OPCODE_CLASS,
231 BRIG_TYPE_F16, "__hsail_class_f32_f16",
232 BT_FN_UINT_FLOAT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
234 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FRACT_F32, BRIG_OPCODE_FRACT,
235 BRIG_TYPE_F32, "__hsail_fract_f32", BT_FN_FLOAT_FLOAT,
236 ATTR_CONST_NOTHROW_LEAF_LIST)
238 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_FRACT_F64, BRIG_OPCODE_FRACT,
239 BRIG_TYPE_F64, "__hsail_fract_f64", BT_FN_DOUBLE_DOUBLE,
240 ATTR_CONST_NOTHROW_LEAF_LIST)
242 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BARRIER, BRIG_OPCODE_BARRIER,
243 BRIG_TYPE_NONE, "__hsail_barrier", BT_FN_VOID_PTR,
244 ATTR_RT_NOTHROW_LEAF_LIST)
246 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_INITFBAR, BRIG_OPCODE_INITFBAR,
247 BRIG_TYPE_NONE, "__hsail_initfbar", BT_FN_VOID_UINT_PTR,
248 ATTR_NOTHROW_LEAF_LIST)
250 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_JOINFBAR, BRIG_OPCODE_JOINFBAR,
251 BRIG_TYPE_NONE, "__hsail_joinfbar", BT_FN_VOID_UINT_PTR,
252 ATTR_NOTHROW_LIST)
254 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_WAITFBAR, BRIG_OPCODE_WAITFBAR,
255 BRIG_TYPE_NONE, "__hsail_waitfbar", BT_FN_VOID_UINT_PTR,
256 ATTR_RT_NOTHROW_LEAF_LIST)
258 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_ARRIVEFBAR, BRIG_OPCODE_ARRIVEFBAR,
259 BRIG_TYPE_NONE, "__hsail_arrivefbar", BT_FN_VOID_UINT_PTR,
260 ATTR_RT_NOTHROW_LEAF_LIST)
262 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LEAVEFBAR, BRIG_OPCODE_LEAVEFBAR,
263 BRIG_TYPE_NONE, "__hsail_leavefbar", BT_FN_VOID_UINT_PTR,
264 ATTR_NOTHROW_LIST)
266 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_RELEASEFBAR, BRIG_OPCODE_RELEASEFBAR,
267 BRIG_TYPE_NONE, "__hsail_releasefbar", BT_FN_VOID_UINT_PTR,
268 ATTR_NOTHROW_LIST)
270 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BITALIGN, BRIG_OPCODE_BITALIGN,
271 BRIG_TYPE_B32, "__hsail_bitalign",
272 BT_FN_UINT_ULONG_ULONG_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
274 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_BYTEALIGN, BRIG_OPCODE_BYTEALIGN,
275 BRIG_TYPE_B32, "__hsail_bytealign",
276 BT_FN_UINT_ULONG_ULONG_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
278 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LERP, BRIG_OPCODE_LERP,
279 BRIG_TYPE_U8X4, "__hsail_lerp", BT_FN_UINT_UINT_UINT_UINT,
280 ATTR_CONST_NOTHROW_LEAF_LIST)
282 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_PACKCVT, BRIG_OPCODE_PACKCVT,
283 BRIG_TYPE_U8X4, "__hsail_packcvt",
284 BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT,
285 ATTR_CONST_NOTHROW_LEAF_LIST)
287 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_UNPACKCVT, BRIG_OPCODE_UNPACKCVT,
288 BRIG_TYPE_F32, "__hsail_unpackcvt", BT_FN_FLOAT_UINT_UINT,
289 ATTR_CONST_NOTHROW_LEAF_LIST)
291 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SAD_U16X2, BRIG_OPCODE_SAD,
292 BRIG_TYPE_U16X2, "__hsail_sad_u16x2",
293 BT_FN_UINT_UINT_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
295 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SAD_U32, BRIG_OPCODE_SAD,
296 BRIG_TYPE_U32, "__hsail_sad_u32", BT_FN_UINT_UINT_UINT_UINT,
297 ATTR_CONST_NOTHROW_LEAF_LIST)
299 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SAD_U8X4, BRIG_OPCODE_SAD,
300 BRIG_TYPE_U8X4, "__hsail_sad_u8x4",
301 BT_FN_UINT_UINT_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
303 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SADHI_U8X4, BRIG_OPCODE_SADHI,
304 BRIG_TYPE_U16X2, "__hsail_sadhi_u16x2_u8x4",
305 BT_FN_UINT_UINT_UINT_UINT,
306 ATTR_CONST_NOTHROW_LEAF_LIST)
308 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CLOCK, BRIG_OPCODE_CLOCK,
309 BRIG_TYPE_U64, "__hsail_clock", BT_FN_ULONG,
310 ATTR_NOTHROW_LEAF_LIST)
312 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CUID, BRIG_OPCODE_CUID,
313 BRIG_TYPE_U32, "__hsail_cuid", BT_FN_UINT_PTR,
314 ATTR_NOTHROW_LEAF_LIST)
316 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_MAXCUID, BRIG_OPCODE_MAXCUID,
317 BRIG_TYPE_U32, "__hsail_maxcuid", BT_FN_UINT_PTR,
318 ATTR_NOTHROW_LEAF_LIST)
320 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_DEBUGTRAP, BRIG_OPCODE_DEBUGTRAP,
321 BRIG_TYPE_U32, "__hsail_debugtrap", BT_FN_VOID_UINT_PTR,
322 ATTR_NORETURN_NOTHROW_LIST)
324 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_GROUPBASEPTR, BRIG_OPCODE_GROUPBASEPTR,
325 BRIG_TYPE_U32, "__hsail_groupbaseptr", BT_FN_UINT_PTR,
326 ATTR_PURE_NOTHROW_LEAF_LIST)
328 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_KERNARGBASEPTR_U64,
329 BRIG_OPCODE_KERNARGBASEPTR, BRIG_TYPE_U64,
330 "__hsail_kernargbaseptr_u64", BT_FN_ULONG_PTR,
331 ATTR_PURE_NOTHROW_LEAF_LIST)
333 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_KERNARGBASEPTR_U32,
334 BRIG_OPCODE_KERNARGBASEPTR, BRIG_TYPE_U32,
335 "__hsail_kernargbaseptr_u32", BT_FN_UINT_PTR,
336 ATTR_PURE_NOTHROW_LEAF_LIST)
338 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_ALLOCA, BRIG_OPCODE_ALLOCA,
339 BRIG_TYPE_U32, "__hsail_alloca", BT_FN_UINT_UINT_UINT_PTR,
340 ATTR_NOTHROW_LEAF_LIST)
342 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LDQUEUEWRITEINDEX,
343 BRIG_OPCODE_LDQUEUEWRITEINDEX,
344 BRIG_TYPE_U64, "__hsail_ldqueuewriteindex",
345 BT_FN_ULONG_ULONG, ATTR_NOTHROW_LEAF_LIST)
347 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_LDQUEUEREADINDEX,
348 BRIG_OPCODE_LDQUEUEREADINDEX,
349 BRIG_TYPE_U64, "__hsail_ldqueuereadindex",
350 BT_FN_ULONG_ULONG, ATTR_NOTHROW_LEAF_LIST)
352 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_STQUEUEWRITEINDEX,
353 BRIG_OPCODE_STQUEUEWRITEINDEX,
354 BRIG_TYPE_U64, "__hsail_stqueuewriteindex",
355 BT_FN_VOID_UINT64_UINT64, ATTR_NOTHROW_LEAF_LIST)
357 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_STQUEUEREADINDEX,
358 BRIG_OPCODE_STQUEUEREADINDEX,
359 BRIG_TYPE_U64, "__hsail_stqueuereadindex",
360 BT_FN_VOID_UINT64_UINT64, ATTR_NOTHROW_LEAF_LIST)
362 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_ADDQUEUEWRITEINDEX,
363 BRIG_OPCODE_ADDQUEUEWRITEINDEX,
364 BRIG_TYPE_U64, "__hsail_addqueuewriteindex",
365 BT_FN_ULONG_ULONG_ULONG, ATTR_NOTHROW_LEAF_LIST)
367 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CASQUEUEWRITEINDEX,
368 BRIG_OPCODE_CASQUEUEWRITEINDEX,
369 BRIG_TYPE_U64, "__hsail_casqueuewriteindex",
370 BT_FN_ULONG_ULONG_ULONG_ULONG, ATTR_NOTHROW_LEAF_LIST)
372 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SEGMENTP_GLOBAL,
373 BRIG_OPCODE_SEGMENTP,
374 BRIG_TYPE_U32, "__hsail_segmentp_global",
375 BT_FN_UINT32_UINT64_PTR, ATTR_NOTHROW_LEAF_LIST)
377 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SEGMENTP_GROUP,
378 BRIG_OPCODE_SEGMENTP,
379 BRIG_TYPE_U32, "__hsail_segmentp_group",
380 BT_FN_UINT32_UINT64_PTR, ATTR_NOTHROW_LEAF_LIST)
382 DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_SEGMENTP_PRIVATE,
383 BRIG_OPCODE_SEGMENTP,
384 BRIG_TYPE_U32, "__hsail_segmentp_private",
385 BT_FN_UINT32_UINT64_PTR, ATTR_NOTHROW_LEAF_LIST)
387 #ifndef DEF_HSAIL_ATOMIC_BUILTIN
388 #define DEF_HSAIL_ATOMIC_BUILTIN(ENUM, ATOMIC_OPCODE, HSAIL_TYPE, \
389 NAME, TYPE, ATTRS)
390 #endif
392 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MIN_S32, BRIG_ATOMIC_MIN,
393 BRIG_TYPE_S32, "__hsail_atomic_min_s32",
394 BT_FN_INT_PTR_INT, ATTR_NOTHROW_LEAF_LIST)
396 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MIN_S64, BRIG_ATOMIC_MIN,
397 BRIG_TYPE_S64, "__hsail_atomic_min_s64",
398 BT_FN_LONG_PTR_LONG, ATTR_NOTHROW_LEAF_LIST)
400 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MIN_U32, BRIG_ATOMIC_MIN,
401 BRIG_TYPE_U32, "__hsail_atomic_min_u32",
402 BT_FN_UINT_PTR_UINT, ATTR_NOTHROW_LEAF_LIST)
404 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MIN_U64, BRIG_ATOMIC_MIN,
405 BRIG_TYPE_U64, "__hsail_atomic_min_u64",
406 BT_FN_ULONG_PTR_ULONG, ATTR_NOTHROW_LEAF_LIST)
408 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MAX_S32, BRIG_ATOMIC_MAX,
409 BRIG_TYPE_S32, "__hsail_atomic_max_s32",
410 BT_FN_INT_PTR_INT, ATTR_NOTHROW_LEAF_LIST)
412 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MAX_S64, BRIG_ATOMIC_MAX,
413 BRIG_TYPE_S64, "__hsail_atomic_max_s64",
414 BT_FN_LONG_PTR_LONG, ATTR_NOTHROW_LEAF_LIST)
416 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MAX_U32, BRIG_ATOMIC_MAX,
417 BRIG_TYPE_U32, "__hsail_atomic_max_u32",
418 BT_FN_UINT_PTR_UINT, ATTR_NOTHROW_LEAF_LIST)
420 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_MAX_U64, BRIG_ATOMIC_MAX,
421 BRIG_TYPE_U64, "__hsail_atomic_max_u64",
422 BT_FN_ULONG_PTR_ULONG, ATTR_NOTHROW_LEAF_LIST)
424 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_WRAPDEC_U32,
425 BRIG_ATOMIC_WRAPDEC, BRIG_TYPE_U32,
426 "__hsail_atomic_wrapdec_u32",
427 BT_FN_UINT_PTR_UINT, ATTR_NOTHROW_LEAF_LIST)
429 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_WRAPDEC_U64,
430 BRIG_ATOMIC_WRAPDEC, BRIG_TYPE_U64,
431 "__hsail_atomic_wrapdec_u64",
432 BT_FN_ULONG_PTR_ULONG, ATTR_NOTHROW_LEAF_LIST)
434 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_WRAPINC_U32,
435 BRIG_ATOMIC_WRAPINC, BRIG_TYPE_U32,
436 "__hsail_atomic_wrapinc_u32",
437 BT_FN_UINT_PTR_UINT, ATTR_NOTHROW_LEAF_LIST)
439 DEF_HSAIL_ATOMIC_BUILTIN (BUILT_IN_HSAIL_ATOMIC_WRAPINC_U64,
440 BRIG_ATOMIC_WRAPINC, BRIG_TYPE_U64,
441 "__hsail_atomic_wrapinc_u64",
442 BT_FN_ULONG_PTR_ULONG, ATTR_NOTHROW_LEAF_LIST)
444 #ifndef DEF_HSAIL_SAT_BUILTIN
445 #define DEF_HSAIL_SAT_BUILTIN(ENUM, HSAIL_OPCODE, HSAIL_TYPE, \
446 NAME, TYPE, ATTRS)
447 #endif
449 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_U64, BRIG_OPCODE_ADD,
450 BRIG_TYPE_U64, "__hsail_sat_add_u64",
451 BT_FN_ULONG_ULONG_ULONG, ATTR_CONST_NOTHROW_LEAF_LIST)
453 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_S64, BRIG_OPCODE_ADD,
454 BRIG_TYPE_S64, "__hsail_sat_add_s64",
455 BT_FN_LONG_LONG_LONG, ATTR_CONST_NOTHROW_LEAF_LIST)
457 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_U32, BRIG_OPCODE_ADD,
458 BRIG_TYPE_U32, "__hsail_sat_add_u32",
459 BT_FN_UINT_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
461 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_S32, BRIG_OPCODE_ADD,
462 BRIG_TYPE_S32, "__hsail_sat_add_s32",
463 BT_FN_INT_INT_INT, ATTR_CONST_NOTHROW_LEAF_LIST)
465 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_U16, BRIG_OPCODE_ADD,
466 BRIG_TYPE_U16, "__hsail_sat_add_u16",
467 BT_FN_UINT16_UINT16_UINT16, ATTR_CONST_NOTHROW_LEAF_LIST)
469 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_S16, BRIG_OPCODE_ADD,
470 BRIG_TYPE_S16, "__hsail_sat_add_s16",
471 BT_FN_INT16_INT16_INT16, ATTR_CONST_NOTHROW_LEAF_LIST)
473 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_U8, BRIG_OPCODE_ADD,
474 BRIG_TYPE_U8, "__hsail_sat_add_u8",
475 BT_FN_UINT8_UINT8_UINT8, ATTR_CONST_NOTHROW_LEAF_LIST)
477 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_ADD_S8, BRIG_OPCODE_ADD,
478 BRIG_TYPE_S8, "__hsail_sat_add_s8",
479 BT_FN_INT8_INT8_INT8, ATTR_CONST_NOTHROW_LEAF_LIST)
481 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_U64, BRIG_OPCODE_SUB,
482 BRIG_TYPE_U64, "__hsail_sat_sub_u64",
483 BT_FN_ULONG_ULONG_ULONG, ATTR_CONST_NOTHROW_LEAF_LIST)
485 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_S64, BRIG_OPCODE_SUB,
486 BRIG_TYPE_S64, "__hsail_sat_sub_s64",
487 BT_FN_LONG_LONG_LONG, ATTR_CONST_NOTHROW_LEAF_LIST)
489 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_U32, BRIG_OPCODE_SUB,
490 BRIG_TYPE_U32, "__hsail_sat_sub_u32",
491 BT_FN_UINT_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
493 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_S32, BRIG_OPCODE_SUB,
494 BRIG_TYPE_S32, "__hsail_sat_sub_s32",
495 BT_FN_INT_INT_INT, ATTR_CONST_NOTHROW_LEAF_LIST)
497 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_U16, BRIG_OPCODE_SUB,
498 BRIG_TYPE_U16, "__hsail_sat_sub_u16",
499 BT_FN_UINT16_UINT16_UINT16, ATTR_CONST_NOTHROW_LEAF_LIST)
501 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_S16, BRIG_OPCODE_SUB,
502 BRIG_TYPE_S16, "__hsail_sat_sub_s16",
503 BT_FN_INT16_INT16_INT16, ATTR_CONST_NOTHROW_LEAF_LIST)
505 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_U8, BRIG_OPCODE_SUB,
506 BRIG_TYPE_U8, "__hsail_sat_sub_u8",
507 BT_FN_UINT8_UINT8_UINT8, ATTR_CONST_NOTHROW_LEAF_LIST)
509 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_SUB_S8, BRIG_OPCODE_SUB,
510 BRIG_TYPE_S8, "__hsail_sat_sub_s8",
511 BT_FN_INT8_INT8_INT8, ATTR_CONST_NOTHROW_LEAF_LIST)
513 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_U64, BRIG_OPCODE_MUL,
514 BRIG_TYPE_U64, "__hsail_sat_mul_u64",
515 BT_FN_ULONG_ULONG_ULONG, ATTR_CONST_NOTHROW_LEAF_LIST)
517 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_S64, BRIG_OPCODE_MUL,
518 BRIG_TYPE_S64, "__hsail_sat_mul_s64",
519 BT_FN_LONG_LONG_LONG, ATTR_CONST_NOTHROW_LEAF_LIST)
521 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_U32, BRIG_OPCODE_MUL,
522 BRIG_TYPE_U32, "__hsail_sat_mul_u32",
523 BT_FN_UINT_UINT_UINT, ATTR_CONST_NOTHROW_LEAF_LIST)
525 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_S32, BRIG_OPCODE_MUL,
526 BRIG_TYPE_S32, "__hsail_sat_mul_s32",
527 BT_FN_INT_INT_INT, ATTR_CONST_NOTHROW_LEAF_LIST)
529 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_U16, BRIG_OPCODE_MUL,
530 BRIG_TYPE_U16, "__hsail_sat_mul_u16",
531 BT_FN_UINT16_UINT16_UINT16, ATTR_CONST_NOTHROW_LEAF_LIST)
533 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_S16, BRIG_OPCODE_MUL,
534 BRIG_TYPE_S16, "__hsail_sat_mul_s16",
535 BT_FN_INT16_INT16_INT16, ATTR_CONST_NOTHROW_LEAF_LIST)
537 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_U8, BRIG_OPCODE_MUL,
538 BRIG_TYPE_U8, "__hsail_sat_mul_u8",
539 BT_FN_UINT8_UINT8_UINT8, ATTR_CONST_NOTHROW_LEAF_LIST)
541 DEF_HSAIL_SAT_BUILTIN (BUILT_IN_HSAIL_SAT_MUL_S8, BRIG_OPCODE_MUL,
542 BRIG_TYPE_S8, "__hsail_sat_mul_s8",
543 BT_FN_INT8_INT8_INT8, ATTR_CONST_NOTHROW_LEAF_LIST)
545 #ifndef DEF_HSAIL_INTR_BUILTIN
546 #define DEF_HSAIL_INTR_BUILTIN(ENUM, NAME, TYPE, ATTRS)
547 #endif
549 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_FTZ_F32_F16, "__hsail_ftz_f32_f16",
550 BT_FN_FLOAT_FLOAT, ATTR_CONST_NOTHROW_LEAF_LIST)
552 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_FTZ_F32, "__hsail_ftz_f32",
553 BT_FN_FLOAT_FLOAT, ATTR_CONST_NOTHROW_LEAF_LIST)
555 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_FTZ_F64, "__hsail_ftz_f64",
556 BT_FN_DOUBLE_DOUBLE, ATTR_CONST_NOTHROW_LEAF_LIST)
558 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_PUSH_FRAME, "__hsail_alloca_push_frame",
559 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
561 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_POP_FRAME, "__hsail_alloca_pop_frame",
562 BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
564 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_SETWORKITEMID, "__hsail_setworkitemid",
565 BT_FN_VOID_UINT32_UINT32_PTR, ATTR_NOTHROW_LEAF_LIST)
567 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_LAUNCH_WG_FUNC,
568 "__hsail_launch_wg_function",
569 BT_FN_VOID_PTR_PTR_UINT32, ATTR_NOTHROW_LEAF_LIST)
571 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_LAUNCH_KERNEL,
572 "__hsail_launch_kernel",
573 BT_FN_VOID_PTR_PTR_PTR, ATTR_NOTHROW_LEAF_LIST)
575 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_F32_TO_F16, "__hsail_f32_to_f16",
576 BT_FN_UINT16_UINT32, ATTR_CONST_NOTHROW_LEAF_LIST)
578 DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_F16_TO_F32, "__hsail_f16_to_f32",
579 BT_FN_UINT32_UINT16, ATTR_CONST_NOTHROW_LEAF_LIST)
581 #ifndef DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN
582 #define DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN(ENUM, HSAIL_DEST_TYPE, HSAIL_SRC_TYPE, \
583 NAME, TYPE, ATTRS)
584 #endif
586 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U8_F32,
587 BRIG_TYPE_U8, BRIG_TYPE_F32,
588 "__hsail_cvt_zeroi_sat_u8_f32",
589 BT_FN_UINT8_FLOAT,
590 ATTR_CONST_NOTHROW_LEAF_LIST)
592 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S8_F32,
593 BRIG_TYPE_S8, BRIG_TYPE_F32,
594 "__hsail_cvt_zeroi_sat_s8_f32",
595 BT_FN_INT8_FLOAT, ATTR_CONST_NOTHROW_LEAF_LIST)
597 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U16_F32,
598 BRIG_TYPE_U16, BRIG_TYPE_F32,
599 "__hsail_cvt_zeroi_sat_u16_f32",
600 BT_FN_UINT16_FLOAT,
601 ATTR_CONST_NOTHROW_LEAF_LIST)
603 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S16_F32,
604 BRIG_TYPE_S16, BRIG_TYPE_F32,
605 "__hsail_cvt_zeroi_sat_s16_f32",
606 BT_FN_INT16_FLOAT,
607 ATTR_CONST_NOTHROW_LEAF_LIST)
609 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U32_F32,
610 BRIG_TYPE_U32, BRIG_TYPE_F32,
611 "__hsail_cvt_zeroi_sat_u32_f32",
612 BT_FN_UINT32_FLOAT,
613 ATTR_CONST_NOTHROW_LEAF_LIST)
615 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S32_F32,
616 BRIG_TYPE_S32, BRIG_TYPE_F32,
617 "__hsail_cvt_zeroi_sat_s32_f32",
618 BT_FN_INT_FLOAT, ATTR_CONST_NOTHROW_LEAF_LIST)
620 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U64_F32,
621 BRIG_TYPE_U64, BRIG_TYPE_F32,
622 "__hsail_cvt_zeroi_sat_u64_f32",
623 BT_FN_UINT64_FLOAT,
624 ATTR_CONST_NOTHROW_LEAF_LIST)
626 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S64_F32,
627 BRIG_TYPE_S64, BRIG_TYPE_F32,
628 "__hsail_cvt_zeroi_sat_s64_f32",
629 BT_FN_LONG_FLOAT, ATTR_CONST_NOTHROW_LEAF_LIST)
631 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U8_F64,
632 BRIG_TYPE_U8, BRIG_TYPE_F64,
633 "__hsail_cvt_zeroi_sat_u8_f64",
634 BT_FN_UINT8_FLOAT,
635 ATTR_CONST_NOTHROW_LEAF_LIST)
637 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S8_F64,
638 BRIG_TYPE_S8, BRIG_TYPE_F64,
639 "__hsail_cvt_zeroi_sat_s8_f64",
640 BT_FN_INT8_FLOAT, ATTR_CONST_NOTHROW_LEAF_LIST)
642 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U16_F64,
643 BRIG_TYPE_U16, BRIG_TYPE_F64,
644 "__hsail_cvt_zeroi_sat_u16_f64",
645 BT_FN_UINT16_FLOAT,
646 ATTR_CONST_NOTHROW_LEAF_LIST)
648 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S16_F64,
649 BRIG_TYPE_S16, BRIG_TYPE_F64,
650 "__hsail_cvt_zeroi_sat_s16_f64",
651 BT_FN_INT16_FLOAT,
652 ATTR_CONST_NOTHROW_LEAF_LIST)
654 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U32_F64,
655 BRIG_TYPE_U32, BRIG_TYPE_F64,
656 "__hsail_cvt_zeroi_sat_u32_f64",
657 BT_FN_UINT32_FLOAT,
658 ATTR_CONST_NOTHROW_LEAF_LIST)
660 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S32_F64,
661 BRIG_TYPE_S32, BRIG_TYPE_F64,
662 "__hsail_cvt_zeroi_sat_s32_f64",
663 BT_FN_INT_FLOAT, ATTR_CONST_NOTHROW_LEAF_LIST)
665 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_U64_F64,
666 BRIG_TYPE_U64, BRIG_TYPE_F64,
667 "__hsail_cvt_zeroi_sat_u64_f64",
668 BT_FN_UINT64_FLOAT,
669 ATTR_CONST_NOTHROW_LEAF_LIST)
671 DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN (BUILT_IN_HSAIL_CVT_ZEROI_SAT_S64_F64,
672 BRIG_TYPE_S64, BRIG_TYPE_F64,
673 "__hsail_cvt_zeroi_sat_s64_f64",
674 BT_FN_LONG_FLOAT,
675 ATTR_CONST_NOTHROW_LEAF_LIST)