summaryrefslogtreecommitdiffstats
path: root/include/clang/AST/Builtins.def
blob: 671c4bd6cd4a3d40bc95a6ef8aae3a4ac0d6e226 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
//===--- Builtins.def - Builtin function info database ----------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the standard builtin function database.  Users of this file
// must define the BUILTIN macro to make use of this information.
//
//===----------------------------------------------------------------------===//

// FIXME: this needs to be the full list supported by GCC.  Right now, I'm just
// adding stuff on demand.
//
// FIXME: This should really be a .td file, but that requires modifying tblgen.
// Perhaps tblgen should have plugins.

// The first value provided to the macro specifies the function name of the
// builtin, and results in a clang::builtin::BIXX enum value for XX.

// The second value provided to the macro specifies the type of the function
// (result value, then each argument) as follows:
//  v -> void
//  b -> boolean
//  c -> char
//  s -> short
//  i -> int
//  f -> float
//  d -> double
//  z -> size_t
//  F -> constant CFString
//  a -> __builtin_va_list
//  A -> "reference" to __builtin_va_list
//  V -> Vector, following num elements and a base type.
//  P -> FILE
//  . -> "...".  This may only occur at the end of the function list.
//
// Types maybe prefixed with the following modifiers:
//  L   -> long (e.g. Li for 'long int')
//  LL  -> long long
//  LLL -> __int128_t (e.g. LLLi)
//  S   -> signed
//  U   -> unsigned
//
// Types may be postfixed with the following modifiers:
// * -> pointer
// & -> reference
// C -> const

// The third value provided to the macro specifies information about attributes
// of the function.  These must be kept in sync with the predicates in the
// Builtin::Context class.  Currently we have:
//  n -> nothrow
//  c -> const
//  F -> this is a libc/libm function with a '__builtin_' prefix added.
//  f -> this is a libc/libm function without the '__builtin_' prefix. It can
//       be followed by ':headername:' to state which header this function
//       comes from.
//  p:N: -> this is a printf-like function whose Nth argument is the format 
//          string.
//  P:N: -> similar to the p:N: attribute, but the function is like vprintf
//          in that it accepts its arguments as a va_list rather than 
//          through an ellipsis
//  e -> const, but only when -fmath-errno=0
//  FIXME: gcc has nonnull

#if defined(BUILTIN) && !defined(LIBBUILTIN)
#  define LIBBUILTIN(ID, TYPE, ATTRS, HEADER) BUILTIN(ID, TYPE, ATTRS)
#endif

// Standard libc/libm functions:
BUILTIN(__builtin_huge_val, "d", "nc")
BUILTIN(__builtin_huge_valf, "f", "nc")
BUILTIN(__builtin_huge_vall, "Ld", "nc")
BUILTIN(__builtin_inf  , "d"   , "nc")
BUILTIN(__builtin_inff , "f"   , "nc")
BUILTIN(__builtin_infl , "Ld"  , "nc")
BUILTIN(__builtin_nan,  "dcC*" , "ncF")
BUILTIN(__builtin_nanf, "fcC*" , "ncF")
BUILTIN(__builtin_nanl, "LdcC*", "ncF")
BUILTIN(__builtin_nans,  "dcC*" , "ncF")
BUILTIN(__builtin_nansf, "fcC*" , "ncF")
BUILTIN(__builtin_nansl, "LdcC*", "ncF")
BUILTIN(__builtin_abs  , "ii"  , "ncF")
BUILTIN(__builtin_fabs , "dd"  , "ncF")
BUILTIN(__builtin_fabsf, "ff"  , "ncF")
BUILTIN(__builtin_fabsl, "LdLd", "ncF")
BUILTIN(__builtin_copysign, "ddd", "ncF")
BUILTIN(__builtin_copysignf, "fff", "ncF")
BUILTIN(__builtin_copysignl, "LdLdLd", "ncF")
BUILTIN(__builtin_powi , "ddi"  , "nc")
BUILTIN(__builtin_powif, "ffi"  , "nc")
BUILTIN(__builtin_powil, "LdLdi", "nc")

// FP Comparisons.
BUILTIN(__builtin_isgreater     , "i.", "nc")
BUILTIN(__builtin_isgreaterequal, "i.", "nc")
BUILTIN(__builtin_isless        , "i.", "nc")
BUILTIN(__builtin_islessequal   , "i.", "nc")
BUILTIN(__builtin_islessgreater , "i.", "nc")
BUILTIN(__builtin_isunordered   , "i.", "nc")

