LCOV - code coverage report
Current view: top level - gcc - brig-builtins.def (source / functions) Hit Total Coverage
Test: gcc.info Lines: 144 144 100.0 %
Date: 2020-03-28 11:57:23 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* This file contains the definitions and documentation for the
       2                 :            :    HSAIL builtins used in the GNU compiler.
       3                 :            :    Copyright (C) 2016-2020 Free Software Foundation, Inc.
       4                 :            : 
       5                 :            :    Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com>
       6                 :            :    for General Processor Tech.
       7                 :            : 
       8                 :            : This file is part of GCC.
       9                 :            : 
      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.
      14                 :            : 
      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.
      19                 :            : 
      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/>.  */
      23                 :            : 
      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.  */
      29                 :            : 
      30                 :            : /* Work-item ID related builtins are not constant in the work-group function
      31                 :            :    mode (each WI has a different return value).  */
      32                 :            : 
      33                 :            : #ifndef DEF_HSAIL_BUILTIN
      34                 :            : #define DEF_HSAIL_BUILTIN(ENUM, HSAIL_OPCODE, HSAIL_TYPE,       \
      35                 :            :                           NAME, TYPE, ATTRS)
      36                 :            : #endif
      37                 :            : 
      38                 :     170845 : 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)
      41                 :            : 
      42                 :     170845 : 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)
      45                 :            : 
      46                 :     170845 : 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)
      50                 :            : 
      51                 :     170845 : 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)
      55                 :            : 
      56                 :     170845 : 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)
      59                 :            : 
      60                 :     170845 : 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)
      63                 :            : 
      64                 :     170845 : 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)
      67                 :            : 
      68                 :     170845 : 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)
      72                 :            : 
      73                 :     170845 : 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)
      76                 :            : 
      77                 :     170845 : 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)
      80                 :            : 
      81                 :     170845 : 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)
      85                 :            : 
      86                 :     170845 : 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)
      90                 :            : 
      91                 :     170845 : 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)
      95                 :            : 
      96                 :     170845 : 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)
     100                 :            : 
     101                 :     170845 : 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)
     104                 :            : 
     105                 :     170845 : 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)
     108                 :            : 
     109                 :     170845 : 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)
     112                 :            : 
     113                 :     170845 : 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)
     116                 :            : 
     117                 :     170845 : 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)
     120                 :            : 
     121                 :     170845 : 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)
     124                 :            : 
     125                 :     170845 : 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)
     128                 :            : 
     129                 :     170845 : 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)
     133                 :            : 
     134                 :     170845 : 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)
     137                 :            : 
     138                 :     170845 : 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)
     141                 :            : 
     142                 :     170845 : 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)
     145                 :            : 
     146                 :     170845 : 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)
     149                 :            : 
     150                 :     170845 : 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)
     153                 :            : 
     154                 :     170845 : 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)
     157                 :            : 
     158                 :     170845 : 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)
     161                 :            : 
     162                 :     170845 : 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)
     165                 :            : 
     166                 :     170845 : 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)
     169                 :            : 
     170                 :     170845 : 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)
     173                 :            : 
     174                 :     170845 : 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)
     177                 :            : 
     178                 :     170845 : 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)
     181                 :            : 
     182                 :     170845 : 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)
     185                 :            : 
     186                 :     170845 : 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)
     189                 :            : 
     190                 :     170845 : 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)
     193                 :            : 
     194                 :     170845 : 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)
     197                 :            : 
     198                 :     170845 : 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)
     201                 :            : 
     202                 :     170845 : 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)
     205                 :            : 
     206                 :     170845 : 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)
     209                 :            : 
     210                 :     170845 : 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)
     213                 :            : 
     214                 :     170845 : 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)
     217                 :            : 
     218                 :     170845 : 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)
     221                 :            : 
     222                 :     170845 : 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)
     225                 :            : 
     226                 :     170845 : 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)
     229                 :            : 
     230                 :     170845 : 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)
     233                 :            : 
     234                 :     170845 : 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)
     237                 :            : 
     238                 :     170845 : 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)
     241                 :            : 
     242                 :     170845 : 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)
     245                 :            : 
     246                 :     170845 : 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)
     249                 :            : 
     250                 :     170845 : 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)
     253                 :            : 
     254                 :     170845 : 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)
     257                 :            : 
     258                 :     170845 : 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)
     261                 :            : 
     262                 :     170845 : 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)
     265                 :            : 
     266                 :     170845 : 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)
     269                 :            : 
     270                 :     170845 : 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)
     273                 :            : 
     274                 :     170845 : 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)
     277                 :            : 
     278                 :     170845 : 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)
     281                 :            : 
     282                 :     170845 : 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)
     286                 :            : 
     287                 :     170845 : 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)
     290                 :            : 
     291                 :     170845 : 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)
     294                 :            : 
     295                 :     170845 : 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)
     298                 :            : 
     299                 :     170845 : 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)
     302                 :            : 
     303                 :     170845 : 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)
     307                 :            : 
     308                 :     170845 : DEF_HSAIL_BUILTIN (BUILT_IN_HSAIL_CLOCK, BRIG_OPCODE_CLOCK,
     309                 :            :                   BRIG_TYPE_U64, "__hsail_clock", BT_FN_ULONG,
     310                 :            :                   ATTR_NOTHROW_LEAF_LIST)
     311                 :            : 
     312                 :     170845 : 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)
     315                 :            : 
     316                 :     170845 : 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)
     319                 :            : 
     320                 :     170845 : 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)
     323                 :            : 
     324                 :     170845 : 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)
     327                 :            : 
     328                 :     170845 : 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)
     332                 :            : 
     333                 :     170845 : 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)
     337                 :            : 
     338                 :     170845 : 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)
     341                 :            : 
     342                 :     170845 : 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)
     346                 :            : 
     347                 :     170845 : 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)
     351                 :            : 
     352                 :     170845 : 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)
     356                 :            : 
     357                 :     170845 : 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)
     361                 :            : 
     362                 :     170845 : 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)
     366                 :            : 
     367                 :     170845 : 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)
     371                 :            : 
     372                 :     170845 : 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)
     376                 :            : 
     377                 :     170845 : 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)
     381                 :            : 
     382                 :     170845 : 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)
     386                 :            : 
     387                 :            : #ifndef DEF_HSAIL_ATOMIC_BUILTIN
     388                 :            : #define DEF_HSAIL_ATOMIC_BUILTIN(ENUM, ATOMIC_OPCODE, HSAIL_TYPE,       \
     389                 :            :                                  NAME, TYPE, ATTRS)
     390                 :            : #endif
     391                 :            : 
     392                 :     170845 : 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)
     395                 :            : 
     396                 :     170845 : 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)
     399                 :            : 
     400                 :     170845 : 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)
     403                 :            : 
     404                 :     170845 : 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)
     407                 :            : 
     408                 :     170845 : 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)
     411                 :            : 
     412                 :     170845 : 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)
     415                 :            : 
     416                 :     170845 : 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)
     419                 :            : 
     420                 :     170845 : 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)
     423                 :            : 
     424                 :     170845 : 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)
     428                 :            : 
     429                 :     170845 : 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)
     433                 :            : 
     434                 :     170845 : 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)
     438                 :            : 
     439                 :     170845 : 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)
     443                 :            : 
     444                 :            : #ifndef DEF_HSAIL_SAT_BUILTIN
     445                 :            : #define DEF_HSAIL_SAT_BUILTIN(ENUM, HSAIL_OPCODE, HSAIL_TYPE,   \
     446                 :            :                               NAME, TYPE, ATTRS)
     447                 :            : #endif
     448                 :            : 
     449                 :     170845 : 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)
     452                 :            : 
     453                 :     170845 : 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)
     456                 :            : 
     457                 :     170845 : 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)
     460                 :            : 
     461                 :     170845 : 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)
     464                 :            : 
     465                 :     170845 : 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)
     468                 :            : 
     469                 :     170845 : 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)
     472                 :            : 
     473                 :     170845 : 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)
     476                 :            : 
     477                 :     170845 : 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)
     480                 :            : 
     481                 :     170845 : 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)
     484                 :            : 
     485                 :     170845 : 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)
     488                 :            : 
     489                 :     170845 : 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)
     492                 :            : 
     493                 :     170845 : 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)
     496                 :            : 
     497                 :     170845 : 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)
     500                 :            : 
     501                 :     170845 : 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)
     504                 :            : 
     505                 :     170845 : 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)
     508                 :            : 
     509                 :     170845 : 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)
     512                 :            : 
     513                 :     170845 : 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)
     516                 :            : 
     517                 :     170845 : 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)
     520                 :            : 
     521                 :     170845 : 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)
     524                 :            : 
     525                 :     170845 : 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)
     528                 :            : 
     529                 :     170845 : 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)
     532                 :            : 
     533                 :     170845 : 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)
     536                 :            : 
     537                 :     170845 : 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)
     540                 :            : 
     541                 :     170845 : 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)
     544                 :            : 
     545                 :            : #ifndef DEF_HSAIL_INTR_BUILTIN
     546                 :            : #define DEF_HSAIL_INTR_BUILTIN(ENUM, NAME, TYPE, ATTRS)
     547                 :            : #endif
     548                 :            : 
     549                 :     170845 : DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_FTZ_F32_F16, "__hsail_ftz_f32_f16",
     550                 :            :                        BT_FN_FLOAT_FLOAT, ATTR_CONST_NOTHROW_LEAF_LIST)
     551                 :            : 
     552                 :     170845 : DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_FTZ_F32, "__hsail_ftz_f32",
     553                 :            :                        BT_FN_FLOAT_FLOAT, ATTR_CONST_NOTHROW_LEAF_LIST)
     554                 :            : 
     555                 :     170845 : DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_FTZ_F64, "__hsail_ftz_f64",
     556                 :            :                        BT_FN_DOUBLE_DOUBLE, ATTR_CONST_NOTHROW_LEAF_LIST)
     557                 :            : 
     558                 :     170845 : DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_PUSH_FRAME, "__hsail_alloca_push_frame",
     559                 :            :                        BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
     560                 :            : 
     561                 :     170845 : DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_POP_FRAME, "__hsail_alloca_pop_frame",
     562                 :            :                        BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
     563                 :            : 
     564                 :     170845 : DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_SETWORKITEMID, "__hsail_setworkitemid",
     565                 :            :                        BT_FN_VOID_UINT32_UINT32_PTR, ATTR_NOTHROW_LEAF_LIST)
     566                 :            : 
     567                 :     170845 : 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)
     570                 :            : 
     571                 :     170845 : DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_LAUNCH_KERNEL,
     572                 :            :                        "__hsail_launch_kernel",
     573                 :            :                        BT_FN_VOID_PTR_PTR_PTR, ATTR_NOTHROW_LEAF_LIST)
     574                 :            : 
     575                 :     170845 : DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_F32_TO_F16, "__hsail_f32_to_f16",
     576                 :            :                        BT_FN_UINT16_UINT32, ATTR_CONST_NOTHROW_LEAF_LIST)
     577                 :            : 
     578                 :     170845 : DEF_HSAIL_INTR_BUILTIN (BUILT_IN_HSAIL_F16_TO_F32, "__hsail_f16_to_f32",
     579                 :            :                        BT_FN_UINT32_UINT16, ATTR_CONST_NOTHROW_LEAF_LIST)
     580                 :            : 
     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
     585                 :            : 
     586                 :     170845 : 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)
     591                 :            : 
     592                 :     170845 : 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)
     596                 :            : 
     597                 :     170845 : 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)
     602                 :            : 
     603                 :     170845 : 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)
     608                 :            : 
     609                 :     170845 : 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)
     614                 :            : 
     615                 :     170845 : 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)
     619                 :            : 
     620                 :     170845 : 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)
     625                 :            : 
     626                 :     170845 : 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)
     630                 :            : 
     631                 :     170845 : 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)
     636                 :            : 
     637                 :     170845 : 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)
     641                 :            : 
     642                 :     170845 : 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)
     647                 :            : 
     648                 :     170845 : 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)
     653                 :            : 
     654                 :     170845 : 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)
     659                 :            : 
     660                 :     170845 : 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)
     664                 :            : 
     665                 :     170845 : 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)
     670                 :            : 
     671                 :     170845 : 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)

Generated by: LCOV version 1.0

LCOV profile is generated on x86_64 machine using following configure options: configure --disable-bootstrap --enable-coverage=opt --enable-languages=c,c++,fortran,go,jit,lto --enable-host-shared. GCC test suite is run with the built compiler.