--- /dev/null
+#define USE_LLRINT_BUILTIN 1
+#define USE_LLRINTF_BUILTIN 1
+#define USE_LLRINTL_BUILTIN 0
+#define USE_LLRINTF128_BUILTIN 0
--- /dev/null
+#define USE_LLROUND_BUILTIN 1
+#define USE_LLROUNDF_BUILTIN 1
+#define USE_LLROUNDL_BUILTIN 0
+#define USE_LLROUNDF128_BUILTIN 0
--- /dev/null
+#define USE_LRINT_BUILTIN 1
+#define USE_LRINTF_BUILTIN 1
+#define USE_LRINTL_BUILTIN 0
+#define USE_LRINTF128_BUILTIN 0
--- /dev/null
+#define USE_LROUND_BUILTIN 1
+#define USE_LROUNDF_BUILTIN 1
+#define USE_LROUNDL_BUILTIN 0
+#define USE_LROUNDF128_BUILTIN 0
--- /dev/null
+#define USE_ROUNDEVEN_BUILTIN 1
+#define USE_ROUNDEVENF_BUILTIN 1
+#define USE_ROUNDEVENL_BUILTIN 0
+#define USE_ROUNDEVENF128_BUILTIN 0
+++ /dev/null
-/* Copyright (C) 2011-2025 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <math.h>
-#include <math-barriers.h>
-#include <libm-alias-double.h>
-
-long long int
-__llrint (double x)
-{
- double r = __builtin_rint (x);
-
- /* Prevent gcc from calling llrint directly when compiled with
- -fno-math-errno by inserting a barrier. */
-
- math_opt_barrier (r);
- return r;
-}
-
-libm_alias_double (__llrint, llrint)
+++ /dev/null
-/* Copyright (C) 2011-2025 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <math.h>
-#include <math-barriers.h>
-#include <libm-alias-float.h>
-
-long long int
-__llrintf (float x)
-{
- float r = __builtin_rintf (x);
-
- /* Prevent gcc from calling llrintf directly when compiled with
- -fno-math-errno by inserting a barrier. */
-
-
- math_opt_barrier (r);
- return r;
-}
-
-libm_alias_float (__llrint, llrint)
+++ /dev/null
-/* Copyright (C) 2011-2025 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <math.h>
-#include <libm-alias-double.h>
-
-long long int
-__llround (double x)
-{
- return __builtin_llround (x);
-}
-
-libm_alias_double (__llround, llround)
+++ /dev/null
-/* Copyright (C) 2011-2025 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <math.h>
-#include <libm-alias-float.h>
-
-long long int
-__llroundf (float x)
-{
- return __builtin_llroundf (x);
-}
-
-libm_alias_float (__llround, llround)
+++ /dev/null
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <math.h>
-#include <get-rounding-mode.h>
-#include <stdint.h>
-#include <math-barriers.h>
-#include <libm-alias-double.h>
-
-long int
-__lrint (double x)
-{
- double r = __builtin_rint (x);
-
- /* Prevent gcc from calling lrint directly when compiled with
- -fno-math-errno by inserting a barrier. */
-
- math_opt_barrier (r);
- return r;
-}
-
-libm_alias_double (__lrint, lrint)
+++ /dev/null
-/* Copyright (C) 2011-2025 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <math.h>
-#include <math-barriers.h>
-#include <libm-alias-float.h>
-
-long int
-__lrintf (float x)
-{
- float r = __builtin_rintf (x);
-
- /* Prevent gcc from calling lrintf directly when compiled with
- -fno-math-errno by inserting a barrier. */
-
- math_opt_barrier (r);
- return r;
-}
-
-libm_alias_float (__lrint, lrint)
+++ /dev/null
-/* Copyright (C) 1996-2025 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <math.h>
-#include <libm-alias-double.h>
-
-long int
-__lround (double x)
- {
- return __builtin_lround (x);
- }
-
-libm_alias_double (__lround, lround)
+++ /dev/null
-/* Copyright (C) 2011-2025 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <math.h>
-#include <libm-alias-float.h>
-
-long int
-__lroundf (float x)
-{
- return __builtin_lroundf (x);
-}
-
-libm_alias_float (__lround, lround)
+++ /dev/null
-/* Copyright (C) 2021-2025 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#define NO_MATH_REDIRECT
-#include <math.h>
-#include <libm-alias-double.h>
-
-double
-__roundeven (double x)
-{
- asm volatile ("frintn \t%d0, %d1" : "=w" (x) : "w" (x));
- return x;
-}
-libm_alias_double (__roundeven, roundeven)
+++ /dev/null
-/* Copyright (C) 2021-2025 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#define NO_MATH_REDIRECT
-#include <math.h>
-#include <libm-alias-float.h>
-
-float
-__roundevenf (float x)
-{
- asm volatile ("frintn \t%s0, %s1" : "=w" (x) : "w" (x));
- return x;
-}
-libm_alias_float (__roundeven, roundeven)