// Builtins for arithmetic.
BUILTIN(__builtin_clz  , "iUi"  , "nc")
BUILTIN(__builtin_clzl , "iULi" , "nc")
BUILTIN(__builtin_clzll, "iULLi", "nc")
// TODO: int clzimax(uintmax_t)
BUILTIN(__builtin_ctz  , "iUi"  , "nc")
BUILTIN(__builtin_ctzl , "iULi" , "nc")
BUILTIN(__builtin_ctzll, "iULLi", "nc")
// TODO: int ctzimax(uintmax_t)
BUILTIN(__builtin_ffs  , "iUi"  , "nc")
BUILTIN(__builtin_ffsl , "iULi" , "nc")
BUILTIN(__builtin_ffsll, "iULLi", "nc")
BUILTIN(__builtin_parity  , "iUi"  , "nc")
BUILTIN(__builtin_parityl , "iULi" , "nc")
BUILTIN(__builtin_parityll, "iULLi", "nc")
BUILTIN(__builtin_popcount  , "iUi"  , "nc")
BUILTIN(__builtin_popcountl , "iULi" , "nc")
BUILTIN(__builtin_popcountll, "iULLi", "nc")

// FIXME: These type signatures are not correct for targets with int != 32-bits
// or with ULL != 64-bits.
BUILTIN(__builtin_bswap32, "UiUi", "nc")
BUILTIN(__builtin_bswap64, "ULLiULLi", "nc")

// Random GCC builtins
BUILTIN(__builtin_constant_p, "Us.", "nc")
BUILTIN(__builtin_classify_type, "i.", "nc")
BUILTIN(__builtin___CFStringMakeConstantString, "FC*cC*", "nc")
BUILTIN(__builtin_va_start, "vA.", "n")
BUILTIN(__builtin_va_end, "vA", "n")
BUILTIN(__builtin_va_copy, "vAA", "n")
BUILTIN(__builtin_stdarg_start, "vA.", "n")
BUILTIN(__builtin_bcmp, "iv*v*z", "n")
BUILTIN(__builtin_bcopy, "vv*v*z", "n")
BUILTIN(__builtin_bzero, "vv*z", "n")
BUILTIN(__builtin_memcmp, "ivC*vC*z", "nF")
BUILTIN(__builtin_memcpy, "v*v*vC*z", "nF")
BUILTIN(__builtin_memmove, "v*v*vC*z", "nF")
BUILTIN(__builtin_mempcpy, "v*v*vC*z", "nF")
BUILTIN(__builtin_memset, "v*v*iz", "nF")
BUILTIN(__builtin_stpcpy, "c*c*cC*", "nF")
BUILTIN(__builtin_stpncpy, "c*c*cC*z", "nF")
BUILTIN(__builtin_strcasecmp, "icC*cC*", "nF")
BUILTIN(__builtin_strcat, "c*c*cC*", "nF")
BUILTIN(__builtin_strchr, "c*cC*i", "nF")
BUILTIN(__builtin_strcmp, "icC*cC*", "nF")
BUILTIN(__builtin_strcpy, "c*c*cC*", "nF")
BUILTIN(__builtin_strcspn, "zcC*cC*", "nF")
BUILTIN(__builtin_strdup, "c*cC*", "nF")
BUILTIN(__builtin_strlen, "zcC*", "nF")
BUILTIN(__builtin_strncasecmp, "icC*cC*z", "nF")
BUILTIN(__builtin_strncat, "c*c*cC*z", "nF")
BUILTIN(__builtin_strncmp, "icC*cC*z", "nF")
BUILTIN(__builtin_strncpy, "c*c*cC*z", "nF")
BUILTIN(__builtin_strndup, "c*cC*z", "nF")
BUILTIN(__builtin_strpbrk, "c*cC*cC*", "nF")
BUILTIN(__builtin_strrchr, "c*cC*i", "nF")
BUILTIN(__builtin_strspn, "zcC*cC*", "nF")
BUILTIN(__builtin_strstr, "c*cC*cC*", "nF")
BUILTIN(__builtin_return_address, "v*Ui", "n")
BUILTIN(__builtin_extract_return_addr, "v*v*", "n")
BUILTIN(__builtin_frame_address, "v*Ui", "n")
BUILTIN(__builtin_flt_rounds, "i", "nc")
BUILTIN(__builtin_setjmp, "iv**", "")
BUILTIN(__builtin_longjmp, "vv**i", "")
BUILTIN(__builtin_unwind_init, "v", "")

