[libc-commits] [libc] [libc] newhdrgen: updated sorting of guarded functions in fuction generation (PR #98241)
via libc-commits
libc-commits at lists.llvm.org
Wed Jul 10 14:32:16 PDT 2024
https://github.com/RoseZhang03 updated https://github.com/llvm/llvm-project/pull/98241
>From a0f229abf93c9a6da208e559ca227409e19ec683 Mon Sep 17 00:00:00 2001
From: Rose Zhang <rosezhang at google.com>
Date: Tue, 9 Jul 2024 23:17:32 +0000
Subject: [PATCH 1/6] [libc] newhdrgen: updated sorting of guarded functions in
fuction generation
In yaml_to_classes.py, changed order of adding functions so that guarded
functions appear after regular functions. Guarded functions will still
be alphabetically sorted within each guard. Each group of guarded
functions will appear in alphabetical order of the guard name.
Fixed issus in math.yaml such as missing guards.
Fixed Function class for spacing issues and the order in which
attributes are listed in the function header.
Deleted extra whitespace in the last line of unistd.yaml.
---
libc/include/math.h.def | 15 +
.../class_implementation/classes/function.py | 7 +-
libc/newhdrgen/header.py | 2 +-
libc/newhdrgen/tests/output/math.h | 847 +++++++++
libc/newhdrgen/yaml/math.yaml | 1589 ++++++++---------
libc/newhdrgen/yaml/unistd.yaml | 1 -
libc/newhdrgen/yaml_to_classes.py | 50 +-
7 files changed, 1690 insertions(+), 821 deletions(-)
create mode 100644 libc/newhdrgen/tests/output/math.h
diff --git a/libc/include/math.h.def b/libc/include/math.h.def
index 454b8f2980514..ca460e392ce4f 100644
--- a/libc/include/math.h.def
+++ b/libc/include/math.h.def
@@ -14,7 +14,22 @@
#include "llvm-libc-macros/math-macros.h"
#include "llvm-libc-types/float128.h"
+#if !defined(__LIBC_CONST_ATTR) && defined(__cplusplus) && defined(__GNUC__)
+#if __has_attribute(const)
+#define __LIBC_CONST_ATTR [[gnu::const]]
+#endif
+#endif
+#if !defined(__LIBC_CONST_ATTR) && defined(__GNUC__)
+#if __has_attribute(const)
+#define __LIBC_CONST_ATTR __attribute__((const))
+#endif
+#endif
+#if !defined(__LIBC_CONST_ATTR)
+#define __LIBC_CONST_ATTR
+#endif
%%public_api()
+#undef __LIBC_CONST_ATTR
+
#endif // LLVM_LIBC_MATH_H
diff --git a/libc/newhdrgen/class_implementation/classes/function.py b/libc/newhdrgen/class_implementation/classes/function.py
index c73fe8db6bb11..da26358e74506 100644
--- a/libc/newhdrgen/class_implementation/classes/function.py
+++ b/libc/newhdrgen/class_implementation/classes/function.py
@@ -23,9 +23,12 @@ def __init__(
self.attributes = attributes or ""
def __str__(self):
- attributes_str = self.attributes
+ attributes_str = " ".join(self.attributes)
arguments_str = ", ".join(self.arguments)
- result = f"{self.return_type} {self.name}({arguments_str}){attributes_str};"
+ if attributes_str == "":
+ result = f"{self.return_type} {self.name}({arguments_str}) __NOEXCEPT;"
+ else:
+ result = f"{attributes_str} {self.return_type} {self.name}({arguments_str}) __NOEXCEPT;"
if self.guard:
result = f"#ifdef {self.guard}\n{result}\n#endif // {self.guard}"
return result
diff --git a/libc/newhdrgen/header.py b/libc/newhdrgen/header.py
index 4eaf7dccca9e8..d9e9c68dfc5f4 100644
--- a/libc/newhdrgen/header.py
+++ b/libc/newhdrgen/header.py
@@ -62,6 +62,6 @@ def __str__(self):
content.append("")
for object in self.objects:
content.append(str(object))
- content.append("\n__END_C_DECLS")
+ content.append("__END_C_DECLS")
return "\n".join(content)
diff --git a/libc/newhdrgen/tests/output/math.h b/libc/newhdrgen/tests/output/math.h
new file mode 100644
index 0000000000000..3f9ebc5ff8dd1
--- /dev/null
+++ b/libc/newhdrgen/tests/output/math.h
@@ -0,0 +1,847 @@
+//===-- C standard library header math.h ----------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_MATH_H
+#define LLVM_LIBC_MATH_H
+
+#include "__llvm-libc-common.h"
+#include "llvm-libc-macros/float16-macros.h"
+#include "llvm-libc-macros/math-macros.h"
+#include "llvm-libc-types/float128.h"
+
+#if !defined(__LIBC_CONST_ATTR) && defined(__cplusplus) && defined(__GNUC__)
+#if __has_attribute(const)
+#define __LIBC_CONST_ATTR [[gnu::const]]
+#endif
+#endif
+#if !defined(__LIBC_CONST_ATTR) && defined(__GNUC__)
+#if __has_attribute(const)
+#define __LIBC_CONST_ATTR __attribute__((const))
+#endif
+#endif
+#if !defined(__LIBC_CONST_ATTR)
+#define __LIBC_CONST_ATTR
+#endif
+
+#include <llvm-libc-types/float_t.h>
+#include <llvm-libc-types/double_t.h>
+#include <llvm-libc-types/float128.h>
+
+__BEGIN_C_DECLS
+
+float acosf(float) __NOEXCEPT;
+
+float acoshf(float) __NOEXCEPT;
+
+double asin(double) __NOEXCEPT;
+
+float asinf(float) __NOEXCEPT;
+
+float asinhf(float) __NOEXCEPT;
+
+float atan2f(float, float) __NOEXCEPT;
+
+float atanf(float) __NOEXCEPT;
+
+float atanhf(float) __NOEXCEPT;
+
+int canonicalize(double, double) __NOEXCEPT;
+
+int canonicalizef(float, float) __NOEXCEPT;
+
+int canonicalizel(long double, long double) __NOEXCEPT;
+
+double ceil(double) __NOEXCEPT;
+
+float ceilf(float) __NOEXCEPT;
+
+long double ceill(long double) __NOEXCEPT;
+
+double copysign(double, double) __NOEXCEPT;
+
+float copysignf(float, float) __NOEXCEPT;
+
+long double copysignl(long double, long double) __NOEXCEPT;
+
+double cos(double) __NOEXCEPT;
+
+float cosf(float) __NOEXCEPT;
+
+float coshf(float) __NOEXCEPT;
+
+float erff(float) __NOEXCEPT;
+
+double exp(double) __NOEXCEPT;
+
+double exp10(double) __NOEXCEPT;
+
+float exp10f(float) __NOEXCEPT;
+
+double exp2(double) __NOEXCEPT;
+
+float exp2f(float) __NOEXCEPT;
+
+float exp2m1f(float) __NOEXCEPT;
+
+float expf(float) __NOEXCEPT;
+
+double expm1(double) __NOEXCEPT;
+
+float expm1f(float) __NOEXCEPT;
+
+__LIBC_CONST_ATTR double fabs(double) __NOEXCEPT;
+
+float fabsf(float) __NOEXCEPT;
+
+long double fabsl(long double) __NOEXCEPT;
+
+double fdim(double, double) __NOEXCEPT;
+
+float fdimf(float, float) __NOEXCEPT;
+
+long double fdiml(long double, long double) __NOEXCEPT;
+
+double floor(double) __NOEXCEPT;
+
+float floorf(float) __NOEXCEPT;
+
+long double floorl(long double) __NOEXCEPT;
+
+double fma(double, double, double) __NOEXCEPT;
+
+float fmaf(float, float, float) __NOEXCEPT;
+
+double fmax(double, double) __NOEXCEPT;
+
+float fmaxf(float, float) __NOEXCEPT;
+
+double fmaximum(double, double) __NOEXCEPT;
+
+double fmaximum_mag(double, double) __NOEXCEPT;
+
+double fmaximum_mag_num(double, double) __NOEXCEPT;
+
+float fmaximum_mag_numf(float, float) __NOEXCEPT;
+
+long double fmaximum_mag_numl(long double, long double) __NOEXCEPT;
+
+float fmaximum_magf(float, float) __NOEXCEPT;
+
+long double fmaximum_magl(long double, long double) __NOEXCEPT;
+
+double fmaximum_num(double, double) __NOEXCEPT;
+
+float fmaximum_numf(float, float) __NOEXCEPT;
+
+long double fmaximum_numl(long double, long double) __NOEXCEPT;
+
+float fmaximumf(float, float) __NOEXCEPT;
+
+long double fmaximuml(long double, long double) __NOEXCEPT;
+
+long double fmaxl(long double, long double) __NOEXCEPT;
+
+double fmin(double, double) __NOEXCEPT;
+
+float fminf(float, float) __NOEXCEPT;
+
+double fminimum(double, double) __NOEXCEPT;
+
+double fminimum_mag(double, double) __NOEXCEPT;
+
+double fminimum_mag_num(double, double) __NOEXCEPT;
+
+float fminimum_mag_numf(float, float) __NOEXCEPT;
+
+long double fminimum_mag_numl(long double, long double) __NOEXCEPT;
+
+float fminimum_magf(float, float) __NOEXCEPT;
+
+long double fminimum_magl(long double, long double) __NOEXCEPT;
+
+double fminimum_num(double, double) __NOEXCEPT;
+
+float fminimum_numf(float, float) __NOEXCEPT;
+
+float fminimumf(float, float) __NOEXCEPT;
+
+long double fminimuml(long double, long double) __NOEXCEPT;
+
+long double fminl(long double, long double) __NOEXCEPT;
+
+double fmod(double, double) __NOEXCEPT;
+
+float fmodf(float, float) __NOEXCEPT;
+
+long double fmodl(long double, long double) __NOEXCEPT;
+
+float fmul(double, double) __NOEXCEPT;
+
+double frexp(double, int *) __NOEXCEPT;
+
+float frexpf(float, int *) __NOEXCEPT;
+
+long double frexpl(long double, int *) __NOEXCEPT;
+
+double fromfp(double, int, unsigned int) __NOEXCEPT;
+
+float fromfpf(float, int, unsigned int) __NOEXCEPT;
+
+long double fromfpl(long double, int, unsigned int) __NOEXCEPT;
+
+double fromfpx(double, int, unsigned int) __NOEXCEPT;
+
+float fromfpxf(float, int, unsigned int) __NOEXCEPT;
+
+long double fromfpxl(long double, int, unsigned int) __NOEXCEPT;
+
+double hypot(double, double) __NOEXCEPT;
+
+float hypotf(float, float) __NOEXCEPT;
+
+int ilogb(double) __NOEXCEPT;
+
+int ilogbf(float) __NOEXCEPT;
+
+int ilogbl(long double) __NOEXCEPT;
+
+double ldexp(double, int) __NOEXCEPT;
+
+float ldexpf(float, int) __NOEXCEPT;
+
+long double ldexpl(long double, int) __NOEXCEPT;
+
+long llogb(double) __NOEXCEPT;
+
+long llogbf(float) __NOEXCEPT;
+
+long llogbl(long double) __NOEXCEPT;
+
+long long llrint(double) __NOEXCEPT;
+
+long long llrintf(float) __NOEXCEPT;
+
+long long llrintl(long double) __NOEXCEPT;
+
+long long llround(double) __NOEXCEPT;
+
+long long llroundf(float) __NOEXCEPT;
+
+long long llroundl(long double) __NOEXCEPT;
+
+double log(double) __NOEXCEPT;
+
+double log10(double) __NOEXCEPT;
+
+float log10f(float) __NOEXCEPT;
+
+double log1p(double) __NOEXCEPT;
+
+float log1pf(float) __NOEXCEPT;
+
+double log2(double) __NOEXCEPT;
+
+float log2f(float) __NOEXCEPT;
+
+double logb(double) __NOEXCEPT;
+
+float logbf(float) __NOEXCEPT;
+
+long double logbl(long double) __NOEXCEPT;
+
+float logf(float) __NOEXCEPT;
+
+long lrint(double) __NOEXCEPT;
+
+long lrintf(float) __NOEXCEPT;
+
+long lrintl(long double) __NOEXCEPT;
+
+long lround(double) __NOEXCEPT;
+
+long lroundf(float) __NOEXCEPT;
+
+long lroundl(long double) __NOEXCEPT;
+
+double modf(double, double *) __NOEXCEPT;
+
+float modff(float, float *) __NOEXCEPT;
+
+long double modfl(long double, long double *) __NOEXCEPT;
+
+double nan(const char *) __NOEXCEPT;
+
+float nanf(const char *) __NOEXCEPT;
+
+long double nanl(const char *) __NOEXCEPT;
+
+double nearbyint(double) __NOEXCEPT;
+
+float nearbyintf(float) __NOEXCEPT;
+
+long double nearbyintl(long double) __NOEXCEPT;
+
+double nextafter(double, double) __NOEXCEPT;
+
+float nextafterf(float, float) __NOEXCEPT;
+
+long double nextafterl(long double, long double) __NOEXCEPT;
+
+double nextdown(double) __NOEXCEPT;
+
+float nextdownf(float) __NOEXCEPT;
+
+long double nextdownl(long double) __NOEXCEPT;
+
+double nexttoward(double, long double) __NOEXCEPT;
+
+float nexttowardf(float, long double) __NOEXCEPT;
+
+long double nexttowardl(long double, long double) __NOEXCEPT;
+
+double nextup(double) __NOEXCEPT;
+
+float nextupf(float) __NOEXCEPT;
+
+long double nextupl(long double) __NOEXCEPT;
+
+double pow(double, double) __NOEXCEPT;
+
+float powf(float, float) __NOEXCEPT;
+
+double remainder(double, double) __NOEXCEPT;
+
+float remainderf(float, float) __NOEXCEPT;
+
+long double remainderl(long double, long double) __NOEXCEPT;
+
+double remquo(double, double, int *) __NOEXCEPT;
+
+float remquof(float, float, int *) __NOEXCEPT;
+
+long double remquol(long double, long double, int *) __NOEXCEPT;
+
+double rint(double) __NOEXCEPT;
+
+float rintf(float) __NOEXCEPT;
+
+long double rintl(long double) __NOEXCEPT;
+
+double round(double) __NOEXCEPT;
+
+double roundeven(double) __NOEXCEPT;
+
+float roundevenf(float) __NOEXCEPT;
+
+long double roundevenl(long double) __NOEXCEPT;
+
+float roundf(float) __NOEXCEPT;
+
+long double roundl(long double) __NOEXCEPT;
+
+double scalbn(double, int) __NOEXCEPT;
+
+float scalbnf(float, int) __NOEXCEPT;
+
+long double scalbnl(long double, int) __NOEXCEPT;
+
+double sin(double) __NOEXCEPT;
+
+void sincosf(float, float *, float *) __NOEXCEPT;
+
+float sinf(float) __NOEXCEPT;
+
+float sinhf(float) __NOEXCEPT;
+
+double sqrt(double) __NOEXCEPT;
+
+float sqrtf(float) __NOEXCEPT;
+
+long double sqrtl(long double) __NOEXCEPT;
+
+double tan(double) __NOEXCEPT;
+
+float tanf(float) __NOEXCEPT;
+
+float tanhf(float) __NOEXCEPT;
+
+double trunc(double) __NOEXCEPT;
+
+float truncf(float) __NOEXCEPT;
+
+long double truncl(long double) __NOEXCEPT;
+
+double ufromfp(double, int, unsigned int) __NOEXCEPT;
+
+float ufromfpf(float, int, unsigned int) __NOEXCEPT;
+
+long double ufromfpl(long double, int, unsigned int) __NOEXCEPT;
+
+double ufromfpx(double, int, unsigned int) __NOEXCEPT;
+
+float ufromfpxf(float, int, unsigned int) __NOEXCEPT;
+
+long double ufromfpxl(long double, int, unsigned int) __NOEXCEPT;
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+int canonicalizef128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 ceilf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 copysignf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fabsf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fdimf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 floorf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fmaxf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fmaximum_mag_numf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fmaximum_magf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fmaximum_numf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fmaximumf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fminf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fminimum_mag_numf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fminimum_magf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fminimum_numf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fminimumf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fmodf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 frexpf128(float128, int *) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fromfpf128(float128, int, unsigned int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 fromfpxf128(float128, int, unsigned int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+int ilogbf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 ldexpf128(float128, int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+long llogbf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+long long llrintf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+long long llroundf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 logbf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+long lrintf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+long lroundf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 modff128(float128, float128 *) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 nanf128(const char *) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 nearbyintf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 nextafterf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 nextdownf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 nextupf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 remquof128(float128, float128, int *) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 rintf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 roundevenf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 roundf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 scalbnf128(float128, int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 sqrtf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 truncf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 ufromfpf128(float128, int, unsigned int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT128
+float128 ufromfpxf128(float128, int, unsigned int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+int canonicalizef16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 ceilf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 copysignf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16add(double, double) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16addf(float, float) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16addl(long double, long double) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16div(double, double) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16divf(float, float) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16divl(long double, long double) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16fma(double, double, double) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16fmaf(float, float, float) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16fmal(long double, long double, long double) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16sqrt(double) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16sqrtf(float) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16sqrtl(long double) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16sub(double, double) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16subf(float, float) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 f16subl(long double, long double) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fabsf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fdimf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 floorf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fmaxf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fmaximum_mag_numf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fmaximum_magf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fmaximum_numf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fmaximumf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fminf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fminimum_mag_numf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fminimum_magf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fminimum_numf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fminimumf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fmodf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 frexpf16(_Float16, int *) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fromfpf16(_Float16, int, unsigned int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 fromfpxf16(_Float16, int, unsigned int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 getpayloadf16(_Float16 *) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+int ilogbf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 ldexpf16(_Float16, int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+long llogbf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+long long llrintf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+long long llroundf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 logbf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+long lrintf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+long lroundf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 modff16(_Float16, _Float16 *) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 nanf16(const char *) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 nearbyintf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 nextafterf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 nextdownf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 nexttowardf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 nextupf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 remainderf16(_Float16, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 remquof16(_Float16, _Float16, int *) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 rintf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 roundevenf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 roundf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 scalblnf16(_Float16, long) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 scalbnf16(_Float16, int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+int setpayloadf16(_Float16 *, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+int setpayloadsigf16(_Float16 *, _Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+int totalorderf16(_Float16 *, _Float16 *) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+int totalordermagf16(_Float16 *, _Float16 *) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 truncf16(_Float16) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 ufromfpf16(_Float16, int, unsigned int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+_Float16 ufromfpxf16(_Float16, int, unsigned int) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#ifdef LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+_Float16 f16addf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+_Float16 f16divf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+_Float16 f16fmaf128(float128, float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+_Float16 f16sqrtf128(float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+
+#ifdef LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+_Float16 f16subf128(float128, float128) __NOEXCEPT;
+#endif // LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+
+__END_C_DECLS
+
+#undef __LIBC_CONST_ATTR
+
+#endif // LLVM_LIBC_MATH_H
diff --git a/libc/newhdrgen/yaml/math.yaml b/libc/newhdrgen/yaml/math.yaml
index 18a49ad1c62c4..e9f46ead97bc6 100644
--- a/libc/newhdrgen/yaml/math.yaml
+++ b/libc/newhdrgen/yaml/math.yaml
@@ -28,22 +28,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: copysignf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: copysignf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: ceil
standards:
- stdc
@@ -62,20 +46,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: ceilf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: ceilf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fabs
standards:
- stdc
@@ -96,20 +66,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: fabsf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fabsf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fdim
standards:
- stdc
@@ -131,22 +87,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: fdimf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fdimf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: floor
standards:
- stdc
@@ -165,20 +105,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: floorf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: floorf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fmin
standards:
- stdc
@@ -200,21 +126,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: fminf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fminf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- name: fmax
standards:
- stdc
@@ -236,21 +147,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: fmaxf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fmaxf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- name: fmaximum
standards:
- stdc
@@ -272,22 +168,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: fmaximumf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fmaximumf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fmaximum_num
standards:
- stdc
@@ -309,22 +189,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: fmaximum_numf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fmaximum_numf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fmaximum_mag
standards:
- stdc
@@ -346,22 +210,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: fmaximum_magf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fmaximum_magf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fmaximum_mag_num
standards:
- stdc
@@ -383,22 +231,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: fmaximum_mag_numf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fmaximum_mag_numf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fminimum
standards:
- stdc
@@ -420,22 +252,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: fminimumf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fminimumf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fminimum_num
standards:
- stdc
@@ -450,29 +266,6 @@ functions:
arguments:
- type: float
- type: float
- - name: fminimum_numl
- standards:
- - stdc
- return_type: long double
- arguments:
- - type: long double
- - type: long double
- - name: fminimum_numf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fminimum_numf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fminimum_mag
standards:
- stdc
@@ -494,22 +287,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: fminimum_magf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fminimum_magf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fminimum_mag_num
standards:
- stdc
@@ -531,22 +308,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: fminimum_mag_numf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fminimum_mag_numf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fma
standards:
- stdc
@@ -563,79 +324,34 @@ functions:
- type: float
- type: float
- type: float
- - name: f16fma
+ - name: fmod
standards:
- stdc
- return_type: _Float16
+ return_type: double
arguments:
- type: double
- type: double
- - type: double
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16fmaf
+ - name: fmodf
standards:
- stdc
- return_type: _Float16
+ return_type: float
arguments:
- type: float
- type: float
- - type: float
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16fmal
+ - name: fmodl
standards:
- stdc
- return_type: _Float16
+ return_type: long double
arguments:
- type: long double
- type: long double
- - type: long double
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16fmaf128
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: float128
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
- - name: fmod
- standards:
+ - name: fmul
+ standards:
- stdc
- return_type: double
+ return_type: float
arguments:
- type: double
- type: double
- - name: fmodf
- standards:
- - stdc
- return_type: float
- arguments:
- - type: float
- - type: float
- - name: fmodl
- standards:
- - stdc
- return_type: long double
- arguments:
- - type: long double
- - type: long double
- - name: fmodf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT128
- - name: fmodf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: frexp
standards:
- stdc
@@ -657,22 +373,6 @@ functions:
arguments:
- type: long double
- type: int *
- - name: frexpf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: int *
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: frexpf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: int *
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fromfp
standards:
- stdc
@@ -697,24 +397,6 @@ functions:
- type: long double
- type: int
- type: unsigned int
- - name: fromfpf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: int
- - type: unsigned int
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fromfpf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: int
- - type: unsigned int
- guard: LIBC_TYPES_HAS_FLOAT128
- name: fromfpx
standards:
- stdc
@@ -739,24 +421,6 @@ functions:
- type: long double
- type: int
- type: unsigned int
- - name: fromfpxf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: int
- - type: unsigned int
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: fromfpxf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: int
- - type: unsigned int
- guard: LIBC_TYPES_HAS_FLOAT128
- name: ufromfp
standards:
- stdc
@@ -781,24 +445,6 @@ functions:
- type: long double
- type: int
- type: unsigned int
- - name: ufromfpf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: int
- - type: unsigned int
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: ufromfpf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: int
- - type: unsigned int
- guard: LIBC_TYPES_HAS_FLOAT128
- name: ufromfpx
standards:
- stdc
@@ -823,24 +469,6 @@ functions:
- type: long double
- type: int
- type: unsigned int
- - name: ufromfpxf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: int
- - type: unsigned int
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: ufromfpxf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: int
- - type: unsigned int
- guard: LIBC_TYPES_HAS_FLOAT128
- name: hypot
standards:
- stdc
@@ -873,20 +501,6 @@ functions:
return_type: int
arguments:
- type: long double
- - name: ilogbf16
- standards:
- - stdc
- return_type: int
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: ilogbf128
- standards:
- - stdc
- return_type: int
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: llogb
standards:
- stdc
@@ -905,20 +519,6 @@ functions:
return_type: long
arguments:
- type: long double
- - name: llogbf16
- standards:
- - stdc
- return_type: long
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: llogbf128
- standards:
- - stdc
- return_type: long
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: ldexp
standards:
- stdc
@@ -940,22 +540,6 @@ functions:
arguments:
- type: long double
- type: int
- - name: ldexpf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: int
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: ldexpf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: int
- guard: LIBC_TYPES_HAS_FLOAT128
- name: log10
standards:
- stdc
@@ -1004,30 +588,6 @@ functions:
return_type: float
arguments:
- type: float
- - name: log1p
- standards:
- - stdc
- return_type: double
- arguments:
- - type: double
- - name: log1pf
- standards:
- - stdc
- return_type: float
- arguments:
- - type: float
- - name: log2
- standards:
- - stdc
- return_type: double
- arguments:
- - type: double
- - name: log2f
- standards:
- - stdc
- return_type: float
- arguments:
- - type: float
- name: logb
standards:
- stdc
@@ -1046,20 +606,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: logbf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: logbf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: modf
standards:
- stdc
@@ -1081,22 +627,6 @@ functions:
arguments:
- type: long double
- type: long double *
- - name: modff16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16 *
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: modff128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128 *
- guard: LIBC_TYPES_HAS_FLOAT128
- name: cos
standards:
- stdc
@@ -1222,14 +752,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: remainderf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- name: remquo
standards:
- stdc
@@ -1254,24 +776,6 @@ functions:
- type: long double
- type: long double
- type: int *
- - name: remquof16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- - type: int *
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: remquof128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- - type: int *
- guard: LIBC_TYPES_HAS_FLOAT128
- name: round
standards:
- stdc
@@ -1290,20 +794,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: roundf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: roundf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: roundeven
standards:
- stdc
@@ -1322,20 +812,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: roundevenf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: roundevenf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: lround
standards:
- stdc
@@ -1354,52 +830,24 @@ functions:
return_type: long
arguments:
- type: long double
- - name: lroundf16
- standards:
- - stdc
- return_type: long
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: lroundf128
- standards:
- - stdc
- return_type: long
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: llround
standards:
- stdc
- return_type: Longlong
+ return_type: long long
arguments:
- type: double
- name: llroundf
standards:
- stdc
- return_type: Longlong
+ return_type: long long
arguments:
- type: float
- name: llroundl
standards:
- stdc
- return_type: Longlong
+ return_type: long long
arguments:
- type: long double
- - name: llroundf16
- standards:
- - stdc
- return_type: Longlong
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: llroundf128
- standards:
- - stdc
- return_type: Longlong
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: rint
standards:
- stdc
@@ -1418,20 +866,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: rintf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: rintf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: lrint
standards:
- stdc
@@ -1450,52 +884,24 @@ functions:
return_type: long
arguments:
- type: long double
- - name: lrintf16
- standards:
- - stdc
- return_type: long
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: lrintf128
- standards:
- - stdc
- return_type: long
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: llrint
standards:
- stdc
- return_type: Longlong
+ return_type: long long
arguments:
- type: double
- name: llrintf
standards:
- stdc
- return_type: Longlong
+ return_type: long long
arguments:
- type: float
- name: llrintl
standards:
- stdc
- return_type: Longlong
+ return_type: long long
arguments:
- type: long double
- - name: llrintf16
- standards:
- - stdc
- return_type: Longlong
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: llrintf128
- standards:
- - stdc
- return_type: Longlong
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: sqrt
standards:
- stdc
@@ -1514,13 +920,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: sqrtf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: trunc
standards:
- stdc
@@ -1539,20 +938,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: truncf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: truncf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: nearbyint
standards:
- stdc
@@ -1571,20 +956,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: nearbyintf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: nearbyintf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: nextafterf
standards:
- stdc
@@ -1606,22 +977,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: nextafterf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: nextafterf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: nexttowardf
standards:
- stdc
@@ -1643,14 +998,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: nexttowardf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- name: nextdown
standards:
- stdc
@@ -1669,20 +1016,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: nextdownf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: nextdownf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: nextup
standards:
- stdc
@@ -1701,20 +1034,6 @@ functions:
return_type: long double
arguments:
- type: long double
- - name: nextupf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: nextupf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT128
- name: powf
standards:
- stdc
@@ -1796,14 +1115,6 @@ functions:
return_type: float
arguments:
- type: float
- - name: scalblnf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: long
- guard: LIBC_TYPES_HAS_FLOAT16
- name: scalbn
standards:
- stdc
@@ -1825,21 +1136,6 @@ functions:
arguments:
- type: long double
- type: int
- - name: scalbnf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: _Float16
- - type: int
- - name: scalbnf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: float128
- - type: int
- guard: LIBC_TYPES_HAS_FLOAT128
- name: nanf
standards:
- stdc
@@ -1858,20 +1154,6 @@ functions:
return_type: long double
arguments:
- type: const char *
- - name: nanf16
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: const char *
- guard: LIBC_TYPES_HAS_FLOAT16
- - name: nanf128
- standards:
- - stdc
- return_type: float128
- arguments:
- - type: const char *
- guard: LIBC_TYPES_HAS_FLOAT128
- name: canonicalize
standards:
- stdc
@@ -1893,14 +1175,6 @@ functions:
arguments:
- type: long double
- type: long double
- - name: canonicalizef16
- standards:
- - stdc
- return_type: int
- arguments:
- - type: _Float16
- - type: _Float16
- guard: LIBC_TYPES_HAS_FLOAT16
- name: canonicalizef128
standards:
- stdc
@@ -1909,124 +1183,126 @@ functions:
- type: float128
- type: float128
guard: LIBC_TYPES_HAS_FLOAT128
- - name: totalorderf16
+ - name: canonicalizef16
standards:
- stdc
return_type: int
arguments:
- - type: _Float16 *
- - type: _Float16 *
+ - type: _Float16
+ - type: _Float16
guard: LIBC_TYPES_HAS_FLOAT16
- - name: totalordermagf16
+ - name: ceilf16
standards:
- stdc
- return_type: int
+ return_type: _Float16
arguments:
- - type: _Float16 *
- - type: _Float16 *
+ - type: _Float16
guard: LIBC_TYPES_HAS_FLOAT16
- - name: getpayloadf16
+ - name: copysignf16
standards:
- stdc
return_type: _Float16
arguments:
- - type: _Float16 *
+ - type: _Float16
+ - type: _Float16
guard: LIBC_TYPES_HAS_FLOAT16
- - name: setpayloadf16
+ - name: f16add
standards:
- - stdc
- return_type: int
+ - llvm_libc_ext
+ return_type: _Float16
arguments:
- - type: _Float16 *
- - type: _Float16
+ - type: double
+ - type: double
guard: LIBC_TYPES_HAS_FLOAT16
- - name: setpayloadsigf16
+ - name: f16addf
standards:
- - stdc
- return_type: int
+ - llvm_libc_ext
+ return_type: _Float16
arguments:
- - type: _Float16 *
- - type: _Float16
+ - type: float
+ - type: float
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16addf128
+ - name: f16addl
standards:
- - stdc
+ - llvm_libc_ext
return_type: _Float16
arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
- - name: f16subf128
+ - type: long double
+ - type: long double
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: f16div
standards:
- - stdc
+ - llvm_libc_ext
return_type: _Float16
arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
- - name: f16sqrtf
- standards:
+ - type: double
+ - type: double
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: f16divf
+ standards:
- llvm_libc_ext
return_type: _Float16
arguments:
- type: float
+ - type: float
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16sqrtf128
+ - name: f16divl
standards:
- llvm_libc_ext
return_type: _Float16
arguments:
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
- - name: f16add
+ - type: long double
+ - type: long double
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: f16fma
standards:
- - llvm_libc_ext
+ - stdc
return_type: _Float16
arguments:
- type: double
- type: double
+ - type: double
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16addf
+ - name: f16fmaf
standards:
- - llvm_libc_ext
+ - stdc
return_type: _Float16
arguments:
- type: float
- type: float
+ - type: float
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16addl
+ - name: f16fmal
standards:
- - llvm_libc_ext
+ - stdc
return_type: _Float16
arguments:
- type: long double
- type: long double
+ - type: long double
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16sub
+ - name: f16sqrt
standards:
- llvm_libc_ext
return_type: _Float16
arguments:
- type: double
- - type: double
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16subf
+ - name: f16sqrtf
standards:
- llvm_libc_ext
return_type: _Float16
arguments:
- type: float
- - type: float
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16subl
+ - name: f16sqrtl
standards:
- llvm_libc_ext
return_type: _Float16
arguments:
- type: long double
- - type: long double
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16div
+ - name: f16sub
standards:
- llvm_libc_ext
return_type: _Float16
@@ -2034,23 +1310,15 @@ functions:
- type: double
- type: double
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16divf
- standards:
+ - name: f16subf
+ standards:
- llvm_libc_ext
return_type: _Float16
arguments:
- type: float
- type: float
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16divf128
- standards:
- - stdc
- return_type: _Float16
- arguments:
- - type: float128
- - type: float128
- guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
- - name: f16divl
+ - name: f16subl
standards:
- llvm_libc_ext
return_type: _Float16
@@ -2058,17 +1326,728 @@ functions:
- type: long double
- type: long double
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16sqrt
+ - name: fabsf16
standards:
- - llvm_libc_ext
+ - stdc
return_type: _Float16
arguments:
- - type: double
+ - type: _Float16
guard: LIBC_TYPES_HAS_FLOAT16
- - name: f16sqrtl
+ - name: fdimf16
standards:
- - llvm_libc_ext
+ - stdc
return_type: _Float16
arguments:
- - type: long double
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: floorf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fmaxf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fmaximum_mag_numf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fmaximum_magf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fmaximum_numf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fmaximumf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fminf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fminimum_mag_numf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fminimum_magf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fminimum_numf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fminimumf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fmodf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: frexpf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: int *
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fromfpf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: int
+ - type: unsigned int
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: fromfpxf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: int
+ - type: unsigned int
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: getpayloadf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16 *
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: ilogbf16
+ standards:
+ - stdc
+ return_type: int
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: ldexpf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: int
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: llogbf16
+ standards:
+ - stdc
+ return_type: long
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: llrintf16
+ standards:
+ - stdc
+ return_type: long long
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: llroundf16
+ standards:
+ - stdc
+ return_type: long long
+ arguments:
+ - type: _Float16
guard: LIBC_TYPES_HAS_FLOAT16
+ - name: logbf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: lrintf16
+ standards:
+ - stdc
+ return_type: long
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: lroundf16
+ standards:
+ - stdc
+ return_type: long
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: modff16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16 *
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: nanf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: const char *
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: nearbyintf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: nextafterf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: nextdownf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: nexttowardf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: nextupf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: remainderf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: remquof16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: _Float16
+ - type: int *
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: rintf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: roundevenf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: roundf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: scalblnf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: long
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: scalbnf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: int
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: setpayloadf16
+ standards:
+ - stdc
+ return_type: int
+ arguments:
+ - type: _Float16 *
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: setpayloadsigf16
+ standards:
+ - stdc
+ return_type: int
+ arguments:
+ - type: _Float16 *
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: totalorderf16
+ standards:
+ - stdc
+ return_type: int
+ arguments:
+ - type: _Float16 *
+ - type: _Float16 *
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: totalordermagf16
+ standards:
+ - stdc
+ return_type: int
+ arguments:
+ - type: _Float16 *
+ - type: _Float16 *
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: truncf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: ufromfpf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: int
+ - type: unsigned int
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: ufromfpxf16
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: _Float16
+ - type: int
+ - type: unsigned int
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: f16addf128
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+ - name: f16divf128
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+ - name: f16fmaf128
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: float128
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+ - name: f16sqrtf128
+ standards:
+ - llvm_libc_ext
+ return_type: _Float16
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+ - name: f16subf128
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+ - name: ceilf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: copysignf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fabsf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fdimf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: floorf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fmaxf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fmaximum_mag_numf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fmaximum_magf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fmaximum_numf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fmaximumf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fminf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fminimum_mag_numf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fminimum_magf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fminimum_numf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fminimumf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fmodf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: frexpf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: int *
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fromfpf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: int
+ - type: unsigned int
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fromfpxf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: int
+ - type: unsigned int
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: ilogbf128
+ standards:
+ - stdc
+ return_type: int
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: ldexpf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: int
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: llogbf128
+ standards:
+ - stdc
+ return_type: long
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: llrintf128
+ standards:
+ - stdc
+ return_type: long long
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: llroundf128
+ standards:
+ - stdc
+ return_type: long long
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: logbf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: lrintf128
+ standards:
+ - stdc
+ return_type: long
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: lroundf128
+ standards:
+ - stdc
+ return_type: long
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: modff128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128 *
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: nanf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: const char *
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: nearbyintf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: nextafterf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: nextdownf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: nextupf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: remquof128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: float128
+ - type: int *
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: rintf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: roundevenf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: roundf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: scalbnf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: int
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: sqrtf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: truncf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: ufromfpf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: int
+ - type: unsigned int
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: ufromfpxf128
+ standards:
+ - stdc
+ return_type: float128
+ arguments:
+ - type: float128
+ - type: int
+ - type: unsigned int
+ guard: LIBC_TYPES_HAS_FLOAT128
diff --git a/libc/newhdrgen/yaml/unistd.yaml b/libc/newhdrgen/yaml/unistd.yaml
index 94b1368531657..c698c6b1d64ef 100644
--- a/libc/newhdrgen/yaml/unistd.yaml
+++ b/libc/newhdrgen/yaml/unistd.yaml
@@ -307,4 +307,3 @@ functions:
- type: const void *__restrict
- type: void *
- type: ssize_t
-
\ No newline at end of file
diff --git a/libc/newhdrgen/yaml_to_classes.py b/libc/newhdrgen/yaml_to_classes.py
index 9e0337f4a308e..caf2a1d4fd129 100644
--- a/libc/newhdrgen/yaml_to_classes.py
+++ b/libc/newhdrgen/yaml_to_classes.py
@@ -48,21 +48,47 @@ def yaml_to_classes(yaml_data):
functions = yaml_data.get("functions", [])
sorted_functions = sorted(functions, key=lambda x: x["name"])
+ guards = []
+ guarded_function_dict = {}
for function_data in sorted_functions:
- arguments = [arg["type"] for arg in function_data["arguments"]]
guard = function_data.get("guard", None)
- attributes = function_data.get("attributes", None)
- standards = function_data.get("standards", None)
- header.add_function(
- Function(
- function_data["return_type"],
- function_data["name"],
- arguments,
- standards,
- guard,
- attributes,
+ if guard == None:
+ arguments = [arg["type"] for arg in function_data["arguments"]]
+ attributes = function_data.get("attributes", None)
+ standards = function_data.get("standards", None)
+ header.add_function(
+ Function(
+ function_data["return_type"],
+ function_data["name"],
+ arguments,
+ standards,
+ guard,
+ attributes,
+ )
+ )
+ else:
+ if guard not in guards:
+ guards.append(guard)
+ guarded_function_dict[guard] = []
+ guarded_function_dict[guard].append(function_data)
+ else:
+ guarded_function_dict[guard].append(function_data)
+ sorted_guards = sorted(guards)
+ for guard in sorted_guards:
+ for function_data in guarded_function_dict[guard]:
+ arguments = [arg["type"] for arg in function_data["arguments"]]
+ attributes = function_data.get("attributes", None)
+ standards = function_data.get("standards", None)
+ header.add_function(
+ Function(
+ function_data["return_type"],
+ function_data["name"],
+ arguments,
+ standards,
+ guard,
+ attributes,
+ )
)
- )
for object_data in yaml_data.get("objects", []):
header.add_object(
>From bde25f58191651f053467f7d887e969596d8304d Mon Sep 17 00:00:00 2001
From: Rose Zhang <rosezhang at google.com>
Date: Tue, 9 Jul 2024 23:40:53 +0000
Subject: [PATCH 2/6] added alphabetical sorting for types
---
libc/newhdrgen/tests/output/math.h | 2 +-
libc/newhdrgen/yaml_to_classes.py | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libc/newhdrgen/tests/output/math.h b/libc/newhdrgen/tests/output/math.h
index 3f9ebc5ff8dd1..6e144e99fd6d0 100644
--- a/libc/newhdrgen/tests/output/math.h
+++ b/libc/newhdrgen/tests/output/math.h
@@ -28,9 +28,9 @@
#define __LIBC_CONST_ATTR
#endif
-#include <llvm-libc-types/float_t.h>
#include <llvm-libc-types/double_t.h>
#include <llvm-libc-types/float128.h>
+#include <llvm-libc-types/float_t.h>
__BEGIN_C_DECLS
diff --git a/libc/newhdrgen/yaml_to_classes.py b/libc/newhdrgen/yaml_to_classes.py
index caf2a1d4fd129..8186d403ac5ab 100644
--- a/libc/newhdrgen/yaml_to_classes.py
+++ b/libc/newhdrgen/yaml_to_classes.py
@@ -38,7 +38,9 @@ def yaml_to_classes(yaml_data):
for macro_data in yaml_data.get("macros", []):
header.add_macro(Macro(macro_data["macro_name"], macro_data["macro_value"]))
- for type_data in yaml_data.get("types", []):
+ types = yaml_data.get("types", [])
+ sorted_types = sorted(types, key=lambda x: x["type_name"])
+ for type_data in sorted_types:
header.add_type(Type(type_data["type_name"]))
for enum_data in yaml_data.get("enums", []):
>From 04e447aa7d120192634cfa5740b327772efdbc47 Mon Sep 17 00:00:00 2001
From: Rose Zhang <rosezhang at google.com>
Date: Tue, 9 Jul 2024 23:44:38 +0000
Subject: [PATCH 3/6] deleted functional attributes from math.h.def
---
libc/include/math.h.def | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/libc/include/math.h.def b/libc/include/math.h.def
index ca460e392ce4f..454b8f2980514 100644
--- a/libc/include/math.h.def
+++ b/libc/include/math.h.def
@@ -14,22 +14,7 @@
#include "llvm-libc-macros/math-macros.h"
#include "llvm-libc-types/float128.h"
-#if !defined(__LIBC_CONST_ATTR) && defined(__cplusplus) && defined(__GNUC__)
-#if __has_attribute(const)
-#define __LIBC_CONST_ATTR [[gnu::const]]
-#endif
-#endif
-#if !defined(__LIBC_CONST_ATTR) && defined(__GNUC__)
-#if __has_attribute(const)
-#define __LIBC_CONST_ATTR __attribute__((const))
-#endif
-#endif
-#if !defined(__LIBC_CONST_ATTR)
-#define __LIBC_CONST_ATTR
-#endif
%%public_api()
-#undef __LIBC_CONST_ATTR
-
#endif // LLVM_LIBC_MATH_H
>From 2b6235720b9593b86874a1eb6d690794d386f42b Mon Sep 17 00:00:00 2001
From: Rose Zhang <rosezhang at google.com>
Date: Tue, 9 Jul 2024 23:56:59 +0000
Subject: [PATCH 4/6] deleted math.h output
---
libc/newhdrgen/tests/output/math.h | 847 -----------------------------
1 file changed, 847 deletions(-)
delete mode 100644 libc/newhdrgen/tests/output/math.h
diff --git a/libc/newhdrgen/tests/output/math.h b/libc/newhdrgen/tests/output/math.h
deleted file mode 100644
index 6e144e99fd6d0..0000000000000
--- a/libc/newhdrgen/tests/output/math.h
+++ /dev/null
@@ -1,847 +0,0 @@
-//===-- C standard library header math.h ----------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_MATH_H
-#define LLVM_LIBC_MATH_H
-
-#include "__llvm-libc-common.h"
-#include "llvm-libc-macros/float16-macros.h"
-#include "llvm-libc-macros/math-macros.h"
-#include "llvm-libc-types/float128.h"
-
-#if !defined(__LIBC_CONST_ATTR) && defined(__cplusplus) && defined(__GNUC__)
-#if __has_attribute(const)
-#define __LIBC_CONST_ATTR [[gnu::const]]
-#endif
-#endif
-#if !defined(__LIBC_CONST_ATTR) && defined(__GNUC__)
-#if __has_attribute(const)
-#define __LIBC_CONST_ATTR __attribute__((const))
-#endif
-#endif
-#if !defined(__LIBC_CONST_ATTR)
-#define __LIBC_CONST_ATTR
-#endif
-
-#include <llvm-libc-types/double_t.h>
-#include <llvm-libc-types/float128.h>
-#include <llvm-libc-types/float_t.h>
-
-__BEGIN_C_DECLS
-
-float acosf(float) __NOEXCEPT;
-
-float acoshf(float) __NOEXCEPT;
-
-double asin(double) __NOEXCEPT;
-
-float asinf(float) __NOEXCEPT;
-
-float asinhf(float) __NOEXCEPT;
-
-float atan2f(float, float) __NOEXCEPT;
-
-float atanf(float) __NOEXCEPT;
-
-float atanhf(float) __NOEXCEPT;
-
-int canonicalize(double, double) __NOEXCEPT;
-
-int canonicalizef(float, float) __NOEXCEPT;
-
-int canonicalizel(long double, long double) __NOEXCEPT;
-
-double ceil(double) __NOEXCEPT;
-
-float ceilf(float) __NOEXCEPT;
-
-long double ceill(long double) __NOEXCEPT;
-
-double copysign(double, double) __NOEXCEPT;
-
-float copysignf(float, float) __NOEXCEPT;
-
-long double copysignl(long double, long double) __NOEXCEPT;
-
-double cos(double) __NOEXCEPT;
-
-float cosf(float) __NOEXCEPT;
-
-float coshf(float) __NOEXCEPT;
-
-float erff(float) __NOEXCEPT;
-
-double exp(double) __NOEXCEPT;
-
-double exp10(double) __NOEXCEPT;
-
-float exp10f(float) __NOEXCEPT;
-
-double exp2(double) __NOEXCEPT;
-
-float exp2f(float) __NOEXCEPT;
-
-float exp2m1f(float) __NOEXCEPT;
-
-float expf(float) __NOEXCEPT;
-
-double expm1(double) __NOEXCEPT;
-
-float expm1f(float) __NOEXCEPT;
-
-__LIBC_CONST_ATTR double fabs(double) __NOEXCEPT;
-
-float fabsf(float) __NOEXCEPT;
-
-long double fabsl(long double) __NOEXCEPT;
-
-double fdim(double, double) __NOEXCEPT;
-
-float fdimf(float, float) __NOEXCEPT;
-
-long double fdiml(long double, long double) __NOEXCEPT;
-
-double floor(double) __NOEXCEPT;
-
-float floorf(float) __NOEXCEPT;
-
-long double floorl(long double) __NOEXCEPT;
-
-double fma(double, double, double) __NOEXCEPT;
-
-float fmaf(float, float, float) __NOEXCEPT;
-
-double fmax(double, double) __NOEXCEPT;
-
-float fmaxf(float, float) __NOEXCEPT;
-
-double fmaximum(double, double) __NOEXCEPT;
-
-double fmaximum_mag(double, double) __NOEXCEPT;
-
-double fmaximum_mag_num(double, double) __NOEXCEPT;
-
-float fmaximum_mag_numf(float, float) __NOEXCEPT;
-
-long double fmaximum_mag_numl(long double, long double) __NOEXCEPT;
-
-float fmaximum_magf(float, float) __NOEXCEPT;
-
-long double fmaximum_magl(long double, long double) __NOEXCEPT;
-
-double fmaximum_num(double, double) __NOEXCEPT;
-
-float fmaximum_numf(float, float) __NOEXCEPT;
-
-long double fmaximum_numl(long double, long double) __NOEXCEPT;
-
-float fmaximumf(float, float) __NOEXCEPT;
-
-long double fmaximuml(long double, long double) __NOEXCEPT;
-
-long double fmaxl(long double, long double) __NOEXCEPT;
-
-double fmin(double, double) __NOEXCEPT;
-
-float fminf(float, float) __NOEXCEPT;
-
-double fminimum(double, double) __NOEXCEPT;
-
-double fminimum_mag(double, double) __NOEXCEPT;
-
-double fminimum_mag_num(double, double) __NOEXCEPT;
-
-float fminimum_mag_numf(float, float) __NOEXCEPT;
-
-long double fminimum_mag_numl(long double, long double) __NOEXCEPT;
-
-float fminimum_magf(float, float) __NOEXCEPT;
-
-long double fminimum_magl(long double, long double) __NOEXCEPT;
-
-double fminimum_num(double, double) __NOEXCEPT;
-
-float fminimum_numf(float, float) __NOEXCEPT;
-
-float fminimumf(float, float) __NOEXCEPT;
-
-long double fminimuml(long double, long double) __NOEXCEPT;
-
-long double fminl(long double, long double) __NOEXCEPT;
-
-double fmod(double, double) __NOEXCEPT;
-
-float fmodf(float, float) __NOEXCEPT;
-
-long double fmodl(long double, long double) __NOEXCEPT;
-
-float fmul(double, double) __NOEXCEPT;
-
-double frexp(double, int *) __NOEXCEPT;
-
-float frexpf(float, int *) __NOEXCEPT;
-
-long double frexpl(long double, int *) __NOEXCEPT;
-
-double fromfp(double, int, unsigned int) __NOEXCEPT;
-
-float fromfpf(float, int, unsigned int) __NOEXCEPT;
-
-long double fromfpl(long double, int, unsigned int) __NOEXCEPT;
-
-double fromfpx(double, int, unsigned int) __NOEXCEPT;
-
-float fromfpxf(float, int, unsigned int) __NOEXCEPT;
-
-long double fromfpxl(long double, int, unsigned int) __NOEXCEPT;
-
-double hypot(double, double) __NOEXCEPT;
-
-float hypotf(float, float) __NOEXCEPT;
-
-int ilogb(double) __NOEXCEPT;
-
-int ilogbf(float) __NOEXCEPT;
-
-int ilogbl(long double) __NOEXCEPT;
-
-double ldexp(double, int) __NOEXCEPT;
-
-float ldexpf(float, int) __NOEXCEPT;
-
-long double ldexpl(long double, int) __NOEXCEPT;
-
-long llogb(double) __NOEXCEPT;
-
-long llogbf(float) __NOEXCEPT;
-
-long llogbl(long double) __NOEXCEPT;
-
-long long llrint(double) __NOEXCEPT;
-
-long long llrintf(float) __NOEXCEPT;
-
-long long llrintl(long double) __NOEXCEPT;
-
-long long llround(double) __NOEXCEPT;
-
-long long llroundf(float) __NOEXCEPT;
-
-long long llroundl(long double) __NOEXCEPT;
-
-double log(double) __NOEXCEPT;
-
-double log10(double) __NOEXCEPT;
-
-float log10f(float) __NOEXCEPT;
-
-double log1p(double) __NOEXCEPT;
-
-float log1pf(float) __NOEXCEPT;
-
-double log2(double) __NOEXCEPT;
-
-float log2f(float) __NOEXCEPT;
-
-double logb(double) __NOEXCEPT;
-
-float logbf(float) __NOEXCEPT;
-
-long double logbl(long double) __NOEXCEPT;
-
-float logf(float) __NOEXCEPT;
-
-long lrint(double) __NOEXCEPT;
-
-long lrintf(float) __NOEXCEPT;
-
-long lrintl(long double) __NOEXCEPT;
-
-long lround(double) __NOEXCEPT;
-
-long lroundf(float) __NOEXCEPT;
-
-long lroundl(long double) __NOEXCEPT;
-
-double modf(double, double *) __NOEXCEPT;
-
-float modff(float, float *) __NOEXCEPT;
-
-long double modfl(long double, long double *) __NOEXCEPT;
-
-double nan(const char *) __NOEXCEPT;
-
-float nanf(const char *) __NOEXCEPT;
-
-long double nanl(const char *) __NOEXCEPT;
-
-double nearbyint(double) __NOEXCEPT;
-
-float nearbyintf(float) __NOEXCEPT;
-
-long double nearbyintl(long double) __NOEXCEPT;
-
-double nextafter(double, double) __NOEXCEPT;
-
-float nextafterf(float, float) __NOEXCEPT;
-
-long double nextafterl(long double, long double) __NOEXCEPT;
-
-double nextdown(double) __NOEXCEPT;
-
-float nextdownf(float) __NOEXCEPT;
-
-long double nextdownl(long double) __NOEXCEPT;
-
-double nexttoward(double, long double) __NOEXCEPT;
-
-float nexttowardf(float, long double) __NOEXCEPT;
-
-long double nexttowardl(long double, long double) __NOEXCEPT;
-
-double nextup(double) __NOEXCEPT;
-
-float nextupf(float) __NOEXCEPT;
-
-long double nextupl(long double) __NOEXCEPT;
-
-double pow(double, double) __NOEXCEPT;
-
-float powf(float, float) __NOEXCEPT;
-
-double remainder(double, double) __NOEXCEPT;
-
-float remainderf(float, float) __NOEXCEPT;
-
-long double remainderl(long double, long double) __NOEXCEPT;
-
-double remquo(double, double, int *) __NOEXCEPT;
-
-float remquof(float, float, int *) __NOEXCEPT;
-
-long double remquol(long double, long double, int *) __NOEXCEPT;
-
-double rint(double) __NOEXCEPT;
-
-float rintf(float) __NOEXCEPT;
-
-long double rintl(long double) __NOEXCEPT;
-
-double round(double) __NOEXCEPT;
-
-double roundeven(double) __NOEXCEPT;
-
-float roundevenf(float) __NOEXCEPT;
-
-long double roundevenl(long double) __NOEXCEPT;
-
-float roundf(float) __NOEXCEPT;
-
-long double roundl(long double) __NOEXCEPT;
-
-double scalbn(double, int) __NOEXCEPT;
-
-float scalbnf(float, int) __NOEXCEPT;
-
-long double scalbnl(long double, int) __NOEXCEPT;
-
-double sin(double) __NOEXCEPT;
-
-void sincosf(float, float *, float *) __NOEXCEPT;
-
-float sinf(float) __NOEXCEPT;
-
-float sinhf(float) __NOEXCEPT;
-
-double sqrt(double) __NOEXCEPT;
-
-float sqrtf(float) __NOEXCEPT;
-
-long double sqrtl(long double) __NOEXCEPT;
-
-double tan(double) __NOEXCEPT;
-
-float tanf(float) __NOEXCEPT;
-
-float tanhf(float) __NOEXCEPT;
-
-double trunc(double) __NOEXCEPT;
-
-float truncf(float) __NOEXCEPT;
-
-long double truncl(long double) __NOEXCEPT;
-
-double ufromfp(double, int, unsigned int) __NOEXCEPT;
-
-float ufromfpf(float, int, unsigned int) __NOEXCEPT;
-
-long double ufromfpl(long double, int, unsigned int) __NOEXCEPT;
-
-double ufromfpx(double, int, unsigned int) __NOEXCEPT;
-
-float ufromfpxf(float, int, unsigned int) __NOEXCEPT;
-
-long double ufromfpxl(long double, int, unsigned int) __NOEXCEPT;
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-int canonicalizef128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 ceilf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 copysignf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fabsf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fdimf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 floorf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fmaxf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fmaximum_mag_numf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fmaximum_magf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fmaximum_numf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fmaximumf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fminf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fminimum_mag_numf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fminimum_magf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fminimum_numf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fminimumf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fmodf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 frexpf128(float128, int *) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fromfpf128(float128, int, unsigned int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 fromfpxf128(float128, int, unsigned int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-int ilogbf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 ldexpf128(float128, int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-long llogbf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-long long llrintf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-long long llroundf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 logbf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-long lrintf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-long lroundf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 modff128(float128, float128 *) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 nanf128(const char *) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 nearbyintf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 nextafterf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 nextdownf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 nextupf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 remquof128(float128, float128, int *) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 rintf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 roundevenf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 roundf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 scalbnf128(float128, int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 sqrtf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 truncf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 ufromfpf128(float128, int, unsigned int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT128
-float128 ufromfpxf128(float128, int, unsigned int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-int canonicalizef16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 ceilf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 copysignf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16add(double, double) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16addf(float, float) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16addl(long double, long double) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16div(double, double) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16divf(float, float) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16divl(long double, long double) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16fma(double, double, double) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16fmaf(float, float, float) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16fmal(long double, long double, long double) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16sqrt(double) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16sqrtf(float) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16sqrtl(long double) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16sub(double, double) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16subf(float, float) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 f16subl(long double, long double) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fabsf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fdimf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 floorf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fmaxf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fmaximum_mag_numf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fmaximum_magf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fmaximum_numf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fmaximumf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fminf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fminimum_mag_numf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fminimum_magf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fminimum_numf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fminimumf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fmodf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 frexpf16(_Float16, int *) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fromfpf16(_Float16, int, unsigned int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 fromfpxf16(_Float16, int, unsigned int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 getpayloadf16(_Float16 *) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-int ilogbf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 ldexpf16(_Float16, int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-long llogbf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-long long llrintf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-long long llroundf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 logbf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-long lrintf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-long lroundf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 modff16(_Float16, _Float16 *) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 nanf16(const char *) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 nearbyintf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 nextafterf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 nextdownf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 nexttowardf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 nextupf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 remainderf16(_Float16, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 remquof16(_Float16, _Float16, int *) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 rintf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 roundevenf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 roundf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 scalblnf16(_Float16, long) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 scalbnf16(_Float16, int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-int setpayloadf16(_Float16 *, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-int setpayloadsigf16(_Float16 *, _Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-int totalorderf16(_Float16 *, _Float16 *) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-int totalordermagf16(_Float16 *, _Float16 *) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 truncf16(_Float16) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 ufromfpf16(_Float16, int, unsigned int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16
-_Float16 ufromfpxf16(_Float16, int, unsigned int) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16
-
-#ifdef LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
-_Float16 f16addf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
-_Float16 f16divf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
-_Float16 f16fmaf128(float128, float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
-_Float16 f16sqrtf128(float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
-
-#ifdef LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
-_Float16 f16subf128(float128, float128) __NOEXCEPT;
-#endif // LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
-
-__END_C_DECLS
-
-#undef __LIBC_CONST_ATTR
-
-#endif // LLVM_LIBC_MATH_H
>From b0470b6d7fc36ad111e46fa27746f068c00d403b Mon Sep 17 00:00:00 2001
From: Rose Zhang <rosezhang at google.com>
Date: Wed, 10 Jul 2024 21:19:58 +0000
Subject: [PATCH 5/6] updated yaml files with changed in .td files
---
libc/newhdrgen/yaml/dlfcn.yaml | 39 +++++++++++++++++++++++++++
libc/newhdrgen/yaml/math.yaml | 42 +++++++++++++++++++++++++++---
libc/newhdrgen/yaml/sys_prctl.yaml | 13 +++++++--
3 files changed, 89 insertions(+), 5 deletions(-)
create mode 100644 libc/newhdrgen/yaml/dlfcn.yaml
diff --git a/libc/newhdrgen/yaml/dlfcn.yaml b/libc/newhdrgen/yaml/dlfcn.yaml
new file mode 100644
index 0000000000000..7912336d57d22
--- /dev/null
+++ b/libc/newhdrgen/yaml/dlfcn.yaml
@@ -0,0 +1,39 @@
+header: dlfcn.h
+macros:
+ - macro_name: RTLD_LAZY
+ macro_value: null
+ - macro_name: RTLD_NOW
+ macro_value: null
+ - macro_name: RTLD_GLOBAL
+ macro_value: null
+ - macro_name: RTLD_LOCAL
+ macro_value: null
+types: []
+enums: []
+objects: []
+functions:
+ - name: dlclose
+ standards:
+ - POSIX
+ return_type: int
+ arguments:
+ - type: void *
+ - name: dlerror
+ standards:
+ - POSIX
+ return_type: char *
+ arguments: []
+ - name: dlopen
+ standards:
+ - POSIX
+ return_type: void *
+ arguments:
+ - type: const char *
+ - type: int
+ - name: dlsym
+ standards:
+ - POSIX
+ return_type: void *
+ arguments:
+ - type: void *__restrict
+ - type: const char *__restrict
\ No newline at end of file
diff --git a/libc/newhdrgen/yaml/math.yaml b/libc/newhdrgen/yaml/math.yaml
index e9f46ead97bc6..5afde59b6b558 100644
--- a/libc/newhdrgen/yaml/math.yaml
+++ b/libc/newhdrgen/yaml/math.yaml
@@ -7,6 +7,12 @@ types:
enums: []
objects: []
functions:
+ - name: cbrtf
+ standards:
+ - stdc
+ return_type: float
+ arguments:
+ - type: float
- name: copysign
standards:
- stdc
@@ -501,6 +507,24 @@ functions:
return_type: int
arguments:
- type: long double
+ - name: isnan
+ standards:
+ - BSDExtensions
+ return_type: int
+ arguments:
+ - type: double
+ - name: isnanf
+ standards:
+ - BSDExtensions
+ return_type: int
+ arguments:
+ - type: float
+ - name: isnanl
+ standards:
+ - BSDExtensions
+ return_type: int
+ arguments:
+ - type: long double
- name: llogb
standards:
- stdc
@@ -1048,6 +1072,18 @@ functions:
arguments:
- type: double
- type: double
+ - name: powi
+ standards: llvm_libc_ext
+ return_type: double
+ arguments:
+ - type: double
+ - type: int
+ - name: powif
+ standards: llvm_libc_ext
+ return_type: float
+ arguments:
+ - type: float
+ - type: int
- name: coshf
standards:
- stdc
@@ -1256,7 +1292,7 @@ functions:
guard: LIBC_TYPES_HAS_FLOAT16
- name: f16fma
standards:
- - stdc
+ - llvm_libc_ext
return_type: _Float16
arguments:
- type: double
@@ -1265,7 +1301,7 @@ functions:
guard: LIBC_TYPES_HAS_FLOAT16
- name: f16fmaf
standards:
- - stdc
+ - llvm_libc_ext
return_type: _Float16
arguments:
- type: float
@@ -1274,7 +1310,7 @@ functions:
guard: LIBC_TYPES_HAS_FLOAT16
- name: f16fmal
standards:
- - stdc
+ - llvm_libc_ext
return_type: _Float16
arguments:
- type: long double
diff --git a/libc/newhdrgen/yaml/sys_prctl.yaml b/libc/newhdrgen/yaml/sys_prctl.yaml
index 35289f6274e7a..82374be87d5d0 100644
--- a/libc/newhdrgen/yaml/sys_prctl.yaml
+++ b/libc/newhdrgen/yaml/sys_prctl.yaml
@@ -1,7 +1,16 @@
header: sys-prctl.h
-standards: Linux
macros: []
types: []
enums: []
objects: []
-functions: []
+functions:
+ - name: prctl
+ standards:
+ - Linux
+ return_type: int
+ arguments:
+ - type: int
+ - type: unsigned long
+ - type: unsigned long
+ - type: unsigned long
+ - type: unsigned long
>From edf376f107dc2b0eba899aab13fee956b0ba9220 Mon Sep 17 00:00:00 2001
From: Rose Zhang <rosezhang at google.com>
Date: Wed, 10 Jul 2024 21:31:58 +0000
Subject: [PATCH 6/6] added alphabetical sorting for objects and added newline
at end of dlfcn
---
libc/newhdrgen/yaml/dlfcn.yaml | 2 +-
libc/newhdrgen/yaml_to_classes.py | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libc/newhdrgen/yaml/dlfcn.yaml b/libc/newhdrgen/yaml/dlfcn.yaml
index 7912336d57d22..725ee705714a7 100644
--- a/libc/newhdrgen/yaml/dlfcn.yaml
+++ b/libc/newhdrgen/yaml/dlfcn.yaml
@@ -36,4 +36,4 @@ functions:
return_type: void *
arguments:
- type: void *__restrict
- - type: const char *__restrict
\ No newline at end of file
+ - type: const char *__restrict
diff --git a/libc/newhdrgen/yaml_to_classes.py b/libc/newhdrgen/yaml_to_classes.py
index 8186d403ac5ab..6bccda8e03640 100644
--- a/libc/newhdrgen/yaml_to_classes.py
+++ b/libc/newhdrgen/yaml_to_classes.py
@@ -92,7 +92,9 @@ def yaml_to_classes(yaml_data):
)
)
- for object_data in yaml_data.get("objects", []):
+ objects = yaml_data.get("objects", [])
+ sorted_objects = sorted(objects, key=lambda x: x["object_name"])
+ for object_data in sorted_objects:
header.add_object(
Object(object_data["object_name"], object_data["object_type"])
)
More information about the libc-commits
mailing list