// GCC Object size checking builtins
BUILTIN(__builtin_object_size, "zv*i", "n")
BUILTIN(__builtin___memcpy_chk, "v*v*vC*zz", "nF")
BUILTIN(__builtin___memmove_chk, "v*v*vC*zz", "nF")
BUILTIN(__builtin___mempcpy_chk, "v*v*vC*zz", "nF")
BUILTIN(__builtin___memset_chk, "v*v*izz", "nF")
BUILTIN(__builtin___stpcpy_chk, "c*c*cC*z", "nF")
BUILTIN(__builtin___strcat_chk, "c*c*cC*z", "nF")
BUILTIN(__builtin___strcpy_chk, "c*c*cC*z", "nF")
BUILTIN(__builtin___strncat_chk, "c*c*cC*zz", "nF")
BUILTIN(__builtin___strncpy_chk, "c*c*cC*zz", "nF")
BUILTIN(__builtin___snprintf_chk, "ic*zizcC*.", "Fp:4:")
BUILTIN(__builtin___sprintf_chk, "ic*izcC*.", "Fp:3:")
BUILTIN(__builtin___vsnprintf_chk, "ic*zizcC*a", "FP:4:")
BUILTIN(__builtin___vsprintf_chk, "ic*izcC*a", "FP:3:")
BUILTIN(__builtin___fprintf_chk, "iP*icC*.", "Fp:2:")
BUILTIN(__builtin___printf_chk, "iicC*.", "Fp:1:")
BUILTIN(__builtin___vfprintf_chk, "iP*icC*a", "FP:2:")
BUILTIN(__builtin___vprintf_chk, "iicC*a", "FP:1:")

BUILTIN(__builtin_expect, "iii"   , "nc")
BUILTIN(__builtin_prefetch, "vvC*.", "nc")
BUILTIN(__builtin_trap, "v", "n")

BUILTIN(__builtin_shufflevector, "v."   , "nc")

BUILTIN(__builtin_alloca, "v*z"   , "n")

// "Overloaded" Atomic operator builtins.  These are overloaded to support data
// types of i8, i16, i32, i64, and i128.  The front-end sees calls to the
// non-suffixed version of these (which has a bogus type) and transforms them to
// the right overloaded version in Sema (plus casts).

// FIXME: These assume that char -> i8, short -> i16, int -> i32,
// long long -> i64.

BUILTIN(__sync_fetch_and_add, "v.", "")
BUILTIN(__sync_fetch_and_add_1, "cc*c.", "n")
BUILTIN(__sync_fetch_and_add_2, "ss*s.", "n")
BUILTIN(__sync_fetch_and_add_4, "ii*i.", "n")
BUILTIN(__sync_fetch_and_add_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_fetch_and_add_16, "LLLiLLLi*LLLi.", "n")

BUILTIN(__sync_fetch_and_sub, "v.", "")
BUILTIN(__sync_fetch_and_sub_1, "cc*c.", "n")
BUILTIN(__sync_fetch_and_sub_2, "ss*s.", "n")
BUILTIN(__sync_fetch_and_sub_4, "ii*i.", "n")
BUILTIN(__sync_fetch_and_sub_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_fetch_and_sub_16, "LLLiLLLi*LLLi.", "n")

BUILTIN(__sync_fetch_and_or, "v.", "")
BUILTIN(__sync_fetch_and_or_1, "cc*c.", "n")
BUILTIN(__sync_fetch_and_or_2, "ss*s.", "n")
BUILTIN(__sync_fetch_and_or_4, "ii*i.", "n")
BUILTIN(__sync_fetch_and_or_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_fetch_and_or_16, "LLLiLLLi*LLLi.", "n")

BUILTIN(__sync_fetch_and_and, "v.", "")
BUILTIN(__sync_fetch_and_and_1, "cc*c.", "n")
BUILTIN(__sync_fetch_and_and_2, "ss*s.", "n")
BUILTIN(__sync_fetch_and_and_4, "ii*i.", "n")
BUILTIN(__sync_fetch_and_and_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_fetch_and_and_16, "LLLiLLLi*LLLi.", "n")

BUILTIN(__sync_fetch_and_xor, "v.", "")
BUILTIN(__sync_fetch_and_xor_1, "cc*c.", "n")
BUILTIN(__sync_fetch_and_xor_2, "ss*s.", "n")
BUILTIN(__sync_fetch_and_xor_4, "ii*i.", "n")
BUILTIN(__sync_fetch_and_xor_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_fetch_and_xor_16, "LLLiLLLi*LLLi.", "n")

BUILTIN(__sync_fetch_and_nand, "v.", "")
BUILTIN(__sync_fetch_and_nand_1, "cc*c.", "n")
BUILTIN(__sync_fetch_and_nand_2, "ss*s.", "n")
BUILTIN(__sync_fetch_and_nand_4, "ii*i.", "n")
BUILTIN(__sync_fetch_and_nand_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_fetch_and_nand_16, "LLLiLLLi*LLLi.", "n")


BUILTIN(__sync_add_and_fetch, "v.", "")
BUILTIN(__sync_add_and_fetch_1, "cc*c.", "n")
BUILTIN(__sync_add_and_fetch_2, "ss*s.", "n")
BUILTIN(__sync_add_and_fetch_4, "ii*i.", "n")
BUILTIN(__sync_add_and_fetch_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_add_and_fetch_16, "LLLiLLLi*LLLi.", "n")

BUILTIN(__sync_sub_and_fetch, "v.", "")
BUILTIN(__sync_sub_and_fetch_1, "cc*c.", "n")
BUILTIN(__sync_sub_and_fetch_2, "ss*s.", "n")
BUILTIN(__sync_sub_and_fetch_4, "ii*i.", "n")
BUILTIN(__sync_sub_and_fetch_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_sub_and_fetch_16, "LLLiLLLi*LLLi.", "n")

BUILTIN(__sync_or_and_fetch, "v.", "")
BUILTIN(__sync_or_and_fetch_1, "cc*c.", "n")
BUILTIN(__sync_or_and_fetch_2, "ss*s.", "n")
BUILTIN(__sync_or_and_fetch_4, "ii*i.", "n")
BUILTIN(__sync_or_and_fetch_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_or_and_fetch_16, "LLLiLLLi*LLLi.", "n")

BUILTIN(__sync_and_and_fetch, "v.", "")
BUILTIN(__sync_and_and_fetch_1, "cc*c.", "n")
BUILTIN(__sync_and_and_fetch_2, "ss*s.", "n")
BUILTIN(__sync_and_and_fetch_4, "ii*i.", "n")
BUILTIN(__sync_and_and_fetch_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_and_and_fetch_16, "LLLiLLLi*LLLi.", "n")

BUILTIN(__sync_xor_and_fetch, "v.", "")
BUILTIN(__sync_xor_and_fetch_1, "cc*c.", "n")
BUILTIN(__sync_xor_and_fetch_2, "ss*s.", "n")
BUILTIN(__sync_xor_and_fetch_4, "ii*i.", "n")
BUILTIN(__sync_xor_and_fetch_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_xor_and_fetch_16, "LLLiLLLi*LLLi.", "n")

BUILTIN(__sync_nand_and_fetch, "v.", "")
BUILTIN(__sync_nand_and_fetch_1, "cc*c.", "n")
BUILTIN(__sync_nand_and_fetch_2, "ss*s.", "n")
BUILTIN(__sync_nand_and_fetch_4, "ii*i.", "n")
BUILTIN(__sync_nand_and_fetch_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_nand_and_fetch_16, "LLLiLLLi*LLLi.", "n")


BUILTIN(__sync_bool_compare_and_swap, "v.", "")
BUILTIN(__sync_bool_compare_and_swap_1, "bc*cc.", "n")
BUILTIN(__sync_bool_compare_and_swap_2, "bs*ss.", "n")
BUILTIN(__sync_bool_compare_and_swap_4, "bi*ii.", "n")
BUILTIN(__sync_bool_compare_and_swap_8, "bLLi*LLi.", "n")
BUILTIN(__sync_bool_compare_and_swap_16, "bLLLi*LLLiLLLi.", "n")

BUILTIN(__sync_val_compare_and_swap, "v.", "")
BUILTIN(__sync_val_compare_and_swap_1, "cc*cc.", "n")
BUILTIN(__sync_val_compare_and_swap_2, "ss*ss.", "n")
BUILTIN(__sync_val_compare_and_swap_4, "ii*ii.", "n")
BUILTIN(__sync_val_compare_and_swap_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_val_compare_and_swap_16, "LLLiLLLi*LLLiLLLi.", "n")

BUILTIN(__sync_lock_test_and_set, "v.", "")
BUILTIN(__sync_lock_test_and_set_1, "cc*c.", "n")
BUILTIN(__sync_lock_test_and_set_2, "ss*s.", "n")
BUILTIN(__sync_lock_test_and_set_4, "ii*i.", "n")
BUILTIN(__sync_lock_test_and_set_8, "LLiLLi*LLi.", "n")
BUILTIN(__sync_lock_test_and_set_16, "LLLiLLLi*LLLi.", "n")

BUILTIN(__sync_lock_release, "v.", "")
BUILTIN(__sync_lock_release_1, "vc*.", "n")
BUILTIN(__sync_lock_release_2, "vs*.", "n")
BUILTIN(__sync_lock_release_4, "vi*.", "n")
BUILTIN(__sync_lock_release_8, "vLLi*.", "n")
BUILTIN(__sync_lock_release_16, "vLLLi*.", "n")



// Non-overloaded atomic builtins.
BUILTIN(__sync_synchronize, "v.", "n")
// LLVM instruction builtin [Clang extension].
BUILTIN(__builtin_llvm_memory_barrier,"vbbbbb", "n")
// GCC does not support these, they are a Clang extension.
BUILTIN(__sync_fetch_and_min, "ii*i", "n")
BUILTIN(__sync_fetch_and_max, "ii*i", "n")
BUILTIN(__sync_fetch_and_umin, "UiUi*Ui", "n")
BUILTIN(__sync_fetch_and_umax, "UiUi*Ui", "n")

// Builtin library functions
LIBBUILTIN(alloca, "v*z",         "f",     "stdlib.h")
LIBBUILTIN(calloc, "v*zz",        "f",     "stdlib.h")
LIBBUILTIN(malloc, "v*z",         "f",     "stdlib.h")
LIBBUILTIN(realloc, "v*v*z",      "f",     "stdlib.h")
LIBBUILTIN(memcpy, "v*v*vC*z",    "f",     "string.h")
LIBBUILTIN(memmove, "v*v*vC*z",   "f",     "string.h")
LIBBUILTIN(memset, "v*v*iz",      "f",     "string.h")
LIBBUILTIN(strcat, "c*c*cC*",     "f",     "string.h")
LIBBUILTIN(strchr, "c*cC*i",      "f",     "string.h")
LIBBUILTIN(strcpy, "c*c*cC*",     "f",     "string.h")
LIBBUILTIN(strcspn, "zcC*cC*",    "f",     "string.h")
LIBBUILTIN(strlen, "zcC*",        "f",     "string.h")
LIBBUILTIN(strncat, "c*c*cC*z",   "f",     "string.h")
LIBBUILTIN(strncpy, "c*c*cC*z",   "f",     "string.h")
LIBBUILTIN(strpbrk, "c*cC*cC*",   "f",     "string.h")
LIBBUILTIN(strrchr, "c*cC*i",     "f",     "string.h")
LIBBUILTIN(strspn, "zcC*cC*",     "f",     "string.h")
LIBBUILTIN(strstr, "c*cC*cC*",    "f",     "string.h")
LIBBUILTIN(printf, "icC*.",       "fp:0:", "stdio.h")
LIBBUILTIN(fprintf, "iP*cC*.",    "fp:1:", "stdio.h")
LIBBUILTIN(snprintf, "ic*zcC*.",  "fp:2:", "stdio.h")
LIBBUILTIN(sprintf, "ic*cC*.",    "fp:1:", "stdio.h")
LIBBUILTIN(vprintf, "icC*a",      "fP:0:", "stdio.h")
LIBBUILTIN(vfprintf, "iP*cC*a",   "fP:1:", "stdio.h")
LIBBUILTIN(vsnprintf, "ic*zcC*a", "fP:2:", "stdio.h")
LIBBUILTIN(vsprintf, "ic*cC*a",   "fP:1:", "stdio.h")

// FIXME: This type isn't very correct, it should be
//   id objc_msgSend(id, SEL)
// but we need new type letters for that.
LIBBUILTIN(objc_msgSend, "v*.",   "f",     "objc/message.h")

// FIXME: asprintf and vasprintf aren't C99 functions. Should they be
// target-specific builtins, perhaps? 

// Builtin math library functions
LIBBUILTIN(pow, "ddd", "fe", "math.h")
LIBBUILTIN(powl, "LdLdLd", "fe", "math.h")
LIBBUILTIN(powf, "fff", "fe", "math.h")

LIBBUILTIN(sqrt, "dd", "fe", "math.h")
LIBBUILTIN(sqrtl, "LdLd", "fe", "math.h")
LIBBUILTIN(sqrtf, "ff", "fe", "math.h")

LIBBUILTIN(sin, "dd", "fe", "math.h")
LIBBUILTIN(sinl, "LdLd", "fe", "math.h")
LIBBUILTIN(sinf, "ff", "fe", "math.h")

LIBBUILTIN(cos, "dd", "fe", "math.h")
LIBBUILTIN(cosl, "LdLd", "fe", "math.h")
LIBBUILTIN(cosf, "ff", "fe", "math.h")

#undef BUILTIN
#undef LIBBUILTIN
OpenPOWER on IntegriCloud