public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] LoongArch: Add soft floating-point fe* function implementations.
@ 2024-03-26 12:46 caiyinyu
  2024-03-26 17:34 ` Joseph Myers
  0 siblings, 1 reply; 16+ messages in thread
From: caiyinyu @ 2024-03-26 12:46 UTC (permalink / raw)
  To: libc-alpha; +Cc: adhemerval.zanella, xry111, caiyinyu

This patch accomplishes the following:
1. Implements soft floating-point functions to enhance compatibility and
  flexibility in environments without hardware floating-point support.
2. Refactors macro definitions by moving them from `fenv_libc.h` to
  `fpu_control.h`. This change not only simplifies the codebase but also
  eliminates the need for the unexported header file `fenv_libc.h`,
  streamlining the inclusion of floating-point utilities across different
  modules.

Signed-off-by: caiyinyu <caiyinyu@loongson.cn>
---
 sysdeps/loongarch/fpu/fclrexcpt.c             |  1 -
 sysdeps/loongarch/fpu/fedisblxcpt.c           |  3 +-
 sysdeps/loongarch/fpu/feenablxcpt.c           |  3 +-
 sysdeps/loongarch/fpu/fegetexcept.c           |  3 +-
 sysdeps/loongarch/fpu_control.h               | 29 +++++++------
 sysdeps/loongarch/math_private.h              |  1 -
 sysdeps/loongarch/nofpu/Makefile              | 10 +++++
 sysdeps/loongarch/nofpu/Subdirs               |  1 +
 sysdeps/loongarch/nofpu/Versions              |  5 +++
 sysdeps/loongarch/nofpu/fclrexcpt.c           | 37 ++++++++++++++++
 .../{fpu/fenv_libc.h => nofpu/fedisblxcpt.c}  | 24 ++++++-----
 sysdeps/loongarch/nofpu/feenablxcpt.c         | 32 ++++++++++++++
 sysdeps/loongarch/nofpu/fegetenv.c            | 32 ++++++++++++++
 sysdeps/loongarch/nofpu/fegetexcept.c         | 26 +++++++++++
 sysdeps/loongarch/nofpu/fegetmode.c           | 27 ++++++++++++
 sysdeps/loongarch/nofpu/fegetround.c          | 29 +++++++++++++
 sysdeps/loongarch/nofpu/feholdexcpt.c         | 37 ++++++++++++++++
 sysdeps/loongarch/nofpu/fesetenv.c            | 37 ++++++++++++++++
 sysdeps/loongarch/nofpu/fesetexcept.c         | 27 ++++++++++++
 sysdeps/loongarch/nofpu/fesetmode.c           | 34 +++++++++++++++
 sysdeps/loongarch/nofpu/fesetround.c          | 36 ++++++++++++++++
 sysdeps/loongarch/nofpu/feupdateenv.c         | 43 +++++++++++++++++++
 sysdeps/loongarch/nofpu/fgetexcptflg.c        | 28 ++++++++++++
 sysdeps/loongarch/nofpu/fraiseexcpt.c         | 42 ++++++++++++++++++
 sysdeps/loongarch/nofpu/fsetexcptflg.c        | 35 +++++++++++++++
 sysdeps/loongarch/nofpu/ftestexcept.c         | 27 ++++++++++++
 sysdeps/loongarch/nofpu/get-rounding-mode.h   | 34 +++++++++++++++
 sysdeps/loongarch/nofpu/sim-full.c            | 23 ++++++++++
 sysdeps/loongarch/nofpu/soft-supp.h           | 20 +++++++++
 29 files changed, 654 insertions(+), 32 deletions(-)
 create mode 100644 sysdeps/loongarch/nofpu/Makefile
 create mode 100644 sysdeps/loongarch/nofpu/Subdirs
 create mode 100644 sysdeps/loongarch/nofpu/Versions
 create mode 100644 sysdeps/loongarch/nofpu/fclrexcpt.c
 rename sysdeps/loongarch/{fpu/fenv_libc.h => nofpu/fedisblxcpt.c} (62%)
 create mode 100644 sysdeps/loongarch/nofpu/feenablxcpt.c
 create mode 100644 sysdeps/loongarch/nofpu/fegetenv.c
 create mode 100644 sysdeps/loongarch/nofpu/fegetexcept.c
 create mode 100644 sysdeps/loongarch/nofpu/fegetmode.c
 create mode 100644 sysdeps/loongarch/nofpu/fegetround.c
 create mode 100644 sysdeps/loongarch/nofpu/feholdexcpt.c
 create mode 100644 sysdeps/loongarch/nofpu/fesetenv.c
 create mode 100644 sysdeps/loongarch/nofpu/fesetexcept.c
 create mode 100644 sysdeps/loongarch/nofpu/fesetmode.c
 create mode 100644 sysdeps/loongarch/nofpu/fesetround.c
 create mode 100644 sysdeps/loongarch/nofpu/feupdateenv.c
 create mode 100644 sysdeps/loongarch/nofpu/fgetexcptflg.c
 create mode 100644 sysdeps/loongarch/nofpu/fraiseexcpt.c
 create mode 100644 sysdeps/loongarch/nofpu/fsetexcptflg.c
 create mode 100644 sysdeps/loongarch/nofpu/ftestexcept.c
 create mode 100644 sysdeps/loongarch/nofpu/get-rounding-mode.h
 create mode 100644 sysdeps/loongarch/nofpu/sim-full.c
 create mode 100644 sysdeps/loongarch/nofpu/soft-supp.h

diff --git a/sysdeps/loongarch/fpu/fclrexcpt.c b/sysdeps/loongarch/fpu/fclrexcpt.c
index 4301b1fd68..6ed9989760 100644
--- a/sysdeps/loongarch/fpu/fclrexcpt.c
+++ b/sysdeps/loongarch/fpu/fclrexcpt.c
@@ -17,7 +17,6 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
-#include <fenv_libc.h>
 #include <fpu_control.h>
 
 int
diff --git a/sysdeps/loongarch/fpu/fedisblxcpt.c b/sysdeps/loongarch/fpu/fedisblxcpt.c
index a3f92f108d..5563e51d28 100644
--- a/sysdeps/loongarch/fpu/fedisblxcpt.c
+++ b/sysdeps/loongarch/fpu/fedisblxcpt.c
@@ -17,7 +17,6 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
-#include <fenv_libc.h>
 #include <fpu_control.h>
 
 int
@@ -28,7 +27,7 @@ fedisableexcept (int excepts)
   /* Get the current control word.  */
   _FPU_GETCW (new_exc);
 
-  old_exc = (new_exc & ENABLE_MASK) << ENABLE_SHIFT;
+  old_exc = (new_exc & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
 
   excepts &= FE_ALL_EXCEPT;
 
diff --git a/sysdeps/loongarch/fpu/feenablxcpt.c b/sysdeps/loongarch/fpu/feenablxcpt.c
index 9b415f09b7..84dc49db2a 100644
--- a/sysdeps/loongarch/fpu/feenablxcpt.c
+++ b/sysdeps/loongarch/fpu/feenablxcpt.c
@@ -17,7 +17,6 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
-#include <fenv_libc.h>
 #include <fpu_control.h>
 
 int
@@ -28,7 +27,7 @@ feenableexcept (int excepts)
   /* Get the current control word.  */
   _FPU_GETCW (new_exc);
 
-  old_exc = (new_exc & ENABLE_MASK) << ENABLE_SHIFT;
+  old_exc = (new_exc & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
 
   excepts &= FE_ALL_EXCEPT;
 
diff --git a/sysdeps/loongarch/fpu/fegetexcept.c b/sysdeps/loongarch/fpu/fegetexcept.c
index a57543fcd3..32ad3332ab 100644
--- a/sysdeps/loongarch/fpu/fegetexcept.c
+++ b/sysdeps/loongarch/fpu/fegetexcept.c
@@ -17,7 +17,6 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
-#include <fenv_libc.h>
 #include <fpu_control.h>
 
 int
@@ -28,5 +27,5 @@ fegetexcept (void)
   /* Get the current control word.  */
   _FPU_GETCW (exc);
 
-  return (exc & ENABLE_MASK) << ENABLE_SHIFT;
+  return (exc & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
 }
diff --git a/sysdeps/loongarch/fpu_control.h b/sysdeps/loongarch/fpu_control.h
index 54add4e01c..5a8148e781 100644
--- a/sysdeps/loongarch/fpu_control.h
+++ b/sysdeps/loongarch/fpu_control.h
@@ -51,10 +51,25 @@
 
 #include <features.h>
 
+#define _FPU_DEFAULT 0x0
+#define _FPU_IEEE 0x1F
+/* Mask for rounding control/enable/cause fields.  */
+#define _FPU_RC_MASK 0x300
+#define _FPU_ENABLE_MASK 0x0000001f
+#define _FPU_CAUSE_MASK  0x1f000000
+/* Shift for FE_* flags to get up to the ENABLE bits and the CAUSE bits.  */
+#define ENABLE_SHIFT 16
+#define CAUSE_SHIFT 8
+/* Masks for interrupts.  */
+#define _FPU_MASK_V 0x10 /* Invalid operation */
+#define _FPU_MASK_Z 0x08 /* Division by zero  */
+#define _FPU_MASK_O 0x04 /* Overflow */
+#define _FPU_MASK_U 0x02 /* Underflow */
+#define _FPU_MASK_I 0x01 /* Inexact operation */
+
 #ifdef __loongarch_soft_float
 
 #define _FPU_RESERVED 0xffffffff
-#define _FPU_DEFAULT 0x00000000
 typedef unsigned int fpu_control_t;
 #define _FPU_GETCW(cw) (cw) = 0
 #define _FPU_SETCW(cw) (void) (cw)
@@ -62,13 +77,6 @@ extern fpu_control_t __fpu_control;
 
 #else /* __loongarch_soft_float */
 
-/* Masks for interrupts.  */
-#define _FPU_MASK_V 0x10 /* Invalid operation */
-#define _FPU_MASK_Z 0x08 /* Division by zero  */
-#define _FPU_MASK_O 0x04 /* Overflow */
-#define _FPU_MASK_U 0x02 /* Underflow */
-#define _FPU_MASK_I 0x01 /* Inexact operation */
-
 /* Flush denormalized numbers to zero.  */
 #define _FPU_FLUSH_TZ 0x1000000
 
@@ -77,14 +85,9 @@ extern fpu_control_t __fpu_control;
 #define _FPU_RC_ZERO 0x100
 #define _FPU_RC_UP 0x200
 #define _FPU_RC_DOWN 0x300
-/* Mask for rounding control.  */
-#define _FPU_RC_MASK 0x300
 
 #define _FPU_RESERVED 0x0
 
-#define _FPU_DEFAULT 0x0
-#define _FPU_IEEE 0x1F
-
 /* Type of the control word.  */
 typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
 
diff --git a/sysdeps/loongarch/math_private.h b/sysdeps/loongarch/math_private.h
index 40cd54c8cf..a2708a4af8 100644
--- a/sysdeps/loongarch/math_private.h
+++ b/sysdeps/loongarch/math_private.h
@@ -27,7 +27,6 @@
 #ifdef __loongarch_hard_float
 
 #include <fenv.h>
-#include <fenv_libc.h>
 #include <fpu_control.h>
 
 #define _FPU_MASK_ALL \
diff --git a/sysdeps/loongarch/nofpu/Makefile b/sysdeps/loongarch/nofpu/Makefile
new file mode 100644
index 0000000000..53b015c3dc
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/Makefile
@@ -0,0 +1,10 @@
+# Makefile fragment for LoongArch with no FPU.
+
+ifeq ($(subdir),soft-fp)
+sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) \
+		   sim-full
+endif
+
+ifeq ($(subdir),math)
+CPPFLAGS += -I../soft-fp/
+endif
diff --git a/sysdeps/loongarch/nofpu/Subdirs b/sysdeps/loongarch/nofpu/Subdirs
new file mode 100644
index 0000000000..87eadf3024
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/Subdirs
@@ -0,0 +1 @@
+soft-fp
diff --git a/sysdeps/loongarch/nofpu/Versions b/sysdeps/loongarch/nofpu/Versions
new file mode 100644
index 0000000000..6d7f6aae6c
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/Versions
@@ -0,0 +1,5 @@
+libc {
+  GLIBC_PRIVATE {
+    __sim_cw_thread;
+  }
+}
diff --git a/sysdeps/loongarch/nofpu/fclrexcpt.c b/sysdeps/loongarch/nofpu/fclrexcpt.c
new file mode 100644
index 0000000000..2938331a09
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fclrexcpt.c
@@ -0,0 +1,37 @@
+/* Clear floating-point exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+feclearexcept (int excepts)
+{
+  /* Mask out unsupported bits/exceptions.  */
+  excepts &= FE_ALL_EXCEPT;
+
+  /* Clear exception flag bits and cause bits.  If the cause bit is not
+     cleared, the next CTC instruction (just below) will re-generate the
+     exception.  */
+
+  __sim_cw_thread &= ~(excepts | (excepts << CAUSE_SHIFT));
+
+  return 0;
+}
+
+libm_hidden_weak (feclearexcept)
diff --git a/sysdeps/loongarch/fpu/fenv_libc.h b/sysdeps/loongarch/nofpu/fedisblxcpt.c
similarity index 62%
rename from sysdeps/loongarch/fpu/fenv_libc.h
rename to sysdeps/loongarch/nofpu/fedisblxcpt.c
index 639e0b16b2..293b530461 100644
--- a/sysdeps/loongarch/fpu/fenv_libc.h
+++ b/sysdeps/loongarch/nofpu/fedisblxcpt.c
@@ -1,5 +1,5 @@
-/* Internal libc stuff for floating point environment routines.
-   Copyright (C) 2022-2024 Free Software Foundation, Inc.
+/* Disable exceptions (soft-float edition).
+   Copyright (C) 2024 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
@@ -16,15 +16,17 @@
    License along with the GNU C Library.  If not, see
    <https://www.gnu.org/licenses/>.  */
 
-#ifndef _FENV_LIBC_H
-#define _FENV_LIBC_H 1
+#include "soft-fp.h"
+#include "soft-supp.h"
 
-/* Mask for enabling exceptions and for the CAUSE bits.  */
-#define ENABLE_MASK 0x0000001FU
-#define CAUSE_MASK 0x1F000000U
+int
+fedisableexcept (int excepts)
+{
+  unsigned int old_exc = (__sim_cw_thread & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
 
-/* Shift for FE_* flags to get up to the ENABLE bits and the CAUSE bits.  */
-#define ENABLE_SHIFT 16
-#define CAUSE_SHIFT 8
+  excepts &= FE_ALL_EXCEPT;
 
-#endif /* _FENV_LIBC_H */
+  __sim_cw_thread &= ~(excepts >> ENABLE_SHIFT);
+
+  return old_exc;
+}
diff --git a/sysdeps/loongarch/nofpu/feenablxcpt.c b/sysdeps/loongarch/nofpu/feenablxcpt.c
new file mode 100644
index 0000000000..8dfbe371ea
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/feenablxcpt.c
@@ -0,0 +1,32 @@
+/* Enable exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+feenableexcept (int excepts)
+{
+  int old_exc = (__sim_cw_thread & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
+
+  excepts &= FE_ALL_EXCEPT;
+
+  __sim_cw_thread |= excepts >> ENABLE_SHIFT;
+
+  return old_exc;
+}
diff --git a/sysdeps/loongarch/nofpu/fegetenv.c b/sysdeps/loongarch/nofpu/fegetenv.c
new file mode 100644
index 0000000000..7bccaf0250
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fegetenv.c
@@ -0,0 +1,32 @@
+/* Store current floating-point environment (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+__fegetenv (fenv_t *envp)
+{
+
+  envp->__fp_control_register = __sim_cw_thread;
+
+  return 0;
+}
+
+libm_hidden_def (__fegetenv) weak_alias (__fegetenv, fegetenv)
+libm_hidden_weak (fegetenv)
diff --git a/sysdeps/loongarch/nofpu/fegetexcept.c b/sysdeps/loongarch/nofpu/fegetexcept.c
new file mode 100644
index 0000000000..fab16a6485
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fegetexcept.c
@@ -0,0 +1,26 @@
+/* Get floating-point exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fegetexcept (void)
+{
+  return (__sim_cw_thread & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
+}
diff --git a/sysdeps/loongarch/nofpu/fegetmode.c b/sysdeps/loongarch/nofpu/fegetmode.c
new file mode 100644
index 0000000000..7751fe86a0
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fegetmode.c
@@ -0,0 +1,27 @@
+/* Store current floating-point control modes (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fegetmode (femode_t *modep)
+{
+  *modep = __sim_cw_thread;
+  return 0;
+}
diff --git a/sysdeps/loongarch/nofpu/fegetround.c b/sysdeps/loongarch/nofpu/fegetround.c
new file mode 100644
index 0000000000..db440c1707
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fegetround.c
@@ -0,0 +1,29 @@
+/* Return current rounding mode (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+__fegetround (void)
+{
+  return __sim_cw_thread & _FPU_RC_MASK;
+}
+
+libm_hidden_def (__fegetround) weak_alias (__fegetround, fegetround)
+libm_hidden_weak (fegetround)
diff --git a/sysdeps/loongarch/nofpu/feholdexcpt.c b/sysdeps/loongarch/nofpu/feholdexcpt.c
new file mode 100644
index 0000000000..bbf106f41e
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/feholdexcpt.c
@@ -0,0 +1,37 @@
+/* Store current floating-point environment and clear exceptions
+   (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+__feholdexcept (fenv_t *envp)
+{
+
+  envp->__fp_control_register = __sim_cw_thread;
+
+  /* Clear all exception enable bits and flags.  */
+  __sim_cw_thread &= ~(_FPU_MASK_V | _FPU_MASK_Z | _FPU_MASK_O | _FPU_MASK_U
+		      | _FPU_MASK_I | FE_ALL_EXCEPT);
+
+  return 0;
+}
+
+libm_hidden_def (__feholdexcept) weak_alias (__feholdexcept, feholdexcept)
+libm_hidden_weak (feholdexcept)
diff --git a/sysdeps/loongarch/nofpu/fesetenv.c b/sysdeps/loongarch/nofpu/fesetenv.c
new file mode 100644
index 0000000000..31fd258cdb
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fesetenv.c
@@ -0,0 +1,37 @@
+/* Set floating point environment (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+__fesetenv (const fenv_t *envp)
+{
+
+  if (envp == FE_DFL_ENV)
+    __sim_cw_thread = _FPU_DEFAULT;
+  else if (envp == FE_NOMASK_ENV)
+    __sim_cw_thread = _FPU_IEEE;
+  else
+    __sim_cw_thread = envp->__fp_control_register;
+
+  return 0;
+}
+
+libm_hidden_def (__fesetenv) weak_alias (__fesetenv, fesetenv)
+libm_hidden_weak (fesetenv)
diff --git a/sysdeps/loongarch/nofpu/fesetexcept.c b/sysdeps/loongarch/nofpu/fesetexcept.c
new file mode 100644
index 0000000000..bceff28844
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fesetexcept.c
@@ -0,0 +1,27 @@
+/* Set given exception flags (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fesetexcept (int excepts)
+{
+  __sim_cw_thread |= excepts & FE_ALL_EXCEPT;
+  return 0;
+}
diff --git a/sysdeps/loongarch/nofpu/fesetmode.c b/sysdeps/loongarch/nofpu/fesetmode.c
new file mode 100644
index 0000000000..185c97372b
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fesetmode.c
@@ -0,0 +1,34 @@
+/* Install given floating-point control modes (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+#define FCSR_STATUS 0x1f1f0000
+
+int
+fesetmode (const femode_t *modep)
+{
+  __sim_cw_thread &= FCSR_STATUS;
+  if (modep == FE_DFL_MODE)
+    __sim_cw_thread |= _FPU_DEFAULT;
+  else
+    __sim_cw_thread |= *modep & ~FCSR_STATUS;
+
+  return 0;
+}
diff --git a/sysdeps/loongarch/nofpu/fesetround.c b/sysdeps/loongarch/nofpu/fesetround.c
new file mode 100644
index 0000000000..6b16ce0828
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fesetround.c
@@ -0,0 +1,36 @@
+/* Set rounding mode (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+__fesetround (int round)
+{
+  if ((round & ~_FPU_RC_MASK) != 0)
+    /* ROUND is no valid rounding mode.  */
+    return 1;
+
+  /* Set rounding bits.  */
+  __sim_cw_thread &= ~_FPU_RC_MASK;
+  __sim_cw_thread |= round;
+
+  return 0;
+}
+libm_hidden_def (__fesetround) weak_alias (__fesetround, fesetround)
+libm_hidden_weak (fesetround)
diff --git a/sysdeps/loongarch/nofpu/feupdateenv.c b/sysdeps/loongarch/nofpu/feupdateenv.c
new file mode 100644
index 0000000000..1f7c1c475f
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/feupdateenv.c
@@ -0,0 +1,43 @@
+/* Install given floating-point environment and raise exceptions
+   (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+#include <signal.h>
+
+int
+__feupdateenv (const fenv_t *envp)
+{
+  int temp;
+
+  temp = __sim_cw_thread & FE_ALL_EXCEPT;
+
+  /* Install new environment.  */
+  __fesetenv (envp);
+
+  /* Raise the saved exception.  Incidentally for us the implementation
+     defined format of the values in objects of type fexcept_t is the
+     same as the ones specified using the FE_* constants.  */
+  __feraiseexcept (temp);
+
+  return 0;
+}
+
+libm_hidden_def (__feupdateenv) weak_alias (__feupdateenv, feupdateenv)
+libm_hidden_weak (feupdateenv)
diff --git a/sysdeps/loongarch/nofpu/fgetexcptflg.c b/sysdeps/loongarch/nofpu/fgetexcptflg.c
new file mode 100644
index 0000000000..dd16932966
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fgetexcptflg.c
@@ -0,0 +1,28 @@
+/* Store current representation for exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+  *flagp = (fexcept_t) __sim_cw_thread & excepts & FE_ALL_EXCEPT;
+
+  return 0;
+}
diff --git a/sysdeps/loongarch/nofpu/fraiseexcpt.c b/sysdeps/loongarch/nofpu/fraiseexcpt.c
new file mode 100644
index 0000000000..b701da1f86
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fraiseexcpt.c
@@ -0,0 +1,42 @@
+/* Raise given exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+#include <signal.h>
+
+int
+__feraiseexcept (int excepts)
+{
+  int enable;
+  /* Set flag bits (which are accumulative), and *also* set the
+     cause bits.  The setting of the cause bits is what actually causes
+     the hardware to generate the exception, if the corresponding enable
+     bit is set as well.  */
+
+  excepts &= FE_ALL_EXCEPT;
+  __sim_cw_thread |= excepts | (excepts << CAUSE_SHIFT);
+  enable = __sim_cw_thread & _FPU_ENABLE_MASK;
+  if (excepts & __sim_cw_thread & (enable << ENABLE_SHIFT))
+    raise (SIGFPE);
+
+  return 0;
+}
+
+libm_hidden_def (__feraiseexcept) weak_alias (__feraiseexcept, feraiseexcept)
+libm_hidden_weak (feraiseexcept)
diff --git a/sysdeps/loongarch/nofpu/fsetexcptflg.c b/sysdeps/loongarch/nofpu/fsetexcptflg.c
new file mode 100644
index 0000000000..cd7dd18b9c
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fsetexcptflg.c
@@ -0,0 +1,35 @@
+/* Set floating-point environment exception handling (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+  /* Make sure the flags we want restored are legal.  */
+  excepts &= FE_ALL_EXCEPT;
+
+  /* Now clear the bits called for, and copy them in from flagp.  Note that
+     we ignore all non-flag bits from *flagp, so they don't matter.  */
+  __sim_cw_thread = (__sim_cw_thread & ~excepts) | (*flagp & excepts);
+
+
+  /* Success.  */
+  return 0;
+}
diff --git a/sysdeps/loongarch/nofpu/ftestexcept.c b/sysdeps/loongarch/nofpu/ftestexcept.c
new file mode 100644
index 0000000000..549661c88d
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/ftestexcept.c
@@ -0,0 +1,27 @@
+/* Test floating-point exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fetestexcept (int excepts)
+{
+  return __sim_cw_thread & excepts & FE_ALL_EXCEPT;
+}
+libm_hidden_def (fetestexcept)
diff --git a/sysdeps/loongarch/nofpu/get-rounding-mode.h b/sysdeps/loongarch/nofpu/get-rounding-mode.h
new file mode 100644
index 0000000000..a4808cc54e
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/get-rounding-mode.h
@@ -0,0 +1,34 @@
+/* Determine floating-point rounding mode within libc (soft-float edition).
+   Copyright (C) 2024 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/>.  */
+
+#ifndef _LOONGARCH_NOFPU_GET_ROUNDING_MODE_H
+#define _LOONGARCH_NOFPU_GET_ROUNDING_MODE_H	1
+
+#include <fenv.h>
+#include <fpu_control.h>
+#include "soft-supp.h"
+
+/* Return the floating-point rounding mode.  */
+
+static inline int
+get_rounding_mode (void)
+{
+  return __sim_cw_thread & _FPU_RC_MASK;
+}
+
+#endif /* get-rounding-mode.h */
diff --git a/sysdeps/loongarch/nofpu/sim-full.c b/sysdeps/loongarch/nofpu/sim-full.c
new file mode 100644
index 0000000000..a2bbb9f880
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/sim-full.c
@@ -0,0 +1,23 @@
+/* Software floating-point exception handling emulation.
+   Copyright (C) 2024 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 "soft-supp.h"
+
+/* By default, no exceptions should trap.  */
+__thread int __sim_cw_thread;
+libc_hidden_tls_def (__sim_cw_thread);
diff --git a/sysdeps/loongarch/nofpu/soft-supp.h b/sysdeps/loongarch/nofpu/soft-supp.h
new file mode 100644
index 0000000000..37d83399e8
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/soft-supp.h
@@ -0,0 +1,20 @@
+/* Internal support stuff for complete soft float.
+   Copyright (C) 2024 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/>.  */
+
+extern __thread int __sim_cw_thread attribute_tls_model_ie;
+libc_hidden_tls_proto (__sim_cw_thread, tls_model ("initial-exec"));
-- 
2.39.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-03-26 12:46 [PATCH] LoongArch: Add soft floating-point fe* function implementations caiyinyu
@ 2024-03-26 17:34 ` Joseph Myers
  2024-03-27  8:42   ` caiyinyu
  0 siblings, 1 reply; 16+ messages in thread
From: Joseph Myers @ 2024-03-26 17:34 UTC (permalink / raw)
  To: caiyinyu; +Cc: libc-alpha, adhemerval.zanella, xry111

On Tue, 26 Mar 2024, caiyinyu wrote:

> This patch accomplishes the following:
> 1. Implements soft floating-point functions to enhance compatibility and
>   flexibility in environments without hardware floating-point support.

Does this actually do anything useful for users, i.e. make the software 
floating-point rounding mode and exceptions state affect both user 
arithmetic and functions within libc/libm?  As far as I can see, while 
you're building copies of some software floating-point libgcc functions 
for libc, you're not doing anything to make them use the software 
floating-point environment state, and not exporting them for use by users.

For software floating-point rounding modes and exceptions to be useful to 
users, you need to follow powerpc/nofpu and export the functions from 
libc.  You then need to arrange for libgcc *not* to provide the functions 
when libc does (see how libgcc/configure.ac sets ppc_fp_compat depending 
on glibc version, for example).  And there's also the matter of providing 
libc (as opposed to libm) interfaces for cases where compiler-generated 
code may need to manipulate floating-point environment state without 
calling libm functions (see how powerpc-nofpu provides 
__atomic_feholdexcept __atomic_feclearexcept __atomic_feupdateenv 
__flt_rounds and rs6000_atomic_assign_expand_fenv in the GCC back end can 
generate calls to the first three of those functions - the fourth is 
future-proofing for if GCC gets proper support for making FLT_ROUNDS 
depend on the rounding mode in future).

-- 
Joseph S. Myers
josmyers@redhat.com


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-03-26 17:34 ` Joseph Myers
@ 2024-03-27  8:42   ` caiyinyu
  2024-03-27 17:10     ` Joseph Myers
  0 siblings, 1 reply; 16+ messages in thread
From: caiyinyu @ 2024-03-27  8:42 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha, adhemerval.zanella, xry111, xuchenghua


在 2024/3/27 上午1:34, Joseph Myers 写道:
> On Tue, 26 Mar 2024, caiyinyu wrote:
>
>> This patch accomplishes the following:
>> 1. Implements soft floating-point functions to enhance compatibility and
>>    flexibility in environments without hardware floating-point support.
> Does this actually do anything useful for users, i.e. make the software
> floating-point rounding mode and exceptions state affect both user
> arithmetic and functions within libc/libm?  As far as I can see, while
> you're building copies of some software floating-point libgcc functions
> for libc, you're not doing anything to make them use the software
> floating-point environment state, and not exporting them for use by users.

Yes, this patch does make sense in both libc and libm and it can be 
proved by the following glibc tests:
stdlib/tst-strtod-underflow
stdio-common/tst-printf-round
math/test-fenv
math/test-femode{, -traps}
...


Actually, without this patch, you will get the warning info something 
like the following when make check and the related tsts would failed or 
not be tested correctly.
"test-fenv.c:229:(.text+0x48): warning: feclearexcept is not implemented 
and will always fail"

Even more, the warning information appears in glibc's check logs of all 
the following architectures (tested with build-many-glibcs.py).
csky-linux-gnuabiv2-soft
m68k-linux-gnu-coldfire-soft
or1k-linux-gnu-soft
powerpc-linux-gnu-soft
riscv64-linux-gnu-rv64imac-lp64
sh4-linux-gnu-soft
...
I think all these related tsts were not tested correctly on these 
architectures.


>
> For software floating-point rounding modes and exceptions to be useful to
> users, you need to follow powerpc/nofpu and export the functions from
> libc.

All the functions Implemented in this patch are exported from libm.so 
the same as powerpc nofpu.


> You then need to arrange for libgcc *not* to provide the functions
> when libc does (see how libgcc/configure.ac sets ppc_fp_compat depending
> on glibc version, for example).  And there's also the matter of providing
> libc (as opposed to libm) interfaces for cases where compiler-generated
> code may need to manipulate floating-point environment state without
> calling libm functions (see how powerpc-nofpu provides
> __atomic_feholdexcept __atomic_feclearexcept __atomic_feupdateenv
> __flt_rounds and rs6000_atomic_assign_expand_fenv in the GCC back end can
> generate calls to the first three of those functions - the fourth is
> future-proofing for if GCC gets proper support for making FLT_ROUNDS
> depend on the rounding mode in future).

I've reviewed your previous commits in glibc and gcc about
__atomic_feholdexcept __atomic_feclearexcept __atomic_feupdateenv and 
__flt_rounds
and I wil make other patches to implement these functions in glibc and gcc.


In summary, I believe this patch is fine except for the _atomic* and 
__flt_rounds functions.


>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-03-27  8:42   ` caiyinyu
@ 2024-03-27 17:10     ` Joseph Myers
  2024-03-31 10:14       ` caiyinyu
  2024-03-31 10:31       ` caiyinyu
  0 siblings, 2 replies; 16+ messages in thread
From: Joseph Myers @ 2024-03-27 17:10 UTC (permalink / raw)
  To: caiyinyu; +Cc: libc-alpha, adhemerval.zanella, xry111, xuchenghua

On Wed, 27 Mar 2024, caiyinyu wrote:

> Yes, this patch does make sense in both libc and libm and it can be proved by
> the following glibc tests:

Please explain more how it works.

> All the functions Implemented in this patch are exported from libm.so the same
> as powerpc nofpu.

I'm talking about functions such as __adddf3 (which would need to be 
exported from libc, not libm, to provide exceptions / rounding modes 
support for software floating point).  I don't see them in any Versions 
file for LoongArch.

Furthermore, this patch isn't changing sfp-machine.h for LoongArch, which 
uses fpu_control.h to get rounding mode / exceptions state, and it isn't 
changing how fpu_control.h uses constant 0 for that state in the 
soft-float case.  So I don't see how it would produce *working* exceptions 
/ rounding modes support for software floating-point arithmetic.

-- 
Joseph S. Myers
josmyers@redhat.com


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-03-27 17:10     ` Joseph Myers
@ 2024-03-31 10:14       ` caiyinyu
  2024-04-01 13:19         ` Florian Weimer
  2024-03-31 10:31       ` caiyinyu
  1 sibling, 1 reply; 16+ messages in thread
From: caiyinyu @ 2024-03-31 10:14 UTC (permalink / raw)
  To: josmyers, libc-alpha; +Cc: adhemerval.zanella, xry111, caiyinyu

This patch accomplishes the following:
1. Implements soft floating-point functions to enhance compatibility and
  flexibility in environments without hardware floating-point support.
2. Refactors macro definitions by moving them from `fenv_libc.h` to
  `fpu_control.h`. This change not only simplifies the codebase but also
  eliminates the need for the unexported header file `fenv_libc.h`,
  streamlining the inclusion of floating-point utilities across different
  modules.

Signed-off-by: caiyinyu <caiyinyu@loongson.cn>
---
 sysdeps/loongarch/fpu/fclrexcpt.c             |    1 -
 sysdeps/loongarch/fpu/fedisblxcpt.c           |    3 +-
 sysdeps/loongarch/fpu/feenablxcpt.c           |    3 +-
 sysdeps/loongarch/fpu/fegetexcept.c           |    3 +-
 sysdeps/loongarch/fpu_control.h               |   29 +-
 sysdeps/loongarch/math_private.h              |    1 -
 sysdeps/loongarch/nofpu/Makefile              |   10 +
 sysdeps/loongarch/nofpu/Subdirs               |    1 +
 sysdeps/loongarch/nofpu/Versions              |   13 +
 sysdeps/loongarch/nofpu/fclrexcpt.c           |   37 +
 .../{fpu/fenv_libc.h => nofpu/fedisblxcpt.c}  |   24 +-
 sysdeps/loongarch/nofpu/feenablxcpt.c         |   32 +
 sysdeps/loongarch/nofpu/fegetenv.c            |   32 +
 sysdeps/loongarch/nofpu/fegetexcept.c         |   26 +
 sysdeps/loongarch/nofpu/fegetmode.c           |   27 +
 sysdeps/loongarch/nofpu/fegetround.c          |   29 +
 sysdeps/loongarch/nofpu/feholdexcpt.c         |   37 +
 sysdeps/loongarch/nofpu/fesetenv.c            |   37 +
 sysdeps/loongarch/nofpu/fesetexcept.c         |   27 +
 sysdeps/loongarch/nofpu/fesetmode.c           |   34 +
 sysdeps/loongarch/nofpu/fesetround.c          |   36 +
 sysdeps/loongarch/nofpu/feupdateenv.c         |   43 +
 sysdeps/loongarch/nofpu/fgetexcptflg.c        |   28 +
 sysdeps/loongarch/nofpu/fraiseexcpt.c         |   42 +
 sysdeps/loongarch/nofpu/fsetexcptflg.c        |   35 +
 sysdeps/loongarch/nofpu/ftestexcept.c         |   27 +
 sysdeps/loongarch/nofpu/get-rounding-mode.h   |   34 +
 sysdeps/loongarch/nofpu/sim-full.c            |   37 +
 sysdeps/loongarch/nofpu/soft-supp.h           |   22 +
 sysdeps/loongarch/sfp-machine.h               |   15 +-
 .../loongarch/lp64/{ => fpu}/libc.abilist     |    0
 .../loongarch/{ => lp64/fpu}/localplt.data    |    0
 .../sysv/linux/loongarch/lp64/nofpu/Implies   |    1 +
 .../linux/loongarch/lp64/nofpu/libc.abilist   | 2295 +++++++++++++++++
 .../linux/loongarch/lp64/nofpu/localplt.data  |   23 +
 35 files changed, 3007 insertions(+), 37 deletions(-)
 create mode 100644 sysdeps/loongarch/nofpu/Makefile
 create mode 100644 sysdeps/loongarch/nofpu/Subdirs
 create mode 100644 sysdeps/loongarch/nofpu/Versions
 create mode 100644 sysdeps/loongarch/nofpu/fclrexcpt.c
 rename sysdeps/loongarch/{fpu/fenv_libc.h => nofpu/fedisblxcpt.c} (62%)
 create mode 100644 sysdeps/loongarch/nofpu/feenablxcpt.c
 create mode 100644 sysdeps/loongarch/nofpu/fegetenv.c
 create mode 100644 sysdeps/loongarch/nofpu/fegetexcept.c
 create mode 100644 sysdeps/loongarch/nofpu/fegetmode.c
 create mode 100644 sysdeps/loongarch/nofpu/fegetround.c
 create mode 100644 sysdeps/loongarch/nofpu/feholdexcpt.c
 create mode 100644 sysdeps/loongarch/nofpu/fesetenv.c
 create mode 100644 sysdeps/loongarch/nofpu/fesetexcept.c
 create mode 100644 sysdeps/loongarch/nofpu/fesetmode.c
 create mode 100644 sysdeps/loongarch/nofpu/fesetround.c
 create mode 100644 sysdeps/loongarch/nofpu/feupdateenv.c
 create mode 100644 sysdeps/loongarch/nofpu/fgetexcptflg.c
 create mode 100644 sysdeps/loongarch/nofpu/fraiseexcpt.c
 create mode 100644 sysdeps/loongarch/nofpu/fsetexcptflg.c
 create mode 100644 sysdeps/loongarch/nofpu/ftestexcept.c
 create mode 100644 sysdeps/loongarch/nofpu/get-rounding-mode.h
 create mode 100644 sysdeps/loongarch/nofpu/sim-full.c
 create mode 100644 sysdeps/loongarch/nofpu/soft-supp.h
 rename sysdeps/unix/sysv/linux/loongarch/lp64/{ => fpu}/libc.abilist (100%)
 rename sysdeps/unix/sysv/linux/loongarch/{ => lp64/fpu}/localplt.data (100%)
 create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/Implies
 create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/libc.abilist
 create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/localplt.data

diff --git a/sysdeps/loongarch/fpu/fclrexcpt.c b/sysdeps/loongarch/fpu/fclrexcpt.c
index 4301b1fd68..6ed9989760 100644
--- a/sysdeps/loongarch/fpu/fclrexcpt.c
+++ b/sysdeps/loongarch/fpu/fclrexcpt.c
@@ -17,7 +17,6 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
-#include <fenv_libc.h>
 #include <fpu_control.h>
 
 int
diff --git a/sysdeps/loongarch/fpu/fedisblxcpt.c b/sysdeps/loongarch/fpu/fedisblxcpt.c
index a3f92f108d..5563e51d28 100644
--- a/sysdeps/loongarch/fpu/fedisblxcpt.c
+++ b/sysdeps/loongarch/fpu/fedisblxcpt.c
@@ -17,7 +17,6 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
-#include <fenv_libc.h>
 #include <fpu_control.h>
 
 int
@@ -28,7 +27,7 @@ fedisableexcept (int excepts)
   /* Get the current control word.  */
   _FPU_GETCW (new_exc);
 
-  old_exc = (new_exc & ENABLE_MASK) << ENABLE_SHIFT;
+  old_exc = (new_exc & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
 
   excepts &= FE_ALL_EXCEPT;
 
diff --git a/sysdeps/loongarch/fpu/feenablxcpt.c b/sysdeps/loongarch/fpu/feenablxcpt.c
index 9b415f09b7..84dc49db2a 100644
--- a/sysdeps/loongarch/fpu/feenablxcpt.c
+++ b/sysdeps/loongarch/fpu/feenablxcpt.c
@@ -17,7 +17,6 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
-#include <fenv_libc.h>
 #include <fpu_control.h>
 
 int
@@ -28,7 +27,7 @@ feenableexcept (int excepts)
   /* Get the current control word.  */
   _FPU_GETCW (new_exc);
 
-  old_exc = (new_exc & ENABLE_MASK) << ENABLE_SHIFT;
+  old_exc = (new_exc & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
 
   excepts &= FE_ALL_EXCEPT;
 
diff --git a/sysdeps/loongarch/fpu/fegetexcept.c b/sysdeps/loongarch/fpu/fegetexcept.c
index a57543fcd3..32ad3332ab 100644
--- a/sysdeps/loongarch/fpu/fegetexcept.c
+++ b/sysdeps/loongarch/fpu/fegetexcept.c
@@ -17,7 +17,6 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
-#include <fenv_libc.h>
 #include <fpu_control.h>
 
 int
@@ -28,5 +27,5 @@ fegetexcept (void)
   /* Get the current control word.  */
   _FPU_GETCW (exc);
 
-  return (exc & ENABLE_MASK) << ENABLE_SHIFT;
+  return (exc & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
 }
diff --git a/sysdeps/loongarch/fpu_control.h b/sysdeps/loongarch/fpu_control.h
index 54add4e01c..5a8148e781 100644
--- a/sysdeps/loongarch/fpu_control.h
+++ b/sysdeps/loongarch/fpu_control.h
@@ -51,10 +51,25 @@
 
 #include <features.h>
 
+#define _FPU_DEFAULT 0x0
+#define _FPU_IEEE 0x1F
+/* Mask for rounding control/enable/cause fields.  */
+#define _FPU_RC_MASK 0x300
+#define _FPU_ENABLE_MASK 0x0000001f
+#define _FPU_CAUSE_MASK  0x1f000000
+/* Shift for FE_* flags to get up to the ENABLE bits and the CAUSE bits.  */
+#define ENABLE_SHIFT 16
+#define CAUSE_SHIFT 8
+/* Masks for interrupts.  */
+#define _FPU_MASK_V 0x10 /* Invalid operation */
+#define _FPU_MASK_Z 0x08 /* Division by zero  */
+#define _FPU_MASK_O 0x04 /* Overflow */
+#define _FPU_MASK_U 0x02 /* Underflow */
+#define _FPU_MASK_I 0x01 /* Inexact operation */
+
 #ifdef __loongarch_soft_float
 
 #define _FPU_RESERVED 0xffffffff
-#define _FPU_DEFAULT 0x00000000
 typedef unsigned int fpu_control_t;
 #define _FPU_GETCW(cw) (cw) = 0
 #define _FPU_SETCW(cw) (void) (cw)
@@ -62,13 +77,6 @@ extern fpu_control_t __fpu_control;
 
 #else /* __loongarch_soft_float */
 
-/* Masks for interrupts.  */
-#define _FPU_MASK_V 0x10 /* Invalid operation */
-#define _FPU_MASK_Z 0x08 /* Division by zero  */
-#define _FPU_MASK_O 0x04 /* Overflow */
-#define _FPU_MASK_U 0x02 /* Underflow */
-#define _FPU_MASK_I 0x01 /* Inexact operation */
-
 /* Flush denormalized numbers to zero.  */
 #define _FPU_FLUSH_TZ 0x1000000
 
@@ -77,14 +85,9 @@ extern fpu_control_t __fpu_control;
 #define _FPU_RC_ZERO 0x100
 #define _FPU_RC_UP 0x200
 #define _FPU_RC_DOWN 0x300
-/* Mask for rounding control.  */
-#define _FPU_RC_MASK 0x300
 
 #define _FPU_RESERVED 0x0
 
-#define _FPU_DEFAULT 0x0
-#define _FPU_IEEE 0x1F
-
 /* Type of the control word.  */
 typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
 
diff --git a/sysdeps/loongarch/math_private.h b/sysdeps/loongarch/math_private.h
index 40cd54c8cf..a2708a4af8 100644
--- a/sysdeps/loongarch/math_private.h
+++ b/sysdeps/loongarch/math_private.h
@@ -27,7 +27,6 @@
 #ifdef __loongarch_hard_float
 
 #include <fenv.h>
-#include <fenv_libc.h>
 #include <fpu_control.h>
 
 #define _FPU_MASK_ALL \
diff --git a/sysdeps/loongarch/nofpu/Makefile b/sysdeps/loongarch/nofpu/Makefile
new file mode 100644
index 0000000000..53b015c3dc
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/Makefile
@@ -0,0 +1,10 @@
+# Makefile fragment for LoongArch with no FPU.
+
+ifeq ($(subdir),soft-fp)
+sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) \
+		   sim-full
+endif
+
+ifeq ($(subdir),math)
+CPPFLAGS += -I../soft-fp/
+endif
diff --git a/sysdeps/loongarch/nofpu/Subdirs b/sysdeps/loongarch/nofpu/Subdirs
new file mode 100644
index 0000000000..87eadf3024
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/Subdirs
@@ -0,0 +1 @@
+soft-fp
diff --git a/sysdeps/loongarch/nofpu/Versions b/sysdeps/loongarch/nofpu/Versions
new file mode 100644
index 0000000000..bd6d3a4206
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/Versions
@@ -0,0 +1,13 @@
+libc {
+  GLIBC_2.37 {
+    __adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2;
+    __extendsfdf2; __fixdfsi; __fixsfsi;
+    __fixunsdfsi; __fixunssfsi;
+    __floatsidf; __floatsisf;
+    __gedf2; __gesf2; __ledf2; __lesf2; __muldf3; __mulsf3;
+    __negdf2; __negsf2; __subdf3; __subsf3; __truncdfsf2;
+  }
+  GLIBC_PRIVATE {
+    __sim_cw_thread; __simulate_exceptions;
+  }
+}
diff --git a/sysdeps/loongarch/nofpu/fclrexcpt.c b/sysdeps/loongarch/nofpu/fclrexcpt.c
new file mode 100644
index 0000000000..2938331a09
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fclrexcpt.c
@@ -0,0 +1,37 @@
+/* Clear floating-point exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+feclearexcept (int excepts)
+{
+  /* Mask out unsupported bits/exceptions.  */
+  excepts &= FE_ALL_EXCEPT;
+
+  /* Clear exception flag bits and cause bits.  If the cause bit is not
+     cleared, the next CTC instruction (just below) will re-generate the
+     exception.  */
+
+  __sim_cw_thread &= ~(excepts | (excepts << CAUSE_SHIFT));
+
+  return 0;
+}
+
+libm_hidden_weak (feclearexcept)
diff --git a/sysdeps/loongarch/fpu/fenv_libc.h b/sysdeps/loongarch/nofpu/fedisblxcpt.c
similarity index 62%
rename from sysdeps/loongarch/fpu/fenv_libc.h
rename to sysdeps/loongarch/nofpu/fedisblxcpt.c
index 639e0b16b2..293b530461 100644
--- a/sysdeps/loongarch/fpu/fenv_libc.h
+++ b/sysdeps/loongarch/nofpu/fedisblxcpt.c
@@ -1,5 +1,5 @@
-/* Internal libc stuff for floating point environment routines.
-   Copyright (C) 2022-2024 Free Software Foundation, Inc.
+/* Disable exceptions (soft-float edition).
+   Copyright (C) 2024 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
@@ -16,15 +16,17 @@
    License along with the GNU C Library.  If not, see
    <https://www.gnu.org/licenses/>.  */
 
-#ifndef _FENV_LIBC_H
-#define _FENV_LIBC_H 1
+#include "soft-fp.h"
+#include "soft-supp.h"
 
-/* Mask for enabling exceptions and for the CAUSE bits.  */
-#define ENABLE_MASK 0x0000001FU
-#define CAUSE_MASK 0x1F000000U
+int
+fedisableexcept (int excepts)
+{
+  unsigned int old_exc = (__sim_cw_thread & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
 
-/* Shift for FE_* flags to get up to the ENABLE bits and the CAUSE bits.  */
-#define ENABLE_SHIFT 16
-#define CAUSE_SHIFT 8
+  excepts &= FE_ALL_EXCEPT;
 
-#endif /* _FENV_LIBC_H */
+  __sim_cw_thread &= ~(excepts >> ENABLE_SHIFT);
+
+  return old_exc;
+}
diff --git a/sysdeps/loongarch/nofpu/feenablxcpt.c b/sysdeps/loongarch/nofpu/feenablxcpt.c
new file mode 100644
index 0000000000..8dfbe371ea
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/feenablxcpt.c
@@ -0,0 +1,32 @@
+/* Enable exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+feenableexcept (int excepts)
+{
+  int old_exc = (__sim_cw_thread & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
+
+  excepts &= FE_ALL_EXCEPT;
+
+  __sim_cw_thread |= excepts >> ENABLE_SHIFT;
+
+  return old_exc;
+}
diff --git a/sysdeps/loongarch/nofpu/fegetenv.c b/sysdeps/loongarch/nofpu/fegetenv.c
new file mode 100644
index 0000000000..7bccaf0250
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fegetenv.c
@@ -0,0 +1,32 @@
+/* Store current floating-point environment (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+__fegetenv (fenv_t *envp)
+{
+
+  envp->__fp_control_register = __sim_cw_thread;
+
+  return 0;
+}
+
+libm_hidden_def (__fegetenv) weak_alias (__fegetenv, fegetenv)
+libm_hidden_weak (fegetenv)
diff --git a/sysdeps/loongarch/nofpu/fegetexcept.c b/sysdeps/loongarch/nofpu/fegetexcept.c
new file mode 100644
index 0000000000..fab16a6485
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fegetexcept.c
@@ -0,0 +1,26 @@
+/* Get floating-point exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fegetexcept (void)
+{
+  return (__sim_cw_thread & _FPU_ENABLE_MASK) << ENABLE_SHIFT;
+}
diff --git a/sysdeps/loongarch/nofpu/fegetmode.c b/sysdeps/loongarch/nofpu/fegetmode.c
new file mode 100644
index 0000000000..7751fe86a0
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fegetmode.c
@@ -0,0 +1,27 @@
+/* Store current floating-point control modes (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fegetmode (femode_t *modep)
+{
+  *modep = __sim_cw_thread;
+  return 0;
+}
diff --git a/sysdeps/loongarch/nofpu/fegetround.c b/sysdeps/loongarch/nofpu/fegetround.c
new file mode 100644
index 0000000000..db440c1707
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fegetround.c
@@ -0,0 +1,29 @@
+/* Return current rounding mode (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+__fegetround (void)
+{
+  return __sim_cw_thread & _FPU_RC_MASK;
+}
+
+libm_hidden_def (__fegetround) weak_alias (__fegetround, fegetround)
+libm_hidden_weak (fegetround)
diff --git a/sysdeps/loongarch/nofpu/feholdexcpt.c b/sysdeps/loongarch/nofpu/feholdexcpt.c
new file mode 100644
index 0000000000..bbf106f41e
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/feholdexcpt.c
@@ -0,0 +1,37 @@
+/* Store current floating-point environment and clear exceptions
+   (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+__feholdexcept (fenv_t *envp)
+{
+
+  envp->__fp_control_register = __sim_cw_thread;
+
+  /* Clear all exception enable bits and flags.  */
+  __sim_cw_thread &= ~(_FPU_MASK_V | _FPU_MASK_Z | _FPU_MASK_O | _FPU_MASK_U
+		      | _FPU_MASK_I | FE_ALL_EXCEPT);
+
+  return 0;
+}
+
+libm_hidden_def (__feholdexcept) weak_alias (__feholdexcept, feholdexcept)
+libm_hidden_weak (feholdexcept)
diff --git a/sysdeps/loongarch/nofpu/fesetenv.c b/sysdeps/loongarch/nofpu/fesetenv.c
new file mode 100644
index 0000000000..31fd258cdb
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fesetenv.c
@@ -0,0 +1,37 @@
+/* Set floating point environment (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+__fesetenv (const fenv_t *envp)
+{
+
+  if (envp == FE_DFL_ENV)
+    __sim_cw_thread = _FPU_DEFAULT;
+  else if (envp == FE_NOMASK_ENV)
+    __sim_cw_thread = _FPU_IEEE;
+  else
+    __sim_cw_thread = envp->__fp_control_register;
+
+  return 0;
+}
+
+libm_hidden_def (__fesetenv) weak_alias (__fesetenv, fesetenv)
+libm_hidden_weak (fesetenv)
diff --git a/sysdeps/loongarch/nofpu/fesetexcept.c b/sysdeps/loongarch/nofpu/fesetexcept.c
new file mode 100644
index 0000000000..bceff28844
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fesetexcept.c
@@ -0,0 +1,27 @@
+/* Set given exception flags (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fesetexcept (int excepts)
+{
+  __sim_cw_thread |= excepts & FE_ALL_EXCEPT;
+  return 0;
+}
diff --git a/sysdeps/loongarch/nofpu/fesetmode.c b/sysdeps/loongarch/nofpu/fesetmode.c
new file mode 100644
index 0000000000..185c97372b
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fesetmode.c
@@ -0,0 +1,34 @@
+/* Install given floating-point control modes (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+#define FCSR_STATUS 0x1f1f0000
+
+int
+fesetmode (const femode_t *modep)
+{
+  __sim_cw_thread &= FCSR_STATUS;
+  if (modep == FE_DFL_MODE)
+    __sim_cw_thread |= _FPU_DEFAULT;
+  else
+    __sim_cw_thread |= *modep & ~FCSR_STATUS;
+
+  return 0;
+}
diff --git a/sysdeps/loongarch/nofpu/fesetround.c b/sysdeps/loongarch/nofpu/fesetround.c
new file mode 100644
index 0000000000..6b16ce0828
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fesetround.c
@@ -0,0 +1,36 @@
+/* Set rounding mode (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+__fesetround (int round)
+{
+  if ((round & ~_FPU_RC_MASK) != 0)
+    /* ROUND is no valid rounding mode.  */
+    return 1;
+
+  /* Set rounding bits.  */
+  __sim_cw_thread &= ~_FPU_RC_MASK;
+  __sim_cw_thread |= round;
+
+  return 0;
+}
+libm_hidden_def (__fesetround) weak_alias (__fesetround, fesetround)
+libm_hidden_weak (fesetround)
diff --git a/sysdeps/loongarch/nofpu/feupdateenv.c b/sysdeps/loongarch/nofpu/feupdateenv.c
new file mode 100644
index 0000000000..1f7c1c475f
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/feupdateenv.c
@@ -0,0 +1,43 @@
+/* Install given floating-point environment and raise exceptions
+   (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+#include <signal.h>
+
+int
+__feupdateenv (const fenv_t *envp)
+{
+  int temp;
+
+  temp = __sim_cw_thread & FE_ALL_EXCEPT;
+
+  /* Install new environment.  */
+  __fesetenv (envp);
+
+  /* Raise the saved exception.  Incidentally for us the implementation
+     defined format of the values in objects of type fexcept_t is the
+     same as the ones specified using the FE_* constants.  */
+  __feraiseexcept (temp);
+
+  return 0;
+}
+
+libm_hidden_def (__feupdateenv) weak_alias (__feupdateenv, feupdateenv)
+libm_hidden_weak (feupdateenv)
diff --git a/sysdeps/loongarch/nofpu/fgetexcptflg.c b/sysdeps/loongarch/nofpu/fgetexcptflg.c
new file mode 100644
index 0000000000..dd16932966
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fgetexcptflg.c
@@ -0,0 +1,28 @@
+/* Store current representation for exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fegetexceptflag (fexcept_t *flagp, int excepts)
+{
+  *flagp = (fexcept_t) __sim_cw_thread & excepts & FE_ALL_EXCEPT;
+
+  return 0;
+}
diff --git a/sysdeps/loongarch/nofpu/fraiseexcpt.c b/sysdeps/loongarch/nofpu/fraiseexcpt.c
new file mode 100644
index 0000000000..b701da1f86
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fraiseexcpt.c
@@ -0,0 +1,42 @@
+/* Raise given exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+#include <signal.h>
+
+int
+__feraiseexcept (int excepts)
+{
+  int enable;
+  /* Set flag bits (which are accumulative), and *also* set the
+     cause bits.  The setting of the cause bits is what actually causes
+     the hardware to generate the exception, if the corresponding enable
+     bit is set as well.  */
+
+  excepts &= FE_ALL_EXCEPT;
+  __sim_cw_thread |= excepts | (excepts << CAUSE_SHIFT);
+  enable = __sim_cw_thread & _FPU_ENABLE_MASK;
+  if (excepts & __sim_cw_thread & (enable << ENABLE_SHIFT))
+    raise (SIGFPE);
+
+  return 0;
+}
+
+libm_hidden_def (__feraiseexcept) weak_alias (__feraiseexcept, feraiseexcept)
+libm_hidden_weak (feraiseexcept)
diff --git a/sysdeps/loongarch/nofpu/fsetexcptflg.c b/sysdeps/loongarch/nofpu/fsetexcptflg.c
new file mode 100644
index 0000000000..cd7dd18b9c
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/fsetexcptflg.c
@@ -0,0 +1,35 @@
+/* Set floating-point environment exception handling (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fesetexceptflag (const fexcept_t *flagp, int excepts)
+{
+  /* Make sure the flags we want restored are legal.  */
+  excepts &= FE_ALL_EXCEPT;
+
+  /* Now clear the bits called for, and copy them in from flagp.  Note that
+     we ignore all non-flag bits from *flagp, so they don't matter.  */
+  __sim_cw_thread = (__sim_cw_thread & ~excepts) | (*flagp & excepts);
+
+
+  /* Success.  */
+  return 0;
+}
diff --git a/sysdeps/loongarch/nofpu/ftestexcept.c b/sysdeps/loongarch/nofpu/ftestexcept.c
new file mode 100644
index 0000000000..549661c88d
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/ftestexcept.c
@@ -0,0 +1,27 @@
+/* Test floating-point exceptions (soft-float edition).
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+
+int
+fetestexcept (int excepts)
+{
+  return __sim_cw_thread & excepts & FE_ALL_EXCEPT;
+}
+libm_hidden_def (fetestexcept)
diff --git a/sysdeps/loongarch/nofpu/get-rounding-mode.h b/sysdeps/loongarch/nofpu/get-rounding-mode.h
new file mode 100644
index 0000000000..a4808cc54e
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/get-rounding-mode.h
@@ -0,0 +1,34 @@
+/* Determine floating-point rounding mode within libc (soft-float edition).
+   Copyright (C) 2024 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/>.  */
+
+#ifndef _LOONGARCH_NOFPU_GET_ROUNDING_MODE_H
+#define _LOONGARCH_NOFPU_GET_ROUNDING_MODE_H	1
+
+#include <fenv.h>
+#include <fpu_control.h>
+#include "soft-supp.h"
+
+/* Return the floating-point rounding mode.  */
+
+static inline int
+get_rounding_mode (void)
+{
+  return __sim_cw_thread & _FPU_RC_MASK;
+}
+
+#endif /* get-rounding-mode.h */
diff --git a/sysdeps/loongarch/nofpu/sim-full.c b/sysdeps/loongarch/nofpu/sim-full.c
new file mode 100644
index 0000000000..b10e5b2f4d
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/sim-full.c
@@ -0,0 +1,37 @@
+/* Software floating-point exception handling emulation.
+   Copyright (C) 2024 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 "soft-fp.h"
+#include "soft-supp.h"
+#include <signal.h>
+
+/* By default, no exceptions should trap.  */
+__thread int __sim_cw_thread;
+libc_hidden_tls_def (__sim_cw_thread);
+
+void
+__simulate_exceptions (int excepts)
+{
+  int enable;
+  __sim_cw_thread |= excepts;
+
+  enable = __sim_cw_thread & _FPU_ENABLE_MASK;
+  if (excepts & __sim_cw_thread & (enable << ENABLE_SHIFT))
+    raise (SIGFPE);
+}
+libc_hidden_def (__simulate_exceptions)
diff --git a/sysdeps/loongarch/nofpu/soft-supp.h b/sysdeps/loongarch/nofpu/soft-supp.h
new file mode 100644
index 0000000000..8d3ba09764
--- /dev/null
+++ b/sysdeps/loongarch/nofpu/soft-supp.h
@@ -0,0 +1,22 @@
+/* Internal support stuff for complete soft float.
+   Copyright (C) 2024 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/>.  */
+
+extern __thread int __sim_cw_thread attribute_tls_model_ie;
+libc_hidden_tls_proto (__sim_cw_thread, tls_model ("initial-exec"));
+
+extern void __simulate_exceptions (int excepts);
diff --git a/sysdeps/loongarch/sfp-machine.h b/sysdeps/loongarch/sfp-machine.h
index cbf66500db..eda6c66423 100644
--- a/sysdeps/loongarch/sfp-machine.h
+++ b/sysdeps/loongarch/sfp-machine.h
@@ -64,10 +64,6 @@
     } \
   while (0)
 
-#define _FP_DECL_EX fpu_control_t _fcw
-
-#define FP_ROUNDMODE (_fcw & 0x300)
-
 #define FP_RND_NEAREST FE_TONEAREST
 #define FP_RND_ZERO FE_TOWARDZERO
 #define FP_RND_PINF FE_UPWARD
@@ -82,6 +78,8 @@
 #define _FP_TININESS_AFTER_ROUNDING 1
 
 #ifdef __loongarch_hard_float
+#define _FP_DECL_EX fpu_control_t _fcw
+#define FP_ROUNDMODE (_fcw & 0x300)
 #define FP_INIT_ROUNDMODE \
   do \
     { \
@@ -98,5 +96,12 @@
   while (0)
 #define FP_TRAPPING_EXCEPTIONS ((_fcw << 16) & 0x1f0000)
 #else
-#define FP_INIT_ROUNDMODE _fcw = FP_RND_NEAREST
+#define FP_HANDLE_EXCEPTIONS	__simulate_exceptions (_fex)
+#define FP_ROUNDMODE		(__sim_cw_thread & _FPU_RC_MASK)
+#define FP_TRAPPING_EXCEPTIONS	(__sim_cw_thread & _FPU_ENABLE_MASK)
+
+extern __thread int __sim_cw_thread attribute_tls_model_ie;
+libc_hidden_tls_proto (__sim_cw_thread, tls_model ("initial-exec"));
+extern void __simulate_exceptions (int excepts);
+libc_hidden_proto (__simulate_exceptions)
 #endif
diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist b/sysdeps/unix/sysv/linux/loongarch/lp64/fpu/libc.abilist
similarity index 100%
rename from sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist
rename to sysdeps/unix/sysv/linux/loongarch/lp64/fpu/libc.abilist
diff --git a/sysdeps/unix/sysv/linux/loongarch/localplt.data b/sysdeps/unix/sysv/linux/loongarch/lp64/fpu/localplt.data
similarity index 100%
rename from sysdeps/unix/sysv/linux/loongarch/localplt.data
rename to sysdeps/unix/sysv/linux/loongarch/lp64/fpu/localplt.data
diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/Implies b/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/Implies
new file mode 100644
index 0000000000..1090fb545a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/Implies
@@ -0,0 +1 @@
+loongarch/nofpu
diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/libc.abilist
new file mode 100644
index 0000000000..a04afcfd1f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/libc.abilist
@@ -0,0 +1,2295 @@
+GLIBC_2.36 _Exit F
+GLIBC_2.36 _Fork F
+GLIBC_2.36 _IO_2_1_stderr_ D 0xe0
+GLIBC_2.36 _IO_2_1_stdin_ D 0xe0
+GLIBC_2.36 _IO_2_1_stdout_ D 0xe0
+GLIBC_2.36 _IO_adjust_column F
+GLIBC_2.36 _IO_adjust_wcolumn F
+GLIBC_2.36 _IO_default_doallocate F
+GLIBC_2.36 _IO_default_finish F
+GLIBC_2.36 _IO_default_pbackfail F
+GLIBC_2.36 _IO_default_uflow F
+GLIBC_2.36 _IO_default_xsgetn F
+GLIBC_2.36 _IO_default_xsputn F
+GLIBC_2.36 _IO_do_write F
+GLIBC_2.36 _IO_doallocbuf F
+GLIBC_2.36 _IO_fclose F
+GLIBC_2.36 _IO_fdopen F
+GLIBC_2.36 _IO_feof F
+GLIBC_2.36 _IO_ferror F
+GLIBC_2.36 _IO_fflush F
+GLIBC_2.36 _IO_fgetpos F
+GLIBC_2.36 _IO_fgetpos64 F
+GLIBC_2.36 _IO_fgets F
+GLIBC_2.36 _IO_file_attach F
+GLIBC_2.36 _IO_file_close F
+GLIBC_2.36 _IO_file_close_it F
+GLIBC_2.36 _IO_file_doallocate F
+GLIBC_2.36 _IO_file_finish F
+GLIBC_2.36 _IO_file_fopen F
+GLIBC_2.36 _IO_file_init F
+GLIBC_2.36 _IO_file_jumps D 0xa8
+GLIBC_2.36 _IO_file_open F
+GLIBC_2.36 _IO_file_overflow F
+GLIBC_2.36 _IO_file_read F
+GLIBC_2.36 _IO_file_seek F
+GLIBC_2.36 _IO_file_seekoff F
+GLIBC_2.36 _IO_file_setbuf F
+GLIBC_2.36 _IO_file_stat F
+GLIBC_2.36 _IO_file_sync F
+GLIBC_2.36 _IO_file_underflow F
+GLIBC_2.36 _IO_file_write F
+GLIBC_2.36 _IO_file_xsputn F
+GLIBC_2.36 _IO_flockfile F
+GLIBC_2.36 _IO_flush_all F
+GLIBC_2.36 _IO_flush_all_linebuffered F
+GLIBC_2.36 _IO_fopen F
+GLIBC_2.36 _IO_fprintf F
+GLIBC_2.36 _IO_fputs F
+GLIBC_2.36 _IO_fread F
+GLIBC_2.36 _IO_free_backup_area F
+GLIBC_2.36 _IO_free_wbackup_area F
+GLIBC_2.36 _IO_fsetpos F
+GLIBC_2.36 _IO_fsetpos64 F
+GLIBC_2.36 _IO_ftell F
+GLIBC_2.36 _IO_ftrylockfile F
+GLIBC_2.36 _IO_funlockfile F
+GLIBC_2.36 _IO_fwrite F
+GLIBC_2.36 _IO_getc F
+GLIBC_2.36 _IO_getline F
+GLIBC_2.36 _IO_getline_info F
+GLIBC_2.36 _IO_gets F
+GLIBC_2.36 _IO_init F
+GLIBC_2.36 _IO_init_marker F
+GLIBC_2.36 _IO_init_wmarker F
+GLIBC_2.36 _IO_iter_begin F
+GLIBC_2.36 _IO_iter_end F
+GLIBC_2.36 _IO_iter_file F
+GLIBC_2.36 _IO_iter_next F
+GLIBC_2.36 _IO_least_wmarker F
+GLIBC_2.36 _IO_link_in F
+GLIBC_2.36 _IO_list_all D 0x8
+GLIBC_2.36 _IO_list_lock F
+GLIBC_2.36 _IO_list_resetlock F
+GLIBC_2.36 _IO_list_unlock F
+GLIBC_2.36 _IO_marker_delta F
+GLIBC_2.36 _IO_marker_difference F
+GLIBC_2.36 _IO_padn F
+GLIBC_2.36 _IO_peekc_locked F
+GLIBC_2.36 _IO_popen F
+GLIBC_2.36 _IO_printf F
+GLIBC_2.36 _IO_proc_close F
+GLIBC_2.36 _IO_proc_open F
+GLIBC_2.36 _IO_putc F
+GLIBC_2.36 _IO_puts F
+GLIBC_2.36 _IO_remove_marker F
+GLIBC_2.36 _IO_seekmark F
+GLIBC_2.36 _IO_seekoff F
+GLIBC_2.36 _IO_seekpos F
+GLIBC_2.36 _IO_seekwmark F
+GLIBC_2.36 _IO_setb F
+GLIBC_2.36 _IO_setbuffer F
+GLIBC_2.36 _IO_setvbuf F
+GLIBC_2.36 _IO_sgetn F
+GLIBC_2.36 _IO_sprintf F
+GLIBC_2.36 _IO_sputbackc F
+GLIBC_2.36 _IO_sputbackwc F
+GLIBC_2.36 _IO_sscanf F
+GLIBC_2.36 _IO_str_init_readonly F
+GLIBC_2.36 _IO_str_init_static F
+GLIBC_2.36 _IO_str_overflow F
+GLIBC_2.36 _IO_str_pbackfail F
+GLIBC_2.36 _IO_str_seekoff F
+GLIBC_2.36 _IO_str_underflow F
+GLIBC_2.36 _IO_sungetc F
+GLIBC_2.36 _IO_sungetwc F
+GLIBC_2.36 _IO_switch_to_get_mode F
+GLIBC_2.36 _IO_switch_to_main_wget_area F
+GLIBC_2.36 _IO_switch_to_wbackup_area F
+GLIBC_2.36 _IO_switch_to_wget_mode F
+GLIBC_2.36 _IO_un_link F
+GLIBC_2.36 _IO_ungetc F
+GLIBC_2.36 _IO_unsave_markers F
+GLIBC_2.36 _IO_unsave_wmarkers F
+GLIBC_2.36 _IO_vfprintf F
+GLIBC_2.36 _IO_vsprintf F
+GLIBC_2.36 _IO_wdefault_doallocate F
+GLIBC_2.36 _IO_wdefault_finish F
+GLIBC_2.36 _IO_wdefault_pbackfail F
+GLIBC_2.36 _IO_wdefault_uflow F
+GLIBC_2.36 _IO_wdefault_xsgetn F
+GLIBC_2.36 _IO_wdefault_xsputn F
+GLIBC_2.36 _IO_wdo_write F
+GLIBC_2.36 _IO_wdoallocbuf F
+GLIBC_2.36 _IO_wfile_jumps D 0xa8
+GLIBC_2.36 _IO_wfile_overflow F
+GLIBC_2.36 _IO_wfile_seekoff F
+GLIBC_2.36 _IO_wfile_sync F
+GLIBC_2.36 _IO_wfile_underflow F
+GLIBC_2.36 _IO_wfile_xsputn F
+GLIBC_2.36 _IO_wmarker_delta F
+GLIBC_2.36 _IO_wsetb F
+GLIBC_2.36 __adjtimex F
+GLIBC_2.36 __argz_count F
+GLIBC_2.36 __argz_next F
+GLIBC_2.36 __argz_stringify F
+GLIBC_2.36 __asprintf F
+GLIBC_2.36 __asprintf_chk F
+GLIBC_2.36 __assert F
+GLIBC_2.36 __assert_fail F
+GLIBC_2.36 __assert_perror_fail F
+GLIBC_2.36 __backtrace F
+GLIBC_2.36 __backtrace_symbols F
+GLIBC_2.36 __backtrace_symbols_fd F
+GLIBC_2.36 __bsd_getpgrp F
+GLIBC_2.36 __bzero F
+GLIBC_2.36 __check_rhosts_file D 0x4
+GLIBC_2.36 __chk_fail F
+GLIBC_2.36 __clone F
+GLIBC_2.36 __close F
+GLIBC_2.36 __cmsg_nxthdr F
+GLIBC_2.36 __confstr_chk F
+GLIBC_2.36 __connect F
+GLIBC_2.36 __ctype_b_loc F
+GLIBC_2.36 __ctype_get_mb_cur_max F
+GLIBC_2.36 __ctype_tolower_loc F
+GLIBC_2.36 __ctype_toupper_loc F
+GLIBC_2.36 __curbrk D 0x8
+GLIBC_2.36 __cxa_at_quick_exit F
+GLIBC_2.36 __cxa_atexit F
+GLIBC_2.36 __cxa_finalize F
+GLIBC_2.36 __cxa_thread_atexit_impl F
+GLIBC_2.36 __cyg_profile_func_enter F
+GLIBC_2.36 __cyg_profile_func_exit F
+GLIBC_2.36 __daylight D 0x4
+GLIBC_2.36 __dcgettext F
+GLIBC_2.36 __dgettext F
+GLIBC_2.36 __dprintf_chk F
+GLIBC_2.36 __dup2 F
+GLIBC_2.36 __duplocale F
+GLIBC_2.36 __endmntent F
+GLIBC_2.36 __environ D 0x8
+GLIBC_2.36 __errno_location F
+GLIBC_2.36 __explicit_bzero_chk F
+GLIBC_2.36 __fbufsize F
+GLIBC_2.36 __fcntl F
+GLIBC_2.36 __fdelt_chk F
+GLIBC_2.36 __fdelt_warn F
+GLIBC_2.36 __ffs F
+GLIBC_2.36 __fgets_chk F
+GLIBC_2.36 __fgets_unlocked_chk F
+GLIBC_2.36 __fgetws_chk F
+GLIBC_2.36 __fgetws_unlocked_chk F
+GLIBC_2.36 __finite F
+GLIBC_2.36 __finitef F
+GLIBC_2.36 __finitel F
+GLIBC_2.36 __flbf F
+GLIBC_2.36 __fork F
+GLIBC_2.36 __fpending F
+GLIBC_2.36 __fprintf_chk F
+GLIBC_2.36 __fpu_control D 0x4
+GLIBC_2.36 __fpurge F
+GLIBC_2.36 __fread_chk F
+GLIBC_2.36 __fread_unlocked_chk F
+GLIBC_2.36 __freadable F
+GLIBC_2.36 __freading F
+GLIBC_2.36 __freelocale F
+GLIBC_2.36 __fsetlocking F
+GLIBC_2.36 __fwprintf_chk F
+GLIBC_2.36 __fwritable F
+GLIBC_2.36 __fwriting F
+GLIBC_2.36 __getauxval F
+GLIBC_2.36 __getcwd_chk F
+GLIBC_2.36 __getdelim F
+GLIBC_2.36 __getdomainname_chk F
+GLIBC_2.36 __getgroups_chk F
+GLIBC_2.36 __gethostname_chk F
+GLIBC_2.36 __getlogin_r_chk F
+GLIBC_2.36 __getmntent_r F
+GLIBC_2.36 __getpagesize F
+GLIBC_2.36 __getpgid F
+GLIBC_2.36 __getpid F
+GLIBC_2.36 __gets_chk F
+GLIBC_2.36 __gettimeofday F
+GLIBC_2.36 __getwd_chk F
+GLIBC_2.36 __gmtime_r F
+GLIBC_2.36 __h_errno_location F
+GLIBC_2.36 __isalnum_l F
+GLIBC_2.36 __isalpha_l F
+GLIBC_2.36 __isascii_l F
+GLIBC_2.36 __isblank_l F
+GLIBC_2.36 __iscntrl_l F
+GLIBC_2.36 __isctype F
+GLIBC_2.36 __isdigit_l F
+GLIBC_2.36 __isgraph_l F
+GLIBC_2.36 __isinf F
+GLIBC_2.36 __isinff F
+GLIBC_2.36 __isinfl F
+GLIBC_2.36 __islower_l F
+GLIBC_2.36 __isnan F
+GLIBC_2.36 __isnanf F
+GLIBC_2.36 __isnanl F
+GLIBC_2.36 __isoc99_fscanf F
+GLIBC_2.36 __isoc99_fwscanf F
+GLIBC_2.36 __isoc99_scanf F
+GLIBC_2.36 __isoc99_sscanf F
+GLIBC_2.36 __isoc99_swscanf F
+GLIBC_2.36 __isoc99_vfscanf F
+GLIBC_2.36 __isoc99_vfwscanf F
+GLIBC_2.36 __isoc99_vscanf F
+GLIBC_2.36 __isoc99_vsscanf F
+GLIBC_2.36 __isoc99_vswscanf F
+GLIBC_2.36 __isoc99_vwscanf F
+GLIBC_2.36 __isoc99_wscanf F
+GLIBC_2.36 __isprint_l F
+GLIBC_2.36 __ispunct_l F
+GLIBC_2.36 __isspace_l F
+GLIBC_2.36 __isupper_l F
+GLIBC_2.36 __iswalnum_l F
+GLIBC_2.36 __iswalpha_l F
+GLIBC_2.36 __iswblank_l F
+GLIBC_2.36 __iswcntrl_l F
+GLIBC_2.36 __iswctype F
+GLIBC_2.36 __iswctype_l F
+GLIBC_2.36 __iswdigit_l F
+GLIBC_2.36 __iswgraph_l F
+GLIBC_2.36 __iswlower_l F
+GLIBC_2.36 __iswprint_l F
+GLIBC_2.36 __iswpunct_l F
+GLIBC_2.36 __iswspace_l F
+GLIBC_2.36 __iswupper_l F
+GLIBC_2.36 __iswxdigit_l F
+GLIBC_2.36 __isxdigit_l F
+GLIBC_2.36 __ivaliduser F
+GLIBC_2.36 __libc_allocate_rtsig F
+GLIBC_2.36 __libc_calloc F
+GLIBC_2.36 __libc_current_sigrtmax F
+GLIBC_2.36 __libc_current_sigrtmin F
+GLIBC_2.36 __libc_free F
+GLIBC_2.36 __libc_freeres F
+GLIBC_2.36 __libc_init_first F
+GLIBC_2.36 __libc_mallinfo F
+GLIBC_2.36 __libc_malloc F
+GLIBC_2.36 __libc_mallopt F
+GLIBC_2.36 __libc_memalign F
+GLIBC_2.36 __libc_pvalloc F
+GLIBC_2.36 __libc_realloc F
+GLIBC_2.36 __libc_sa_len F
+GLIBC_2.36 __libc_single_threaded D 0x1
+GLIBC_2.36 __libc_start_main F
+GLIBC_2.36 __libc_valloc F
+GLIBC_2.36 __longjmp_chk F
+GLIBC_2.36 __lseek F
+GLIBC_2.36 __mbrlen F
+GLIBC_2.36 __mbrtowc F
+GLIBC_2.36 __mbsnrtowcs_chk F
+GLIBC_2.36 __mbsrtowcs_chk F
+GLIBC_2.36 __mbstowcs_chk F
+GLIBC_2.36 __memcmpeq F
+GLIBC_2.36 __memcpy_chk F
+GLIBC_2.36 __memmove_chk F
+GLIBC_2.36 __mempcpy F
+GLIBC_2.36 __mempcpy_chk F
+GLIBC_2.36 __memset_chk F
+GLIBC_2.36 __monstartup F
+GLIBC_2.36 __mq_open_2 F
+GLIBC_2.36 __nanosleep F
+GLIBC_2.36 __newlocale F
+GLIBC_2.36 __nl_langinfo_l F
+GLIBC_2.36 __nss_configure_lookup F
+GLIBC_2.36 __nss_hostname_digits_dots F
+GLIBC_2.36 __obstack_printf_chk F
+GLIBC_2.36 __obstack_vprintf_chk F
+GLIBC_2.36 __open F
+GLIBC_2.36 __open64 F
+GLIBC_2.36 __open64_2 F
+GLIBC_2.36 __open_2 F
+GLIBC_2.36 __openat64_2 F
+GLIBC_2.36 __openat_2 F
+GLIBC_2.36 __overflow F
+GLIBC_2.36 __pipe F
+GLIBC_2.36 __poll F
+GLIBC_2.36 __poll_chk F
+GLIBC_2.36 __posix_getopt F
+GLIBC_2.36 __ppoll_chk F
+GLIBC_2.36 __pread64 F
+GLIBC_2.36 __pread64_chk F
+GLIBC_2.36 __pread_chk F
+GLIBC_2.36 __printf_chk F
+GLIBC_2.36 __printf_fp F
+GLIBC_2.36 __profile_frequency F
+GLIBC_2.36 __progname D 0x8
+GLIBC_2.36 __progname_full D 0x8
+GLIBC_2.36 __pthread_cleanup_routine F
+GLIBC_2.36 __pthread_key_create F
+GLIBC_2.36 __pthread_register_cancel F
+GLIBC_2.36 __pthread_register_cancel_defer F
+GLIBC_2.36 __pthread_rwlock_unlock F
+GLIBC_2.36 __pthread_unregister_cancel F
+GLIBC_2.36 __pthread_unregister_cancel_restore F
+GLIBC_2.36 __pthread_unwind_next F
+GLIBC_2.36 __ptsname_r_chk F
+GLIBC_2.36 __pwrite64 F
+GLIBC_2.36 __rawmemchr F
+GLIBC_2.36 __rcmd_errstr D 0x8
+GLIBC_2.36 __read F
+GLIBC_2.36 __read_chk F
+GLIBC_2.36 __readlink_chk F
+GLIBC_2.36 __readlinkat_chk F
+GLIBC_2.36 __realpath_chk F
+GLIBC_2.36 __recv_chk F
+GLIBC_2.36 __recvfrom_chk F
+GLIBC_2.36 __register_atfork F
+GLIBC_2.36 __res_init F
+GLIBC_2.36 __res_nclose F
+GLIBC_2.36 __res_ninit F
+GLIBC_2.36 __res_randomid F
+GLIBC_2.36 __res_state F
+GLIBC_2.36 __sbrk F
+GLIBC_2.36 __sched_cpualloc F
+GLIBC_2.36 __sched_cpucount F
+GLIBC_2.36 __sched_cpufree F
+GLIBC_2.36 __sched_get_priority_max F
+GLIBC_2.36 __sched_get_priority_min F
+GLIBC_2.36 __sched_getparam F
+GLIBC_2.36 __sched_getscheduler F
+GLIBC_2.36 __sched_setscheduler F
+GLIBC_2.36 __sched_yield F
+GLIBC_2.36 __select F
+GLIBC_2.36 __send F
+GLIBC_2.36 __setmntent F
+GLIBC_2.36 __setpgid F
+GLIBC_2.36 __sigaction F
+GLIBC_2.36 __signbit F
+GLIBC_2.36 __signbitf F
+GLIBC_2.36 __signbitl F
+GLIBC_2.36 __sigpause F
+GLIBC_2.36 __sigsetjmp F
+GLIBC_2.36 __sigsuspend F
+GLIBC_2.36 __snprintf_chk F
+GLIBC_2.36 __sprintf_chk F
+GLIBC_2.36 __stack_chk_fail F
+GLIBC_2.36 __statfs F
+GLIBC_2.36 __stpcpy F
+GLIBC_2.36 __stpcpy_chk F
+GLIBC_2.36 __stpncpy F
+GLIBC_2.36 __stpncpy_chk F
+GLIBC_2.36 __strcasecmp F
+GLIBC_2.36 __strcasecmp_l F
+GLIBC_2.36 __strcasestr F
+GLIBC_2.36 __strcat_chk F
+GLIBC_2.36 __strcoll_l F
+GLIBC_2.36 __strcpy_chk F
+GLIBC_2.36 __strdup F
+GLIBC_2.36 __strerror_r F
+GLIBC_2.36 __strfmon_l F
+GLIBC_2.36 __strftime_l F
+GLIBC_2.36 __strncasecmp_l F
+GLIBC_2.36 __strncat_chk F
+GLIBC_2.36 __strncpy_chk F
+GLIBC_2.36 __strndup F
+GLIBC_2.36 __strsep_g F
+GLIBC_2.36 __strtod_internal F
+GLIBC_2.36 __strtod_l F
+GLIBC_2.36 __strtof_internal F
+GLIBC_2.36 __strtof_l F
+GLIBC_2.36 __strtok_r F
+GLIBC_2.36 __strtol_internal F
+GLIBC_2.36 __strtol_l F
+GLIBC_2.36 __strtold_internal F
+GLIBC_2.36 __strtold_l F
+GLIBC_2.36 __strtoll_internal F
+GLIBC_2.36 __strtoll_l F
+GLIBC_2.36 __strtoul_internal F
+GLIBC_2.36 __strtoul_l F
+GLIBC_2.36 __strtoull_internal F
+GLIBC_2.36 __strtoull_l F
+GLIBC_2.36 __strverscmp F
+GLIBC_2.36 __strxfrm_l F
+GLIBC_2.36 __swprintf_chk F
+GLIBC_2.36 __sysconf F
+GLIBC_2.36 __syslog_chk F
+GLIBC_2.36 __sysv_signal F
+GLIBC_2.36 __timezone D 0x8
+GLIBC_2.36 __toascii_l F
+GLIBC_2.36 __tolower_l F
+GLIBC_2.36 __toupper_l F
+GLIBC_2.36 __towctrans F
+GLIBC_2.36 __towctrans_l F
+GLIBC_2.36 __towlower_l F
+GLIBC_2.36 __towupper_l F
+GLIBC_2.36 __ttyname_r_chk F
+GLIBC_2.36 __tzname D 0x10
+GLIBC_2.36 __uflow F
+GLIBC_2.36 __underflow F
+GLIBC_2.36 __uselocale F
+GLIBC_2.36 __vasprintf_chk F
+GLIBC_2.36 __vdprintf_chk F
+GLIBC_2.36 __vfork F
+GLIBC_2.36 __vfprintf_chk F
+GLIBC_2.36 __vfscanf F
+GLIBC_2.36 __vfwprintf_chk F
+GLIBC_2.36 __vprintf_chk F
+GLIBC_2.36 __vsnprintf F
+GLIBC_2.36 __vsnprintf_chk F
+GLIBC_2.36 __vsprintf_chk F
+GLIBC_2.36 __vsscanf F
+GLIBC_2.36 __vswprintf_chk F
+GLIBC_2.36 __vsyslog_chk F
+GLIBC_2.36 __vwprintf_chk F
+GLIBC_2.36 __wait F
+GLIBC_2.36 __waitpid F
+GLIBC_2.36 __wcpcpy_chk F
+GLIBC_2.36 __wcpncpy_chk F
+GLIBC_2.36 __wcrtomb_chk F
+GLIBC_2.36 __wcscasecmp_l F
+GLIBC_2.36 __wcscat_chk F
+GLIBC_2.36 __wcscoll_l F
+GLIBC_2.36 __wcscpy_chk F
+GLIBC_2.36 __wcsftime_l F
+GLIBC_2.36 __wcsncasecmp_l F
+GLIBC_2.36 __wcsncat_chk F
+GLIBC_2.36 __wcsncpy_chk F
+GLIBC_2.36 __wcsnrtombs_chk F
+GLIBC_2.36 __wcsrtombs_chk F
+GLIBC_2.36 __wcstod_internal F
+GLIBC_2.36 __wcstod_l F
+GLIBC_2.36 __wcstof_internal F
+GLIBC_2.36 __wcstof_l F
+GLIBC_2.36 __wcstol_internal F
+GLIBC_2.36 __wcstol_l F
+GLIBC_2.36 __wcstold_internal F
+GLIBC_2.36 __wcstold_l F
+GLIBC_2.36 __wcstoll_internal F
+GLIBC_2.36 __wcstoll_l F
+GLIBC_2.36 __wcstombs_chk F
+GLIBC_2.36 __wcstoul_internal F
+GLIBC_2.36 __wcstoul_l F
+GLIBC_2.36 __wcstoull_internal F
+GLIBC_2.36 __wcstoull_l F
+GLIBC_2.36 __wcsxfrm_l F
+GLIBC_2.36 __wctomb_chk F
+GLIBC_2.36 __wctrans_l F
+GLIBC_2.36 __wctype_l F
+GLIBC_2.36 __wmemcpy_chk F
+GLIBC_2.36 __wmemmove_chk F
+GLIBC_2.36 __wmempcpy_chk F
+GLIBC_2.36 __wmemset_chk F
+GLIBC_2.36 __woverflow F
+GLIBC_2.36 __wprintf_chk F
+GLIBC_2.36 __write F
+GLIBC_2.36 __wuflow F
+GLIBC_2.36 __wunderflow F
+GLIBC_2.36 __xpg_basename F
+GLIBC_2.36 __xpg_sigpause F
+GLIBC_2.36 __xpg_strerror_r F
+GLIBC_2.36 _dl_find_object F
+GLIBC_2.36 _dl_mcount_wrapper F
+GLIBC_2.36 _dl_mcount_wrapper_check F
+GLIBC_2.36 _environ D 0x8
+GLIBC_2.36 _exit F
+GLIBC_2.36 _flushlbf F
+GLIBC_2.36 _libc_intl_domainname D 0x5
+GLIBC_2.36 _longjmp F
+GLIBC_2.36 _mcleanup F
+GLIBC_2.36 _mcount F
+GLIBC_2.36 _nl_default_dirname D 0x12
+GLIBC_2.36 _nl_domain_bindings D 0x8
+GLIBC_2.36 _nl_msg_cat_cntr D 0x4
+GLIBC_2.36 _obstack_allocated_p F
+GLIBC_2.36 _obstack_begin F
+GLIBC_2.36 _obstack_begin_1 F
+GLIBC_2.36 _obstack_free F
+GLIBC_2.36 _obstack_memory_used F
+GLIBC_2.36 _obstack_newchunk F
+GLIBC_2.36 _pthread_cleanup_pop F
+GLIBC_2.36 _pthread_cleanup_push F
+GLIBC_2.36 _res D 0x238
+GLIBC_2.36 _res_hconf D 0x48
+GLIBC_2.36 _setjmp F
+GLIBC_2.36 _tolower F
+GLIBC_2.36 _toupper F
+GLIBC_2.36 a64l F
+GLIBC_2.36 abort F
+GLIBC_2.36 abs F
+GLIBC_2.36 accept F
+GLIBC_2.36 accept4 F
+GLIBC_2.36 access F
+GLIBC_2.36 acct F
+GLIBC_2.36 addmntent F
+GLIBC_2.36 addseverity F
+GLIBC_2.36 adjtime F
+GLIBC_2.36 adjtimex F
+GLIBC_2.36 aio_cancel F
+GLIBC_2.36 aio_cancel64 F
+GLIBC_2.36 aio_error F
+GLIBC_2.36 aio_error64 F
+GLIBC_2.36 aio_fsync F
+GLIBC_2.36 aio_fsync64 F
+GLIBC_2.36 aio_init F
+GLIBC_2.36 aio_read F
+GLIBC_2.36 aio_read64 F
+GLIBC_2.36 aio_return F
+GLIBC_2.36 aio_return64 F
+GLIBC_2.36 aio_suspend F
+GLIBC_2.36 aio_suspend64 F
+GLIBC_2.36 aio_write F
+GLIBC_2.36 aio_write64 F
+GLIBC_2.36 alarm F
+GLIBC_2.36 aligned_alloc F
+GLIBC_2.36 alphasort F
+GLIBC_2.36 alphasort64 F
+GLIBC_2.36 arc4random F
+GLIBC_2.36 arc4random_buf F
+GLIBC_2.36 arc4random_uniform F
+GLIBC_2.36 argp_err_exit_status D 0x4
+GLIBC_2.36 argp_error F
+GLIBC_2.36 argp_failure F
+GLIBC_2.36 argp_help F
+GLIBC_2.36 argp_parse F
+GLIBC_2.36 argp_program_bug_address D 0x8
+GLIBC_2.36 argp_program_version D 0x8
+GLIBC_2.36 argp_program_version_hook D 0x8
+GLIBC_2.36 argp_state_help F
+GLIBC_2.36 argp_usage F
+GLIBC_2.36 argz_add F
+GLIBC_2.36 argz_add_sep F
+GLIBC_2.36 argz_append F
+GLIBC_2.36 argz_count F
+GLIBC_2.36 argz_create F
+GLIBC_2.36 argz_create_sep F
+GLIBC_2.36 argz_delete F
+GLIBC_2.36 argz_extract F
+GLIBC_2.36 argz_insert F
+GLIBC_2.36 argz_next F
+GLIBC_2.36 argz_replace F
+GLIBC_2.36 argz_stringify F
+GLIBC_2.36 asctime F
+GLIBC_2.36 asctime_r F
+GLIBC_2.36 asprintf F
+GLIBC_2.36 atof F
+GLIBC_2.36 atoi F
+GLIBC_2.36 atol F
+GLIBC_2.36 atoll F
+GLIBC_2.36 backtrace F
+GLIBC_2.36 backtrace_symbols F
+GLIBC_2.36 backtrace_symbols_fd F
+GLIBC_2.36 basename F
+GLIBC_2.36 bcmp F
+GLIBC_2.36 bcopy F
+GLIBC_2.36 bind F
+GLIBC_2.36 bind_textdomain_codeset F
+GLIBC_2.36 bindresvport F
+GLIBC_2.36 bindtextdomain F
+GLIBC_2.36 brk F
+GLIBC_2.36 bsd_signal F
+GLIBC_2.36 bsearch F
+GLIBC_2.36 btowc F
+GLIBC_2.36 bzero F
+GLIBC_2.36 c16rtomb F
+GLIBC_2.36 c32rtomb F
+GLIBC_2.36 c8rtomb F
+GLIBC_2.36 call_once F
+GLIBC_2.36 calloc F
+GLIBC_2.36 canonicalize_file_name F
+GLIBC_2.36 capget F
+GLIBC_2.36 capset F
+GLIBC_2.36 catclose F
+GLIBC_2.36 catgets F
+GLIBC_2.36 catopen F
+GLIBC_2.36 cfgetispeed F
+GLIBC_2.36 cfgetospeed F
+GLIBC_2.36 cfmakeraw F
+GLIBC_2.36 cfsetispeed F
+GLIBC_2.36 cfsetospeed F
+GLIBC_2.36 cfsetspeed F
+GLIBC_2.36 chdir F
+GLIBC_2.36 chflags F
+GLIBC_2.36 chmod F
+GLIBC_2.36 chown F
+GLIBC_2.36 chroot F
+GLIBC_2.36 clearenv F
+GLIBC_2.36 clearerr F
+GLIBC_2.36 clearerr_unlocked F
+GLIBC_2.36 clock F
+GLIBC_2.36 clock_adjtime F
+GLIBC_2.36 clock_getcpuclockid F
+GLIBC_2.36 clock_getres F
+GLIBC_2.36 clock_gettime F
+GLIBC_2.36 clock_nanosleep F
+GLIBC_2.36 clock_settime F
+GLIBC_2.36 clone F
+GLIBC_2.36 close F
+GLIBC_2.36 close_range F
+GLIBC_2.36 closedir F
+GLIBC_2.36 closefrom F
+GLIBC_2.36 closelog F
+GLIBC_2.36 cnd_broadcast F
+GLIBC_2.36 cnd_destroy F
+GLIBC_2.36 cnd_init F
+GLIBC_2.36 cnd_signal F
+GLIBC_2.36 cnd_timedwait F
+GLIBC_2.36 cnd_wait F
+GLIBC_2.36 confstr F
+GLIBC_2.36 connect F
+GLIBC_2.36 copy_file_range F
+GLIBC_2.36 copysign F
+GLIBC_2.36 copysignf F
+GLIBC_2.36 copysignl F
+GLIBC_2.36 creat F
+GLIBC_2.36 creat64 F
+GLIBC_2.36 ctermid F
+GLIBC_2.36 ctime F
+GLIBC_2.36 ctime_r F
+GLIBC_2.36 cuserid F
+GLIBC_2.36 daemon F
+GLIBC_2.36 daylight D 0x4
+GLIBC_2.36 dcgettext F
+GLIBC_2.36 dcngettext F
+GLIBC_2.36 delete_module F
+GLIBC_2.36 dgettext F
+GLIBC_2.36 difftime F
+GLIBC_2.36 dirfd F
+GLIBC_2.36 dirname F
+GLIBC_2.36 div F
+GLIBC_2.36 dl_iterate_phdr F
+GLIBC_2.36 dladdr F
+GLIBC_2.36 dladdr1 F
+GLIBC_2.36 dlclose F
+GLIBC_2.36 dlerror F
+GLIBC_2.36 dlinfo F
+GLIBC_2.36 dlmopen F
+GLIBC_2.36 dlopen F
+GLIBC_2.36 dlsym F
+GLIBC_2.36 dlvsym F
+GLIBC_2.36 dn_comp F
+GLIBC_2.36 dn_expand F
+GLIBC_2.36 dn_skipname F
+GLIBC_2.36 dngettext F
+GLIBC_2.36 dprintf F
+GLIBC_2.36 drand48 F
+GLIBC_2.36 drand48_r F
+GLIBC_2.36 dup F
+GLIBC_2.36 dup2 F
+GLIBC_2.36 dup3 F
+GLIBC_2.36 duplocale F
+GLIBC_2.36 dysize F
+GLIBC_2.36 eaccess F
+GLIBC_2.36 ecvt F
+GLIBC_2.36 ecvt_r F
+GLIBC_2.36 endaliasent F
+GLIBC_2.36 endfsent F
+GLIBC_2.36 endgrent F
+GLIBC_2.36 endhostent F
+GLIBC_2.36 endmntent F
+GLIBC_2.36 endnetent F
+GLIBC_2.36 endnetgrent F
+GLIBC_2.36 endprotoent F
+GLIBC_2.36 endpwent F
+GLIBC_2.36 endrpcent F
+GLIBC_2.36 endservent F
+GLIBC_2.36 endsgent F
+GLIBC_2.36 endspent F
+GLIBC_2.36 endttyent F
+GLIBC_2.36 endusershell F
+GLIBC_2.36 endutent F
+GLIBC_2.36 endutxent F
+GLIBC_2.36 environ D 0x8
+GLIBC_2.36 envz_add F
+GLIBC_2.36 envz_entry F
+GLIBC_2.36 envz_get F
+GLIBC_2.36 envz_merge F
+GLIBC_2.36 envz_remove F
+GLIBC_2.36 envz_strip F
+GLIBC_2.36 epoll_create F
+GLIBC_2.36 epoll_create1 F
+GLIBC_2.36 epoll_ctl F
+GLIBC_2.36 epoll_pwait F
+GLIBC_2.36 epoll_pwait2 F
+GLIBC_2.36 epoll_wait F
+GLIBC_2.36 erand48 F
+GLIBC_2.36 erand48_r F
+GLIBC_2.36 err F
+GLIBC_2.36 error F
+GLIBC_2.36 error_at_line F
+GLIBC_2.36 error_message_count D 0x4
+GLIBC_2.36 error_one_per_line D 0x4
+GLIBC_2.36 error_print_progname D 0x8
+GLIBC_2.36 errx F
+GLIBC_2.36 ether_aton F
+GLIBC_2.36 ether_aton_r F
+GLIBC_2.36 ether_hostton F
+GLIBC_2.36 ether_line F
+GLIBC_2.36 ether_ntoa F
+GLIBC_2.36 ether_ntoa_r F
+GLIBC_2.36 ether_ntohost F
+GLIBC_2.36 euidaccess F
+GLIBC_2.36 eventfd F
+GLIBC_2.36 eventfd_read F
+GLIBC_2.36 eventfd_write F
+GLIBC_2.36 execl F
+GLIBC_2.36 execle F
+GLIBC_2.36 execlp F
+GLIBC_2.36 execv F
+GLIBC_2.36 execve F
+GLIBC_2.36 execveat F
+GLIBC_2.36 execvp F
+GLIBC_2.36 execvpe F
+GLIBC_2.36 exit F
+GLIBC_2.36 explicit_bzero F
+GLIBC_2.36 faccessat F
+GLIBC_2.36 fallocate F
+GLIBC_2.36 fallocate64 F
+GLIBC_2.36 fanotify_init F
+GLIBC_2.36 fanotify_mark F
+GLIBC_2.36 fchdir F
+GLIBC_2.36 fchflags F
+GLIBC_2.36 fchmod F
+GLIBC_2.36 fchmodat F
+GLIBC_2.36 fchown F
+GLIBC_2.36 fchownat F
+GLIBC_2.36 fclose F
+GLIBC_2.36 fcloseall F
+GLIBC_2.36 fcntl F
+GLIBC_2.36 fcntl64 F
+GLIBC_2.36 fcvt F
+GLIBC_2.36 fcvt_r F
+GLIBC_2.36 fdatasync F
+GLIBC_2.36 fdopen F
+GLIBC_2.36 fdopendir F
+GLIBC_2.36 feof F
+GLIBC_2.36 feof_unlocked F
+GLIBC_2.36 ferror F
+GLIBC_2.36 ferror_unlocked F
+GLIBC_2.36 fexecve F
+GLIBC_2.36 fflush F
+GLIBC_2.36 fflush_unlocked F
+GLIBC_2.36 ffs F
+GLIBC_2.36 ffsl F
+GLIBC_2.36 ffsll F
+GLIBC_2.36 fgetc F
+GLIBC_2.36 fgetc_unlocked F
+GLIBC_2.36 fgetgrent F
+GLIBC_2.36 fgetgrent_r F
+GLIBC_2.36 fgetpos F
+GLIBC_2.36 fgetpos64 F
+GLIBC_2.36 fgetpwent F
+GLIBC_2.36 fgetpwent_r F
+GLIBC_2.36 fgets F
+GLIBC_2.36 fgets_unlocked F
+GLIBC_2.36 fgetsgent F
+GLIBC_2.36 fgetsgent_r F
+GLIBC_2.36 fgetspent F
+GLIBC_2.36 fgetspent_r F
+GLIBC_2.36 fgetwc F
+GLIBC_2.36 fgetwc_unlocked F
+GLIBC_2.36 fgetws F
+GLIBC_2.36 fgetws_unlocked F
+GLIBC_2.36 fgetxattr F
+GLIBC_2.36 fileno F
+GLIBC_2.36 fileno_unlocked F
+GLIBC_2.36 finite F
+GLIBC_2.36 finitef F
+GLIBC_2.36 finitel F
+GLIBC_2.36 flistxattr F
+GLIBC_2.36 flock F
+GLIBC_2.36 flockfile F
+GLIBC_2.36 fmemopen F
+GLIBC_2.36 fmtmsg F
+GLIBC_2.36 fnmatch F
+GLIBC_2.36 fopen F
+GLIBC_2.36 fopen64 F
+GLIBC_2.36 fopencookie F
+GLIBC_2.36 fork F
+GLIBC_2.36 forkpty F
+GLIBC_2.36 fpathconf F
+GLIBC_2.36 fprintf F
+GLIBC_2.36 fputc F
+GLIBC_2.36 fputc_unlocked F
+GLIBC_2.36 fputs F
+GLIBC_2.36 fputs_unlocked F
+GLIBC_2.36 fputwc F
+GLIBC_2.36 fputwc_unlocked F
+GLIBC_2.36 fputws F
+GLIBC_2.36 fputws_unlocked F
+GLIBC_2.36 fread F
+GLIBC_2.36 fread_unlocked F
+GLIBC_2.36 free F
+GLIBC_2.36 freeaddrinfo F
+GLIBC_2.36 freeifaddrs F
+GLIBC_2.36 freelocale F
+GLIBC_2.36 fremovexattr F
+GLIBC_2.36 freopen F
+GLIBC_2.36 freopen64 F
+GLIBC_2.36 frexp F
+GLIBC_2.36 frexpf F
+GLIBC_2.36 frexpl F
+GLIBC_2.36 fscanf F
+GLIBC_2.36 fsconfig F
+GLIBC_2.36 fseek F
+GLIBC_2.36 fseeko F
+GLIBC_2.36 fseeko64 F
+GLIBC_2.36 fsetpos F
+GLIBC_2.36 fsetpos64 F
+GLIBC_2.36 fsetxattr F
+GLIBC_2.36 fsmount F
+GLIBC_2.36 fsopen F
+GLIBC_2.36 fspick F
+GLIBC_2.36 fstat F
+GLIBC_2.36 fstat64 F
+GLIBC_2.36 fstatat F
+GLIBC_2.36 fstatat64 F
+GLIBC_2.36 fstatfs F
+GLIBC_2.36 fstatfs64 F
+GLIBC_2.36 fstatvfs F
+GLIBC_2.36 fstatvfs64 F
+GLIBC_2.36 fsync F
+GLIBC_2.36 ftell F
+GLIBC_2.36 ftello F
+GLIBC_2.36 ftello64 F
+GLIBC_2.36 ftime F
+GLIBC_2.36 ftok F
+GLIBC_2.36 ftruncate F
+GLIBC_2.36 ftruncate64 F
+GLIBC_2.36 ftrylockfile F
+GLIBC_2.36 fts64_children F
+GLIBC_2.36 fts64_close F
+GLIBC_2.36 fts64_open F
+GLIBC_2.36 fts64_read F
+GLIBC_2.36 fts64_set F
+GLIBC_2.36 fts_children F
+GLIBC_2.36 fts_close F
+GLIBC_2.36 fts_open F
+GLIBC_2.36 fts_read F
+GLIBC_2.36 fts_set F
+GLIBC_2.36 ftw F
+GLIBC_2.36 ftw64 F
+GLIBC_2.36 funlockfile F
+GLIBC_2.36 futimens F
+GLIBC_2.36 futimes F
+GLIBC_2.36 futimesat F
+GLIBC_2.36 fwide F
+GLIBC_2.36 fwprintf F
+GLIBC_2.36 fwrite F
+GLIBC_2.36 fwrite_unlocked F
+GLIBC_2.36 fwscanf F
+GLIBC_2.36 gai_cancel F
+GLIBC_2.36 gai_error F
+GLIBC_2.36 gai_strerror F
+GLIBC_2.36 gai_suspend F
+GLIBC_2.36 gcvt F
+GLIBC_2.36 get_avphys_pages F
+GLIBC_2.36 get_current_dir_name F
+GLIBC_2.36 get_nprocs F
+GLIBC_2.36 get_nprocs_conf F
+GLIBC_2.36 get_phys_pages F
+GLIBC_2.36 getaddrinfo F
+GLIBC_2.36 getaddrinfo_a F
+GLIBC_2.36 getaliasbyname F
+GLIBC_2.36 getaliasbyname_r F
+GLIBC_2.36 getaliasent F
+GLIBC_2.36 getaliasent_r F
+GLIBC_2.36 getauxval F
+GLIBC_2.36 getc F
+GLIBC_2.36 getc_unlocked F
+GLIBC_2.36 getchar F
+GLIBC_2.36 getchar_unlocked F
+GLIBC_2.36 getcontext F
+GLIBC_2.36 getcpu F
+GLIBC_2.36 getcwd F
+GLIBC_2.36 getdate F
+GLIBC_2.36 getdate_err D 0x4
+GLIBC_2.36 getdate_r F
+GLIBC_2.36 getdelim F
+GLIBC_2.36 getdents64 F
+GLIBC_2.36 getdirentries F
+GLIBC_2.36 getdirentries64 F
+GLIBC_2.36 getdomainname F
+GLIBC_2.36 getdtablesize F
+GLIBC_2.36 getegid F
+GLIBC_2.36 getentropy F
+GLIBC_2.36 getenv F
+GLIBC_2.36 geteuid F
+GLIBC_2.36 getfsent F
+GLIBC_2.36 getfsfile F
+GLIBC_2.36 getfsspec F
+GLIBC_2.36 getgid F
+GLIBC_2.36 getgrent F
+GLIBC_2.36 getgrent_r F
+GLIBC_2.36 getgrgid F
+GLIBC_2.36 getgrgid_r F
+GLIBC_2.36 getgrnam F
+GLIBC_2.36 getgrnam_r F
+GLIBC_2.36 getgrouplist F
+GLIBC_2.36 getgroups F
+GLIBC_2.36 gethostbyaddr F
+GLIBC_2.36 gethostbyaddr_r F
+GLIBC_2.36 gethostbyname F
+GLIBC_2.36 gethostbyname2 F
+GLIBC_2.36 gethostbyname2_r F
+GLIBC_2.36 gethostbyname_r F
+GLIBC_2.36 gethostent F
+GLIBC_2.36 gethostent_r F
+GLIBC_2.36 gethostid F
+GLIBC_2.36 gethostname F
+GLIBC_2.36 getifaddrs F
+GLIBC_2.36 getipv4sourcefilter F
+GLIBC_2.36 getitimer F
+GLIBC_2.36 getline F
+GLIBC_2.36 getloadavg F
+GLIBC_2.36 getlogin F
+GLIBC_2.36 getlogin_r F
+GLIBC_2.36 getmntent F
+GLIBC_2.36 getmntent_r F
+GLIBC_2.36 getnameinfo F
+GLIBC_2.36 getnetbyaddr F
+GLIBC_2.36 getnetbyaddr_r F
+GLIBC_2.36 getnetbyname F
+GLIBC_2.36 getnetbyname_r F
+GLIBC_2.36 getnetent F
+GLIBC_2.36 getnetent_r F
+GLIBC_2.36 getnetgrent F
+GLIBC_2.36 getnetgrent_r F
+GLIBC_2.36 getopt F
+GLIBC_2.36 getopt_long F
+GLIBC_2.36 getopt_long_only F
+GLIBC_2.36 getpagesize F
+GLIBC_2.36 getpass F
+GLIBC_2.36 getpeername F
+GLIBC_2.36 getpgid F
+GLIBC_2.36 getpgrp F
+GLIBC_2.36 getpid F
+GLIBC_2.36 getppid F
+GLIBC_2.36 getpriority F
+GLIBC_2.36 getprotobyname F
+GLIBC_2.36 getprotobyname_r F
+GLIBC_2.36 getprotobynumber F
+GLIBC_2.36 getprotobynumber_r F
+GLIBC_2.36 getprotoent F
+GLIBC_2.36 getprotoent_r F
+GLIBC_2.36 getpt F
+GLIBC_2.36 getpw F
+GLIBC_2.36 getpwent F
+GLIBC_2.36 getpwent_r F
+GLIBC_2.36 getpwnam F
+GLIBC_2.36 getpwnam_r F
+GLIBC_2.36 getpwuid F
+GLIBC_2.36 getpwuid_r F
+GLIBC_2.36 getrandom F
+GLIBC_2.36 getresgid F
+GLIBC_2.36 getresuid F
+GLIBC_2.36 getrlimit F
+GLIBC_2.36 getrlimit64 F
+GLIBC_2.36 getrpcbyname F
+GLIBC_2.36 getrpcbyname_r F
+GLIBC_2.36 getrpcbynumber F
+GLIBC_2.36 getrpcbynumber_r F
+GLIBC_2.36 getrpcent F
+GLIBC_2.36 getrpcent_r F
+GLIBC_2.36 getrusage F
+GLIBC_2.36 gets F
+GLIBC_2.36 getservbyname F
+GLIBC_2.36 getservbyname_r F
+GLIBC_2.36 getservbyport F
+GLIBC_2.36 getservbyport_r F
+GLIBC_2.36 getservent F
+GLIBC_2.36 getservent_r F
+GLIBC_2.36 getsgent F
+GLIBC_2.36 getsgent_r F
+GLIBC_2.36 getsgnam F
+GLIBC_2.36 getsgnam_r F
+GLIBC_2.36 getsid F
+GLIBC_2.36 getsockname F
+GLIBC_2.36 getsockopt F
+GLIBC_2.36 getsourcefilter F
+GLIBC_2.36 getspent F
+GLIBC_2.36 getspent_r F
+GLIBC_2.36 getspnam F
+GLIBC_2.36 getspnam_r F
+GLIBC_2.36 getsubopt F
+GLIBC_2.36 gettext F
+GLIBC_2.36 gettid F
+GLIBC_2.36 gettimeofday F
+GLIBC_2.36 getttyent F
+GLIBC_2.36 getttynam F
+GLIBC_2.36 getuid F
+GLIBC_2.36 getusershell F
+GLIBC_2.36 getutent F
+GLIBC_2.36 getutent_r F
+GLIBC_2.36 getutid F
+GLIBC_2.36 getutid_r F
+GLIBC_2.36 getutline F
+GLIBC_2.36 getutline_r F
+GLIBC_2.36 getutmp F
+GLIBC_2.36 getutmpx F
+GLIBC_2.36 getutxent F
+GLIBC_2.36 getutxid F
+GLIBC_2.36 getutxline F
+GLIBC_2.36 getw F
+GLIBC_2.36 getwc F
+GLIBC_2.36 getwc_unlocked F
+GLIBC_2.36 getwchar F
+GLIBC_2.36 getwchar_unlocked F
+GLIBC_2.36 getwd F
+GLIBC_2.36 getxattr F
+GLIBC_2.36 glob F
+GLIBC_2.36 glob64 F
+GLIBC_2.36 glob_pattern_p F
+GLIBC_2.36 globfree F
+GLIBC_2.36 globfree64 F
+GLIBC_2.36 gmtime F
+GLIBC_2.36 gmtime_r F
+GLIBC_2.36 gnu_dev_major F
+GLIBC_2.36 gnu_dev_makedev F
+GLIBC_2.36 gnu_dev_minor F
+GLIBC_2.36 gnu_get_libc_release F
+GLIBC_2.36 gnu_get_libc_version F
+GLIBC_2.36 grantpt F
+GLIBC_2.36 group_member F
+GLIBC_2.36 gsignal F
+GLIBC_2.36 gtty F
+GLIBC_2.36 h_errlist D 0x28
+GLIBC_2.36 h_nerr D 0x4
+GLIBC_2.36 hasmntopt F
+GLIBC_2.36 hcreate F
+GLIBC_2.36 hcreate_r F
+GLIBC_2.36 hdestroy F
+GLIBC_2.36 hdestroy_r F
+GLIBC_2.36 herror F
+GLIBC_2.36 hsearch F
+GLIBC_2.36 hsearch_r F
+GLIBC_2.36 hstrerror F
+GLIBC_2.36 htonl F
+GLIBC_2.36 htons F
+GLIBC_2.36 iconv F
+GLIBC_2.36 iconv_close F
+GLIBC_2.36 iconv_open F
+GLIBC_2.36 if_freenameindex F
+GLIBC_2.36 if_indextoname F
+GLIBC_2.36 if_nameindex F
+GLIBC_2.36 if_nametoindex F
+GLIBC_2.36 imaxabs F
+GLIBC_2.36 imaxdiv F
+GLIBC_2.36 in6addr_any D 0x10
+GLIBC_2.36 in6addr_loopback D 0x10
+GLIBC_2.36 index F
+GLIBC_2.36 inet6_opt_append F
+GLIBC_2.36 inet6_opt_find F
+GLIBC_2.36 inet6_opt_finish F
+GLIBC_2.36 inet6_opt_get_val F
+GLIBC_2.36 inet6_opt_init F
+GLIBC_2.36 inet6_opt_next F
+GLIBC_2.36 inet6_opt_set_val F
+GLIBC_2.36 inet6_option_alloc F
+GLIBC_2.36 inet6_option_append F
+GLIBC_2.36 inet6_option_find F
+GLIBC_2.36 inet6_option_init F
+GLIBC_2.36 inet6_option_next F
+GLIBC_2.36 inet6_option_space F
+GLIBC_2.36 inet6_rth_add F
+GLIBC_2.36 inet6_rth_getaddr F
+GLIBC_2.36 inet6_rth_init F
+GLIBC_2.36 inet6_rth_reverse F
+GLIBC_2.36 inet6_rth_segments F
+GLIBC_2.36 inet6_rth_space F
+GLIBC_2.36 inet_addr F
+GLIBC_2.36 inet_aton F
+GLIBC_2.36 inet_lnaof F
+GLIBC_2.36 inet_makeaddr F
+GLIBC_2.36 inet_netof F
+GLIBC_2.36 inet_network F
+GLIBC_2.36 inet_nsap_addr F
+GLIBC_2.36 inet_nsap_ntoa F
+GLIBC_2.36 inet_ntoa F
+GLIBC_2.36 inet_ntop F
+GLIBC_2.36 inet_pton F
+GLIBC_2.36 init_module F
+GLIBC_2.36 initgroups F
+GLIBC_2.36 initstate F
+GLIBC_2.36 initstate_r F
+GLIBC_2.36 innetgr F
+GLIBC_2.36 inotify_add_watch F
+GLIBC_2.36 inotify_init F
+GLIBC_2.36 inotify_init1 F
+GLIBC_2.36 inotify_rm_watch F
+GLIBC_2.36 insque F
+GLIBC_2.36 ioctl F
+GLIBC_2.36 iruserok F
+GLIBC_2.36 iruserok_af F
+GLIBC_2.36 isalnum F
+GLIBC_2.36 isalnum_l F
+GLIBC_2.36 isalpha F
+GLIBC_2.36 isalpha_l F
+GLIBC_2.36 isascii F
+GLIBC_2.36 isatty F
+GLIBC_2.36 isblank F
+GLIBC_2.36 isblank_l F
+GLIBC_2.36 iscntrl F
+GLIBC_2.36 iscntrl_l F
+GLIBC_2.36 isctype F
+GLIBC_2.36 isdigit F
+GLIBC_2.36 isdigit_l F
+GLIBC_2.36 isfdtype F
+GLIBC_2.36 isgraph F
+GLIBC_2.36 isgraph_l F
+GLIBC_2.36 isinf F
+GLIBC_2.36 isinff F
+GLIBC_2.36 isinfl F
+GLIBC_2.36 islower F
+GLIBC_2.36 islower_l F
+GLIBC_2.36 isnan F
+GLIBC_2.36 isnanf F
+GLIBC_2.36 isnanl F
+GLIBC_2.36 isprint F
+GLIBC_2.36 isprint_l F
+GLIBC_2.36 ispunct F
+GLIBC_2.36 ispunct_l F
+GLIBC_2.36 isspace F
+GLIBC_2.36 isspace_l F
+GLIBC_2.36 isupper F
+GLIBC_2.36 isupper_l F
+GLIBC_2.36 iswalnum F
+GLIBC_2.36 iswalnum_l F
+GLIBC_2.36 iswalpha F
+GLIBC_2.36 iswalpha_l F
+GLIBC_2.36 iswblank F
+GLIBC_2.36 iswblank_l F
+GLIBC_2.36 iswcntrl F
+GLIBC_2.36 iswcntrl_l F
+GLIBC_2.36 iswctype F
+GLIBC_2.36 iswctype_l F
+GLIBC_2.36 iswdigit F
+GLIBC_2.36 iswdigit_l F
+GLIBC_2.36 iswgraph F
+GLIBC_2.36 iswgraph_l F
+GLIBC_2.36 iswlower F
+GLIBC_2.36 iswlower_l F
+GLIBC_2.36 iswprint F
+GLIBC_2.36 iswprint_l F
+GLIBC_2.36 iswpunct F
+GLIBC_2.36 iswpunct_l F
+GLIBC_2.36 iswspace F
+GLIBC_2.36 iswspace_l F
+GLIBC_2.36 iswupper F
+GLIBC_2.36 iswupper_l F
+GLIBC_2.36 iswxdigit F
+GLIBC_2.36 iswxdigit_l F
+GLIBC_2.36 isxdigit F
+GLIBC_2.36 isxdigit_l F
+GLIBC_2.36 jrand48 F
+GLIBC_2.36 jrand48_r F
+GLIBC_2.36 kill F
+GLIBC_2.36 killpg F
+GLIBC_2.36 klogctl F
+GLIBC_2.36 l64a F
+GLIBC_2.36 labs F
+GLIBC_2.36 lchmod F
+GLIBC_2.36 lchown F
+GLIBC_2.36 lckpwdf F
+GLIBC_2.36 lcong48 F
+GLIBC_2.36 lcong48_r F
+GLIBC_2.36 ldexp F
+GLIBC_2.36 ldexpf F
+GLIBC_2.36 ldexpl F
+GLIBC_2.36 ldiv F
+GLIBC_2.36 lfind F
+GLIBC_2.36 lgetxattr F
+GLIBC_2.36 link F
+GLIBC_2.36 linkat F
+GLIBC_2.36 lio_listio F
+GLIBC_2.36 lio_listio64 F
+GLIBC_2.36 listen F
+GLIBC_2.36 listxattr F
+GLIBC_2.36 llabs F
+GLIBC_2.36 lldiv F
+GLIBC_2.36 llistxattr F
+GLIBC_2.36 localeconv F
+GLIBC_2.36 localtime F
+GLIBC_2.36 localtime_r F
+GLIBC_2.36 lockf F
+GLIBC_2.36 lockf64 F
+GLIBC_2.36 login F
+GLIBC_2.36 login_tty F
+GLIBC_2.36 logout F
+GLIBC_2.36 logwtmp F
+GLIBC_2.36 longjmp F
+GLIBC_2.36 lrand48 F
+GLIBC_2.36 lrand48_r F
+GLIBC_2.36 lremovexattr F
+GLIBC_2.36 lsearch F
+GLIBC_2.36 lseek F
+GLIBC_2.36 lseek64 F
+GLIBC_2.36 lsetxattr F
+GLIBC_2.36 lstat F
+GLIBC_2.36 lstat64 F
+GLIBC_2.36 lutimes F
+GLIBC_2.36 madvise F
+GLIBC_2.36 makecontext F
+GLIBC_2.36 mallinfo F
+GLIBC_2.36 mallinfo2 F
+GLIBC_2.36 malloc F
+GLIBC_2.36 malloc_info F
+GLIBC_2.36 malloc_stats F
+GLIBC_2.36 malloc_trim F
+GLIBC_2.36 malloc_usable_size F
+GLIBC_2.36 mallopt F
+GLIBC_2.36 mblen F
+GLIBC_2.36 mbrlen F
+GLIBC_2.36 mbrtoc16 F
+GLIBC_2.36 mbrtoc32 F
+GLIBC_2.36 mbrtoc8 F
+GLIBC_2.36 mbrtowc F
+GLIBC_2.36 mbsinit F
+GLIBC_2.36 mbsnrtowcs F
+GLIBC_2.36 mbsrtowcs F
+GLIBC_2.36 mbstowcs F
+GLIBC_2.36 mbtowc F
+GLIBC_2.36 mcheck F
+GLIBC_2.36 mcheck_check_all F
+GLIBC_2.36 mcheck_pedantic F
+GLIBC_2.36 memalign F
+GLIBC_2.36 memccpy F
+GLIBC_2.36 memchr F
+GLIBC_2.36 memcmp F
+GLIBC_2.36 memcpy F
+GLIBC_2.36 memfd_create F
+GLIBC_2.36 memfrob F
+GLIBC_2.36 memmem F
+GLIBC_2.36 memmove F
+GLIBC_2.36 mempcpy F
+GLIBC_2.36 memrchr F
+GLIBC_2.36 memset F
+GLIBC_2.36 mincore F
+GLIBC_2.36 mkdir F
+GLIBC_2.36 mkdirat F
+GLIBC_2.36 mkdtemp F
+GLIBC_2.36 mkfifo F
+GLIBC_2.36 mkfifoat F
+GLIBC_2.36 mknod F
+GLIBC_2.36 mknodat F
+GLIBC_2.36 mkostemp F
+GLIBC_2.36 mkostemp64 F
+GLIBC_2.36 mkostemps F
+GLIBC_2.36 mkostemps64 F
+GLIBC_2.36 mkstemp F
+GLIBC_2.36 mkstemp64 F
+GLIBC_2.36 mkstemps F
+GLIBC_2.36 mkstemps64 F
+GLIBC_2.36 mktemp F
+GLIBC_2.36 mktime F
+GLIBC_2.36 mlock F
+GLIBC_2.36 mlock2 F
+GLIBC_2.36 mlockall F
+GLIBC_2.36 mmap F
+GLIBC_2.36 mmap64 F
+GLIBC_2.36 modf F
+GLIBC_2.36 modff F
+GLIBC_2.36 modfl F
+GLIBC_2.36 moncontrol F
+GLIBC_2.36 monstartup F
+GLIBC_2.36 mount F
+GLIBC_2.36 mount_setattr F
+GLIBC_2.36 move_mount F
+GLIBC_2.36 mprobe F
+GLIBC_2.36 mprotect F
+GLIBC_2.36 mq_close F
+GLIBC_2.36 mq_getattr F
+GLIBC_2.36 mq_notify F
+GLIBC_2.36 mq_open F
+GLIBC_2.36 mq_receive F
+GLIBC_2.36 mq_send F
+GLIBC_2.36 mq_setattr F
+GLIBC_2.36 mq_timedreceive F
+GLIBC_2.36 mq_timedsend F
+GLIBC_2.36 mq_unlink F
+GLIBC_2.36 mrand48 F
+GLIBC_2.36 mrand48_r F
+GLIBC_2.36 mremap F
+GLIBC_2.36 msgctl F
+GLIBC_2.36 msgget F
+GLIBC_2.36 msgrcv F
+GLIBC_2.36 msgsnd F
+GLIBC_2.36 msync F
+GLIBC_2.36 mtrace F
+GLIBC_2.36 mtx_destroy F
+GLIBC_2.36 mtx_init F
+GLIBC_2.36 mtx_lock F
+GLIBC_2.36 mtx_timedlock F
+GLIBC_2.36 mtx_trylock F
+GLIBC_2.36 mtx_unlock F
+GLIBC_2.36 munlock F
+GLIBC_2.36 munlockall F
+GLIBC_2.36 munmap F
+GLIBC_2.36 muntrace F
+GLIBC_2.36 name_to_handle_at F
+GLIBC_2.36 nanosleep F
+GLIBC_2.36 newlocale F
+GLIBC_2.36 nftw F
+GLIBC_2.36 nftw64 F
+GLIBC_2.36 ngettext F
+GLIBC_2.36 nice F
+GLIBC_2.36 nl_langinfo F
+GLIBC_2.36 nl_langinfo_l F
+GLIBC_2.36 nrand48 F
+GLIBC_2.36 nrand48_r F
+GLIBC_2.36 ns_name_compress F
+GLIBC_2.36 ns_name_ntop F
+GLIBC_2.36 ns_name_pack F
+GLIBC_2.36 ns_name_pton F
+GLIBC_2.36 ns_name_skip F
+GLIBC_2.36 ns_name_uncompress F
+GLIBC_2.36 ns_name_unpack F
+GLIBC_2.36 ntohl F
+GLIBC_2.36 ntohs F
+GLIBC_2.36 ntp_adjtime F
+GLIBC_2.36 ntp_gettime F
+GLIBC_2.36 ntp_gettimex F
+GLIBC_2.36 obstack_alloc_failed_handler D 0x8
+GLIBC_2.36 obstack_exit_failure D 0x4
+GLIBC_2.36 obstack_free F
+GLIBC_2.36 obstack_printf F
+GLIBC_2.36 obstack_vprintf F
+GLIBC_2.36 on_exit F
+GLIBC_2.36 open F
+GLIBC_2.36 open64 F
+GLIBC_2.36 open_by_handle_at F
+GLIBC_2.36 open_memstream F
+GLIBC_2.36 open_tree F
+GLIBC_2.36 open_wmemstream F
+GLIBC_2.36 openat F
+GLIBC_2.36 openat64 F
+GLIBC_2.36 opendir F
+GLIBC_2.36 openlog F
+GLIBC_2.36 openpty F
+GLIBC_2.36 optarg D 0x8
+GLIBC_2.36 opterr D 0x4
+GLIBC_2.36 optind D 0x4
+GLIBC_2.36 optopt D 0x4
+GLIBC_2.36 parse_printf_format F
+GLIBC_2.36 pathconf F
+GLIBC_2.36 pause F
+GLIBC_2.36 pclose F
+GLIBC_2.36 perror F
+GLIBC_2.36 personality F
+GLIBC_2.36 pidfd_getfd F
+GLIBC_2.36 pidfd_open F
+GLIBC_2.36 pidfd_send_signal F
+GLIBC_2.36 pipe F
+GLIBC_2.36 pipe2 F
+GLIBC_2.36 pivot_root F
+GLIBC_2.36 pkey_alloc F
+GLIBC_2.36 pkey_free F
+GLIBC_2.36 pkey_get F
+GLIBC_2.36 pkey_mprotect F
+GLIBC_2.36 pkey_set F
+GLIBC_2.36 poll F
+GLIBC_2.36 popen F
+GLIBC_2.36 posix_fadvise F
+GLIBC_2.36 posix_fadvise64 F
+GLIBC_2.36 posix_fallocate F
+GLIBC_2.36 posix_fallocate64 F
+GLIBC_2.36 posix_madvise F
+GLIBC_2.36 posix_memalign F
+GLIBC_2.36 posix_openpt F
+GLIBC_2.36 posix_spawn F
+GLIBC_2.36 posix_spawn_file_actions_addchdir_np F
+GLIBC_2.36 posix_spawn_file_actions_addclose F
+GLIBC_2.36 posix_spawn_file_actions_addclosefrom_np F
+GLIBC_2.36 posix_spawn_file_actions_adddup2 F
+GLIBC_2.36 posix_spawn_file_actions_addfchdir_np F
+GLIBC_2.36 posix_spawn_file_actions_addopen F
+GLIBC_2.36 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 posix_spawn_file_actions_destroy F
+GLIBC_2.36 posix_spawn_file_actions_init F
+GLIBC_2.36 posix_spawnattr_destroy F
+GLIBC_2.36 posix_spawnattr_getflags F
+GLIBC_2.36 posix_spawnattr_getpgroup F
+GLIBC_2.36 posix_spawnattr_getschedparam F
+GLIBC_2.36 posix_spawnattr_getschedpolicy F
+GLIBC_2.36 posix_spawnattr_getsigdefault F
+GLIBC_2.36 posix_spawnattr_getsigmask F
+GLIBC_2.36 posix_spawnattr_init F
+GLIBC_2.36 posix_spawnattr_setflags F
+GLIBC_2.36 posix_spawnattr_setpgroup F
+GLIBC_2.36 posix_spawnattr_setschedparam F
+GLIBC_2.36 posix_spawnattr_setschedpolicy F
+GLIBC_2.36 posix_spawnattr_setsigdefault F
+GLIBC_2.36 posix_spawnattr_setsigmask F
+GLIBC_2.36 posix_spawnp F
+GLIBC_2.36 ppoll F
+GLIBC_2.36 prctl F
+GLIBC_2.36 pread F
+GLIBC_2.36 pread64 F
+GLIBC_2.36 preadv F
+GLIBC_2.36 preadv2 F
+GLIBC_2.36 preadv64 F
+GLIBC_2.36 preadv64v2 F
+GLIBC_2.36 printf F
+GLIBC_2.36 printf_size F
+GLIBC_2.36 printf_size_info F
+GLIBC_2.36 prlimit F
+GLIBC_2.36 prlimit64 F
+GLIBC_2.36 process_madvise F
+GLIBC_2.36 process_mrelease F
+GLIBC_2.36 process_vm_readv F
+GLIBC_2.36 process_vm_writev F
+GLIBC_2.36 profil F
+GLIBC_2.36 program_invocation_name D 0x8
+GLIBC_2.36 program_invocation_short_name D 0x8
+GLIBC_2.36 pselect F
+GLIBC_2.36 psiginfo F
+GLIBC_2.36 psignal F
+GLIBC_2.36 pthread_attr_destroy F
+GLIBC_2.36 pthread_attr_getaffinity_np F
+GLIBC_2.36 pthread_attr_getdetachstate F
+GLIBC_2.36 pthread_attr_getguardsize F
+GLIBC_2.36 pthread_attr_getinheritsched F
+GLIBC_2.36 pthread_attr_getschedparam F
+GLIBC_2.36 pthread_attr_getschedpolicy F
+GLIBC_2.36 pthread_attr_getscope F
+GLIBC_2.36 pthread_attr_getsigmask_np F
+GLIBC_2.36 pthread_attr_getstack F
+GLIBC_2.36 pthread_attr_getstackaddr F
+GLIBC_2.36 pthread_attr_getstacksize F
+GLIBC_2.36 pthread_attr_init F
+GLIBC_2.36 pthread_attr_setaffinity_np F
+GLIBC_2.36 pthread_attr_setdetachstate F
+GLIBC_2.36 pthread_attr_setguardsize F
+GLIBC_2.36 pthread_attr_setinheritsched F
+GLIBC_2.36 pthread_attr_setschedparam F
+GLIBC_2.36 pthread_attr_setschedpolicy F
+GLIBC_2.36 pthread_attr_setscope F
+GLIBC_2.36 pthread_attr_setsigmask_np F
+GLIBC_2.36 pthread_attr_setstack F
+GLIBC_2.36 pthread_attr_setstackaddr F
+GLIBC_2.36 pthread_attr_setstacksize F
+GLIBC_2.36 pthread_barrier_destroy F
+GLIBC_2.36 pthread_barrier_init F
+GLIBC_2.36 pthread_barrier_wait F
+GLIBC_2.36 pthread_barrierattr_destroy F
+GLIBC_2.36 pthread_barrierattr_getpshared F
+GLIBC_2.36 pthread_barrierattr_init F
+GLIBC_2.36 pthread_barrierattr_setpshared F
+GLIBC_2.36 pthread_cancel F
+GLIBC_2.36 pthread_clockjoin_np F
+GLIBC_2.36 pthread_cond_broadcast F
+GLIBC_2.36 pthread_cond_clockwait F
+GLIBC_2.36 pthread_cond_destroy F
+GLIBC_2.36 pthread_cond_init F
+GLIBC_2.36 pthread_cond_signal F
+GLIBC_2.36 pthread_cond_timedwait F
+GLIBC_2.36 pthread_cond_wait F
+GLIBC_2.36 pthread_condattr_destroy F
+GLIBC_2.36 pthread_condattr_getclock F
+GLIBC_2.36 pthread_condattr_getpshared F
+GLIBC_2.36 pthread_condattr_init F
+GLIBC_2.36 pthread_condattr_setclock F
+GLIBC_2.36 pthread_condattr_setpshared F
+GLIBC_2.36 pthread_create F
+GLIBC_2.36 pthread_detach F
+GLIBC_2.36 pthread_equal F
+GLIBC_2.36 pthread_exit F
+GLIBC_2.36 pthread_getaffinity_np F
+GLIBC_2.36 pthread_getattr_default_np F
+GLIBC_2.36 pthread_getattr_np F
+GLIBC_2.36 pthread_getconcurrency F
+GLIBC_2.36 pthread_getcpuclockid F
+GLIBC_2.36 pthread_getname_np F
+GLIBC_2.36 pthread_getschedparam F
+GLIBC_2.36 pthread_getspecific F
+GLIBC_2.36 pthread_join F
+GLIBC_2.36 pthread_key_create F
+GLIBC_2.36 pthread_key_delete F
+GLIBC_2.36 pthread_kill F
+GLIBC_2.36 pthread_mutex_clocklock F
+GLIBC_2.36 pthread_mutex_consistent F
+GLIBC_2.36 pthread_mutex_destroy F
+GLIBC_2.36 pthread_mutex_getprioceiling F
+GLIBC_2.36 pthread_mutex_init F
+GLIBC_2.36 pthread_mutex_lock F
+GLIBC_2.36 pthread_mutex_setprioceiling F
+GLIBC_2.36 pthread_mutex_timedlock F
+GLIBC_2.36 pthread_mutex_trylock F
+GLIBC_2.36 pthread_mutex_unlock F
+GLIBC_2.36 pthread_mutexattr_destroy F
+GLIBC_2.36 pthread_mutexattr_getprioceiling F
+GLIBC_2.36 pthread_mutexattr_getprotocol F
+GLIBC_2.36 pthread_mutexattr_getpshared F
+GLIBC_2.36 pthread_mutexattr_getrobust F
+GLIBC_2.36 pthread_mutexattr_gettype F
+GLIBC_2.36 pthread_mutexattr_init F
+GLIBC_2.36 pthread_mutexattr_setprioceiling F
+GLIBC_2.36 pthread_mutexattr_setprotocol F
+GLIBC_2.36 pthread_mutexattr_setpshared F
+GLIBC_2.36 pthread_mutexattr_setrobust F
+GLIBC_2.36 pthread_mutexattr_settype F
+GLIBC_2.36 pthread_once F
+GLIBC_2.36 pthread_rwlock_clockrdlock F
+GLIBC_2.36 pthread_rwlock_clockwrlock F
+GLIBC_2.36 pthread_rwlock_destroy F
+GLIBC_2.36 pthread_rwlock_init F
+GLIBC_2.36 pthread_rwlock_rdlock F
+GLIBC_2.36 pthread_rwlock_timedrdlock F
+GLIBC_2.36 pthread_rwlock_timedwrlock F
+GLIBC_2.36 pthread_rwlock_tryrdlock F
+GLIBC_2.36 pthread_rwlock_trywrlock F
+GLIBC_2.36 pthread_rwlock_unlock F
+GLIBC_2.36 pthread_rwlock_wrlock F
+GLIBC_2.36 pthread_rwlockattr_destroy F
+GLIBC_2.36 pthread_rwlockattr_getkind_np F
+GLIBC_2.36 pthread_rwlockattr_getpshared F
+GLIBC_2.36 pthread_rwlockattr_init F
+GLIBC_2.36 pthread_rwlockattr_setkind_np F
+GLIBC_2.36 pthread_rwlockattr_setpshared F
+GLIBC_2.36 pthread_self F
+GLIBC_2.36 pthread_setaffinity_np F
+GLIBC_2.36 pthread_setattr_default_np F
+GLIBC_2.36 pthread_setcancelstate F
+GLIBC_2.36 pthread_setcanceltype F
+GLIBC_2.36 pthread_setconcurrency F
+GLIBC_2.36 pthread_setname_np F
+GLIBC_2.36 pthread_setschedparam F
+GLIBC_2.36 pthread_setschedprio F
+GLIBC_2.36 pthread_setspecific F
+GLIBC_2.36 pthread_sigmask F
+GLIBC_2.36 pthread_sigqueue F
+GLIBC_2.36 pthread_spin_destroy F
+GLIBC_2.36 pthread_spin_init F
+GLIBC_2.36 pthread_spin_lock F
+GLIBC_2.36 pthread_spin_trylock F
+GLIBC_2.36 pthread_spin_unlock F
+GLIBC_2.36 pthread_testcancel F
+GLIBC_2.36 pthread_timedjoin_np F
+GLIBC_2.36 pthread_tryjoin_np F
+GLIBC_2.36 ptrace F
+GLIBC_2.36 ptsname F
+GLIBC_2.36 ptsname_r F
+GLIBC_2.36 putc F
+GLIBC_2.36 putc_unlocked F
+GLIBC_2.36 putchar F
+GLIBC_2.36 putchar_unlocked F
+GLIBC_2.36 putenv F
+GLIBC_2.36 putgrent F
+GLIBC_2.36 putpwent F
+GLIBC_2.36 puts F
+GLIBC_2.36 putsgent F
+GLIBC_2.36 putspent F
+GLIBC_2.36 pututline F
+GLIBC_2.36 pututxline F
+GLIBC_2.36 putw F
+GLIBC_2.36 putwc F
+GLIBC_2.36 putwc_unlocked F
+GLIBC_2.36 putwchar F
+GLIBC_2.36 putwchar_unlocked F
+GLIBC_2.36 pvalloc F
+GLIBC_2.36 pwrite F
+GLIBC_2.36 pwrite64 F
+GLIBC_2.36 pwritev F
+GLIBC_2.36 pwritev2 F
+GLIBC_2.36 pwritev64 F
+GLIBC_2.36 pwritev64v2 F
+GLIBC_2.36 qecvt F
+GLIBC_2.36 qecvt_r F
+GLIBC_2.36 qfcvt F
+GLIBC_2.36 qfcvt_r F
+GLIBC_2.36 qgcvt F
+GLIBC_2.36 qsort F
+GLIBC_2.36 qsort_r F
+GLIBC_2.36 quick_exit F
+GLIBC_2.36 quotactl F
+GLIBC_2.36 raise F
+GLIBC_2.36 rand F
+GLIBC_2.36 rand_r F
+GLIBC_2.36 random F
+GLIBC_2.36 random_r F
+GLIBC_2.36 rawmemchr F
+GLIBC_2.36 rcmd F
+GLIBC_2.36 rcmd_af F
+GLIBC_2.36 re_comp F
+GLIBC_2.36 re_compile_fastmap F
+GLIBC_2.36 re_compile_pattern F
+GLIBC_2.36 re_exec F
+GLIBC_2.36 re_match F
+GLIBC_2.36 re_match_2 F
+GLIBC_2.36 re_search F
+GLIBC_2.36 re_search_2 F
+GLIBC_2.36 re_set_registers F
+GLIBC_2.36 re_set_syntax F
+GLIBC_2.36 re_syntax_options D 0x8
+GLIBC_2.36 read F
+GLIBC_2.36 readahead F
+GLIBC_2.36 readdir F
+GLIBC_2.36 readdir64 F
+GLIBC_2.36 readdir64_r F
+GLIBC_2.36 readdir_r F
+GLIBC_2.36 readlink F
+GLIBC_2.36 readlinkat F
+GLIBC_2.36 readv F
+GLIBC_2.36 realloc F
+GLIBC_2.36 reallocarray F
+GLIBC_2.36 realpath F
+GLIBC_2.36 reboot F
+GLIBC_2.36 recv F
+GLIBC_2.36 recvfrom F
+GLIBC_2.36 recvmmsg F
+GLIBC_2.36 recvmsg F
+GLIBC_2.36 regcomp F
+GLIBC_2.36 regerror F
+GLIBC_2.36 regexec F
+GLIBC_2.36 regfree F
+GLIBC_2.36 register_printf_function F
+GLIBC_2.36 register_printf_modifier F
+GLIBC_2.36 register_printf_specifier F
+GLIBC_2.36 register_printf_type F
+GLIBC_2.36 remap_file_pages F
+GLIBC_2.36 remove F
+GLIBC_2.36 removexattr F
+GLIBC_2.36 remque F
+GLIBC_2.36 rename F
+GLIBC_2.36 renameat F
+GLIBC_2.36 renameat2 F
+GLIBC_2.36 res_dnok F
+GLIBC_2.36 res_hnok F
+GLIBC_2.36 res_mailok F
+GLIBC_2.36 res_mkquery F
+GLIBC_2.36 res_nmkquery F
+GLIBC_2.36 res_nquery F
+GLIBC_2.36 res_nquerydomain F
+GLIBC_2.36 res_nsearch F
+GLIBC_2.36 res_nsend F
+GLIBC_2.36 res_ownok F
+GLIBC_2.36 res_query F
+GLIBC_2.36 res_querydomain F
+GLIBC_2.36 res_search F
+GLIBC_2.36 res_send F
+GLIBC_2.36 revoke F
+GLIBC_2.36 rewind F
+GLIBC_2.36 rewinddir F
+GLIBC_2.36 rexec F
+GLIBC_2.36 rexec_af F
+GLIBC_2.36 rexecoptions D 0x4
+GLIBC_2.36 rindex F
+GLIBC_2.36 rmdir F
+GLIBC_2.36 rpmatch F
+GLIBC_2.36 rresvport F
+GLIBC_2.36 rresvport_af F
+GLIBC_2.36 ruserok F
+GLIBC_2.36 ruserok_af F
+GLIBC_2.36 ruserpass F
+GLIBC_2.36 sbrk F
+GLIBC_2.36 scalbn F
+GLIBC_2.36 scalbnf F
+GLIBC_2.36 scalbnl F
+GLIBC_2.36 scandir F
+GLIBC_2.36 scandir64 F
+GLIBC_2.36 scandirat F
+GLIBC_2.36 scandirat64 F
+GLIBC_2.36 scanf F
+GLIBC_2.36 sched_get_priority_max F
+GLIBC_2.36 sched_get_priority_min F
+GLIBC_2.36 sched_getaffinity F
+GLIBC_2.36 sched_getcpu F
+GLIBC_2.36 sched_getparam F
+GLIBC_2.36 sched_getscheduler F
+GLIBC_2.36 sched_rr_get_interval F
+GLIBC_2.36 sched_setaffinity F
+GLIBC_2.36 sched_setparam F
+GLIBC_2.36 sched_setscheduler F
+GLIBC_2.36 sched_yield F
+GLIBC_2.36 secure_getenv F
+GLIBC_2.36 seed48 F
+GLIBC_2.36 seed48_r F
+GLIBC_2.36 seekdir F
+GLIBC_2.36 select F
+GLIBC_2.36 sem_clockwait F
+GLIBC_2.36 sem_close F
+GLIBC_2.36 sem_destroy F
+GLIBC_2.36 sem_getvalue F
+GLIBC_2.36 sem_init F
+GLIBC_2.36 sem_open F
+GLIBC_2.36 sem_post F
+GLIBC_2.36 sem_timedwait F
+GLIBC_2.36 sem_trywait F
+GLIBC_2.36 sem_unlink F
+GLIBC_2.36 sem_wait F
+GLIBC_2.36 semctl F
+GLIBC_2.36 semget F
+GLIBC_2.36 semop F
+GLIBC_2.36 semtimedop F
+GLIBC_2.36 send F
+GLIBC_2.36 sendfile F
+GLIBC_2.36 sendfile64 F
+GLIBC_2.36 sendmmsg F
+GLIBC_2.36 sendmsg F
+GLIBC_2.36 sendto F
+GLIBC_2.36 setaliasent F
+GLIBC_2.36 setbuf F
+GLIBC_2.36 setbuffer F
+GLIBC_2.36 setcontext F
+GLIBC_2.36 setdomainname F
+GLIBC_2.36 setegid F
+GLIBC_2.36 setenv F
+GLIBC_2.36 seteuid F
+GLIBC_2.36 setfsent F
+GLIBC_2.36 setfsgid F
+GLIBC_2.36 setfsuid F
+GLIBC_2.36 setgid F
+GLIBC_2.36 setgrent F
+GLIBC_2.36 setgroups F
+GLIBC_2.36 sethostent F
+GLIBC_2.36 sethostid F
+GLIBC_2.36 sethostname F
+GLIBC_2.36 setipv4sourcefilter F
+GLIBC_2.36 setitimer F
+GLIBC_2.36 setjmp F
+GLIBC_2.36 setlinebuf F
+GLIBC_2.36 setlocale F
+GLIBC_2.36 setlogin F
+GLIBC_2.36 setlogmask F
+GLIBC_2.36 setmntent F
+GLIBC_2.36 setnetent F
+GLIBC_2.36 setnetgrent F
+GLIBC_2.36 setns F
+GLIBC_2.36 setpgid F
+GLIBC_2.36 setpgrp F
+GLIBC_2.36 setpriority F
+GLIBC_2.36 setprotoent F
+GLIBC_2.36 setpwent F
+GLIBC_2.36 setregid F
+GLIBC_2.36 setresgid F
+GLIBC_2.36 setresuid F
+GLIBC_2.36 setreuid F
+GLIBC_2.36 setrlimit F
+GLIBC_2.36 setrlimit64 F
+GLIBC_2.36 setrpcent F
+GLIBC_2.36 setservent F
+GLIBC_2.36 setsgent F
+GLIBC_2.36 setsid F
+GLIBC_2.36 setsockopt F
+GLIBC_2.36 setsourcefilter F
+GLIBC_2.36 setspent F
+GLIBC_2.36 setstate F
+GLIBC_2.36 setstate_r F
+GLIBC_2.36 settimeofday F
+GLIBC_2.36 setttyent F
+GLIBC_2.36 setuid F
+GLIBC_2.36 setusershell F
+GLIBC_2.36 setutent F
+GLIBC_2.36 setutxent F
+GLIBC_2.36 setvbuf F
+GLIBC_2.36 setxattr F
+GLIBC_2.36 sgetsgent F
+GLIBC_2.36 sgetsgent_r F
+GLIBC_2.36 sgetspent F
+GLIBC_2.36 sgetspent_r F
+GLIBC_2.36 shm_open F
+GLIBC_2.36 shm_unlink F
+GLIBC_2.36 shmat F
+GLIBC_2.36 shmctl F
+GLIBC_2.36 shmdt F
+GLIBC_2.36 shmget F
+GLIBC_2.36 shutdown F
+GLIBC_2.36 sigabbrev_np F
+GLIBC_2.36 sigaction F
+GLIBC_2.36 sigaddset F
+GLIBC_2.36 sigaltstack F
+GLIBC_2.36 sigandset F
+GLIBC_2.36 sigblock F
+GLIBC_2.36 sigdelset F
+GLIBC_2.36 sigdescr_np F
+GLIBC_2.36 sigemptyset F
+GLIBC_2.36 sigfillset F
+GLIBC_2.36 siggetmask F
+GLIBC_2.36 sighold F
+GLIBC_2.36 sigignore F
+GLIBC_2.36 siginterrupt F
+GLIBC_2.36 sigisemptyset F
+GLIBC_2.36 sigismember F
+GLIBC_2.36 siglongjmp F
+GLIBC_2.36 signal F
+GLIBC_2.36 signalfd F
+GLIBC_2.36 sigorset F
+GLIBC_2.36 sigpause F
+GLIBC_2.36 sigpending F
+GLIBC_2.36 sigprocmask F
+GLIBC_2.36 sigqueue F
+GLIBC_2.36 sigrelse F
+GLIBC_2.36 sigreturn F
+GLIBC_2.36 sigset F
+GLIBC_2.36 sigsetmask F
+GLIBC_2.36 sigstack F
+GLIBC_2.36 sigsuspend F
+GLIBC_2.36 sigtimedwait F
+GLIBC_2.36 sigwait F
+GLIBC_2.36 sigwaitinfo F
+GLIBC_2.36 sleep F
+GLIBC_2.36 snprintf F
+GLIBC_2.36 sockatmark F
+GLIBC_2.36 socket F
+GLIBC_2.36 socketpair F
+GLIBC_2.36 splice F
+GLIBC_2.36 sprintf F
+GLIBC_2.36 sprofil F
+GLIBC_2.36 srand F
+GLIBC_2.36 srand48 F
+GLIBC_2.36 srand48_r F
+GLIBC_2.36 srandom F
+GLIBC_2.36 srandom_r F
+GLIBC_2.36 sscanf F
+GLIBC_2.36 ssignal F
+GLIBC_2.36 stat F
+GLIBC_2.36 stat64 F
+GLIBC_2.36 statfs F
+GLIBC_2.36 statfs64 F
+GLIBC_2.36 statvfs F
+GLIBC_2.36 statvfs64 F
+GLIBC_2.36 statx F
+GLIBC_2.36 stderr D 0x8
+GLIBC_2.36 stdin D 0x8
+GLIBC_2.36 stdout D 0x8
+GLIBC_2.36 stpcpy F
+GLIBC_2.36 stpncpy F
+GLIBC_2.36 strcasecmp F
+GLIBC_2.36 strcasecmp_l F
+GLIBC_2.36 strcasestr F
+GLIBC_2.36 strcat F
+GLIBC_2.36 strchr F
+GLIBC_2.36 strchrnul F
+GLIBC_2.36 strcmp F
+GLIBC_2.36 strcoll F
+GLIBC_2.36 strcoll_l F
+GLIBC_2.36 strcpy F
+GLIBC_2.36 strcspn F
+GLIBC_2.36 strdup F
+GLIBC_2.36 strerror F
+GLIBC_2.36 strerror_l F
+GLIBC_2.36 strerror_r F
+GLIBC_2.36 strerrordesc_np F
+GLIBC_2.36 strerrorname_np F
+GLIBC_2.36 strfmon F
+GLIBC_2.36 strfmon_l F
+GLIBC_2.36 strfromd F
+GLIBC_2.36 strfromf F
+GLIBC_2.36 strfromf128 F
+GLIBC_2.36 strfromf32 F
+GLIBC_2.36 strfromf32x F
+GLIBC_2.36 strfromf64 F
+GLIBC_2.36 strfromf64x F
+GLIBC_2.36 strfroml F
+GLIBC_2.36 strfry F
+GLIBC_2.36 strftime F
+GLIBC_2.36 strftime_l F
+GLIBC_2.36 strlen F
+GLIBC_2.36 strncasecmp F
+GLIBC_2.36 strncasecmp_l F
+GLIBC_2.36 strncat F
+GLIBC_2.36 strncmp F
+GLIBC_2.36 strncpy F
+GLIBC_2.36 strndup F
+GLIBC_2.36 strnlen F
+GLIBC_2.36 strpbrk F
+GLIBC_2.36 strptime F
+GLIBC_2.36 strptime_l F
+GLIBC_2.36 strrchr F
+GLIBC_2.36 strsep F
+GLIBC_2.36 strsignal F
+GLIBC_2.36 strspn F
+GLIBC_2.36 strstr F
+GLIBC_2.36 strtod F
+GLIBC_2.36 strtod_l F
+GLIBC_2.36 strtof F
+GLIBC_2.36 strtof128 F
+GLIBC_2.36 strtof128_l F
+GLIBC_2.36 strtof32 F
+GLIBC_2.36 strtof32_l F
+GLIBC_2.36 strtof32x F
+GLIBC_2.36 strtof32x_l F
+GLIBC_2.36 strtof64 F
+GLIBC_2.36 strtof64_l F
+GLIBC_2.36 strtof64x F
+GLIBC_2.36 strtof64x_l F
+GLIBC_2.36 strtof_l F
+GLIBC_2.36 strtoimax F
+GLIBC_2.36 strtok F
+GLIBC_2.36 strtok_r F
+GLIBC_2.36 strtol F
+GLIBC_2.36 strtol_l F
+GLIBC_2.36 strtold F
+GLIBC_2.36 strtold_l F
+GLIBC_2.36 strtoll F
+GLIBC_2.36 strtoll_l F
+GLIBC_2.36 strtoq F
+GLIBC_2.36 strtoul F
+GLIBC_2.36 strtoul_l F
+GLIBC_2.36 strtoull F
+GLIBC_2.36 strtoull_l F
+GLIBC_2.36 strtoumax F
+GLIBC_2.36 strtouq F
+GLIBC_2.36 strverscmp F
+GLIBC_2.36 strxfrm F
+GLIBC_2.36 strxfrm_l F
+GLIBC_2.36 stty F
+GLIBC_2.36 swab F
+GLIBC_2.36 swapcontext F
+GLIBC_2.36 swapoff F
+GLIBC_2.36 swapon F
+GLIBC_2.36 swprintf F
+GLIBC_2.36 swscanf F
+GLIBC_2.36 symlink F
+GLIBC_2.36 symlinkat F
+GLIBC_2.36 sync F
+GLIBC_2.36 sync_file_range F
+GLIBC_2.36 syncfs F
+GLIBC_2.36 syscall F
+GLIBC_2.36 sysconf F
+GLIBC_2.36 sysinfo F
+GLIBC_2.36 syslog F
+GLIBC_2.36 system F
+GLIBC_2.36 sysv_signal F
+GLIBC_2.36 tcdrain F
+GLIBC_2.36 tcflow F
+GLIBC_2.36 tcflush F
+GLIBC_2.36 tcgetattr F
+GLIBC_2.36 tcgetpgrp F
+GLIBC_2.36 tcgetsid F
+GLIBC_2.36 tcsendbreak F
+GLIBC_2.36 tcsetattr F
+GLIBC_2.36 tcsetpgrp F
+GLIBC_2.36 tdelete F
+GLIBC_2.36 tdestroy F
+GLIBC_2.36 tee F
+GLIBC_2.36 telldir F
+GLIBC_2.36 tempnam F
+GLIBC_2.36 textdomain F
+GLIBC_2.36 tfind F
+GLIBC_2.36 tgkill F
+GLIBC_2.36 thrd_create F
+GLIBC_2.36 thrd_current F
+GLIBC_2.36 thrd_detach F
+GLIBC_2.36 thrd_equal F
+GLIBC_2.36 thrd_exit F
+GLIBC_2.36 thrd_join F
+GLIBC_2.36 thrd_sleep F
+GLIBC_2.36 thrd_yield F
+GLIBC_2.36 time F
+GLIBC_2.36 timegm F
+GLIBC_2.36 timelocal F
+GLIBC_2.36 timer_create F
+GLIBC_2.36 timer_delete F
+GLIBC_2.36 timer_getoverrun F
+GLIBC_2.36 timer_gettime F
+GLIBC_2.36 timer_settime F
+GLIBC_2.36 timerfd_create F
+GLIBC_2.36 timerfd_gettime F
+GLIBC_2.36 timerfd_settime F
+GLIBC_2.36 times F
+GLIBC_2.36 timespec_get F
+GLIBC_2.36 timespec_getres F
+GLIBC_2.36 timezone D 0x8
+GLIBC_2.36 tmpfile F
+GLIBC_2.36 tmpfile64 F
+GLIBC_2.36 tmpnam F
+GLIBC_2.36 tmpnam_r F
+GLIBC_2.36 toascii F
+GLIBC_2.36 tolower F
+GLIBC_2.36 tolower_l F
+GLIBC_2.36 toupper F
+GLIBC_2.36 toupper_l F
+GLIBC_2.36 towctrans F
+GLIBC_2.36 towctrans_l F
+GLIBC_2.36 towlower F
+GLIBC_2.36 towlower_l F
+GLIBC_2.36 towupper F
+GLIBC_2.36 towupper_l F
+GLIBC_2.36 truncate F
+GLIBC_2.36 truncate64 F
+GLIBC_2.36 tsearch F
+GLIBC_2.36 tss_create F
+GLIBC_2.36 tss_delete F
+GLIBC_2.36 tss_get F
+GLIBC_2.36 tss_set F
+GLIBC_2.36 ttyname F
+GLIBC_2.36 ttyname_r F
+GLIBC_2.36 ttyslot F
+GLIBC_2.36 twalk F
+GLIBC_2.36 twalk_r F
+GLIBC_2.36 tzname D 0x10
+GLIBC_2.36 tzset F
+GLIBC_2.36 ualarm F
+GLIBC_2.36 ulckpwdf F
+GLIBC_2.36 ulimit F
+GLIBC_2.36 umask F
+GLIBC_2.36 umount F
+GLIBC_2.36 umount2 F
+GLIBC_2.36 uname F
+GLIBC_2.36 ungetc F
+GLIBC_2.36 ungetwc F
+GLIBC_2.36 unlink F
+GLIBC_2.36 unlinkat F
+GLIBC_2.36 unlockpt F
+GLIBC_2.36 unsetenv F
+GLIBC_2.36 unshare F
+GLIBC_2.36 updwtmp F
+GLIBC_2.36 updwtmpx F
+GLIBC_2.36 uselocale F
+GLIBC_2.36 usleep F
+GLIBC_2.36 utime F
+GLIBC_2.36 utimensat F
+GLIBC_2.36 utimes F
+GLIBC_2.36 utmpname F
+GLIBC_2.36 utmpxname F
+GLIBC_2.36 valloc F
+GLIBC_2.36 vasprintf F
+GLIBC_2.36 vdprintf F
+GLIBC_2.36 verr F
+GLIBC_2.36 verrx F
+GLIBC_2.36 versionsort F
+GLIBC_2.36 versionsort64 F
+GLIBC_2.36 vfork F
+GLIBC_2.36 vfprintf F
+GLIBC_2.36 vfscanf F
+GLIBC_2.36 vfwprintf F
+GLIBC_2.36 vfwscanf F
+GLIBC_2.36 vhangup F
+GLIBC_2.36 vlimit F
+GLIBC_2.36 vmsplice F
+GLIBC_2.36 vprintf F
+GLIBC_2.36 vscanf F
+GLIBC_2.36 vsnprintf F
+GLIBC_2.36 vsprintf F
+GLIBC_2.36 vsscanf F
+GLIBC_2.36 vswprintf F
+GLIBC_2.36 vswscanf F
+GLIBC_2.36 vsyslog F
+GLIBC_2.36 vwarn F
+GLIBC_2.36 vwarnx F
+GLIBC_2.36 vwprintf F
+GLIBC_2.36 vwscanf F
+GLIBC_2.36 wait F
+GLIBC_2.36 wait3 F
+GLIBC_2.36 wait4 F
+GLIBC_2.36 waitid F
+GLIBC_2.36 waitpid F
+GLIBC_2.36 warn F
+GLIBC_2.36 warnx F
+GLIBC_2.36 wcpcpy F
+GLIBC_2.36 wcpncpy F
+GLIBC_2.36 wcrtomb F
+GLIBC_2.36 wcscasecmp F
+GLIBC_2.36 wcscasecmp_l F
+GLIBC_2.36 wcscat F
+GLIBC_2.36 wcschr F
+GLIBC_2.36 wcschrnul F
+GLIBC_2.36 wcscmp F
+GLIBC_2.36 wcscoll F
+GLIBC_2.36 wcscoll_l F
+GLIBC_2.36 wcscpy F
+GLIBC_2.36 wcscspn F
+GLIBC_2.36 wcsdup F
+GLIBC_2.36 wcsftime F
+GLIBC_2.36 wcsftime_l F
+GLIBC_2.36 wcslen F
+GLIBC_2.36 wcsncasecmp F
+GLIBC_2.36 wcsncasecmp_l F
+GLIBC_2.36 wcsncat F
+GLIBC_2.36 wcsncmp F
+GLIBC_2.36 wcsncpy F
+GLIBC_2.36 wcsnlen F
+GLIBC_2.36 wcsnrtombs F
+GLIBC_2.36 wcspbrk F
+GLIBC_2.36 wcsrchr F
+GLIBC_2.36 wcsrtombs F
+GLIBC_2.36 wcsspn F
+GLIBC_2.36 wcsstr F
+GLIBC_2.36 wcstod F
+GLIBC_2.36 wcstod_l F
+GLIBC_2.36 wcstof F
+GLIBC_2.36 wcstof128 F
+GLIBC_2.36 wcstof128_l F
+GLIBC_2.36 wcstof32 F
+GLIBC_2.36 wcstof32_l F
+GLIBC_2.36 wcstof32x F
+GLIBC_2.36 wcstof32x_l F
+GLIBC_2.36 wcstof64 F
+GLIBC_2.36 wcstof64_l F
+GLIBC_2.36 wcstof64x F
+GLIBC_2.36 wcstof64x_l F
+GLIBC_2.36 wcstof_l F
+GLIBC_2.36 wcstoimax F
+GLIBC_2.36 wcstok F
+GLIBC_2.36 wcstol F
+GLIBC_2.36 wcstol_l F
+GLIBC_2.36 wcstold F
+GLIBC_2.36 wcstold_l F
+GLIBC_2.36 wcstoll F
+GLIBC_2.36 wcstoll_l F
+GLIBC_2.36 wcstombs F
+GLIBC_2.36 wcstoq F
+GLIBC_2.36 wcstoul F
+GLIBC_2.36 wcstoul_l F
+GLIBC_2.36 wcstoull F
+GLIBC_2.36 wcstoull_l F
+GLIBC_2.36 wcstoumax F
+GLIBC_2.36 wcstouq F
+GLIBC_2.36 wcswcs F
+GLIBC_2.36 wcswidth F
+GLIBC_2.36 wcsxfrm F
+GLIBC_2.36 wcsxfrm_l F
+GLIBC_2.36 wctob F
+GLIBC_2.36 wctomb F
+GLIBC_2.36 wctrans F
+GLIBC_2.36 wctrans_l F
+GLIBC_2.36 wctype F
+GLIBC_2.36 wctype_l F
+GLIBC_2.36 wcwidth F
+GLIBC_2.36 wmemchr F
+GLIBC_2.36 wmemcmp F
+GLIBC_2.36 wmemcpy F
+GLIBC_2.36 wmemmove F
+GLIBC_2.36 wmempcpy F
+GLIBC_2.36 wmemset F
+GLIBC_2.36 wordexp F
+GLIBC_2.36 wordfree F
+GLIBC_2.36 wprintf F
+GLIBC_2.36 write F
+GLIBC_2.36 writev F
+GLIBC_2.36 wscanf F
+GLIBC_2.37 __adddf3 F
+GLIBC_2.37 __addsf3 F
+GLIBC_2.37 __divdf3 F
+GLIBC_2.37 __divsf3 F
+GLIBC_2.37 __eqdf2 F
+GLIBC_2.37 __eqsf2 F
+GLIBC_2.37 __extendsfdf2 F
+GLIBC_2.37 __fixdfsi F
+GLIBC_2.37 __fixsfsi F
+GLIBC_2.37 __fixunsdfsi F
+GLIBC_2.37 __fixunssfsi F
+GLIBC_2.37 __floatsidf F
+GLIBC_2.37 __floatsisf F
+GLIBC_2.37 __gedf2 F
+GLIBC_2.37 __gesf2 F
+GLIBC_2.37 __ledf2 F
+GLIBC_2.37 __lesf2 F
+GLIBC_2.37 __muldf3 F
+GLIBC_2.37 __mulsf3 F
+GLIBC_2.37 __negdf2 F
+GLIBC_2.37 __negsf2 F
+GLIBC_2.37 __subdf3 F
+GLIBC_2.37 __subsf3 F
+GLIBC_2.37 __truncdfsf2 F
+GLIBC_2.38 __isoc23_fscanf F
+GLIBC_2.38 __isoc23_fwscanf F
+GLIBC_2.38 __isoc23_scanf F
+GLIBC_2.38 __isoc23_sscanf F
+GLIBC_2.38 __isoc23_strtoimax F
+GLIBC_2.38 __isoc23_strtol F
+GLIBC_2.38 __isoc23_strtol_l F
+GLIBC_2.38 __isoc23_strtoll F
+GLIBC_2.38 __isoc23_strtoll_l F
+GLIBC_2.38 __isoc23_strtoul F
+GLIBC_2.38 __isoc23_strtoul_l F
+GLIBC_2.38 __isoc23_strtoull F
+GLIBC_2.38 __isoc23_strtoull_l F
+GLIBC_2.38 __isoc23_strtoumax F
+GLIBC_2.38 __isoc23_swscanf F
+GLIBC_2.38 __isoc23_vfscanf F
+GLIBC_2.38 __isoc23_vfwscanf F
+GLIBC_2.38 __isoc23_vscanf F
+GLIBC_2.38 __isoc23_vsscanf F
+GLIBC_2.38 __isoc23_vswscanf F
+GLIBC_2.38 __isoc23_vwscanf F
+GLIBC_2.38 __isoc23_wcstoimax F
+GLIBC_2.38 __isoc23_wcstol F
+GLIBC_2.38 __isoc23_wcstol_l F
+GLIBC_2.38 __isoc23_wcstoll F
+GLIBC_2.38 __isoc23_wcstoll_l F
+GLIBC_2.38 __isoc23_wcstoul F
+GLIBC_2.38 __isoc23_wcstoul_l F
+GLIBC_2.38 __isoc23_wcstoull F
+GLIBC_2.38 __isoc23_wcstoull_l F
+GLIBC_2.38 __isoc23_wcstoumax F
+GLIBC_2.38 __isoc23_wscanf F
+GLIBC_2.38 __strlcat_chk F
+GLIBC_2.38 __strlcpy_chk F
+GLIBC_2.38 __wcslcat_chk F
+GLIBC_2.38 __wcslcpy_chk F
+GLIBC_2.38 strlcat F
+GLIBC_2.38 strlcpy F
+GLIBC_2.38 wcslcat F
+GLIBC_2.38 wcslcpy F
+GLIBC_2.39 pidfd_getpid F
+GLIBC_2.39 pidfd_spawn F
+GLIBC_2.39 pidfd_spawnp F
+GLIBC_2.39 posix_spawnattr_getcgroup_np F
+GLIBC_2.39 posix_spawnattr_setcgroup_np F
+GLIBC_2.39 stdc_bit_ceil_uc F
+GLIBC_2.39 stdc_bit_ceil_ui F
+GLIBC_2.39 stdc_bit_ceil_ul F
+GLIBC_2.39 stdc_bit_ceil_ull F
+GLIBC_2.39 stdc_bit_ceil_us F
+GLIBC_2.39 stdc_bit_floor_uc F
+GLIBC_2.39 stdc_bit_floor_ui F
+GLIBC_2.39 stdc_bit_floor_ul F
+GLIBC_2.39 stdc_bit_floor_ull F
+GLIBC_2.39 stdc_bit_floor_us F
+GLIBC_2.39 stdc_bit_width_uc F
+GLIBC_2.39 stdc_bit_width_ui F
+GLIBC_2.39 stdc_bit_width_ul F
+GLIBC_2.39 stdc_bit_width_ull F
+GLIBC_2.39 stdc_bit_width_us F
+GLIBC_2.39 stdc_count_ones_uc F
+GLIBC_2.39 stdc_count_ones_ui F
+GLIBC_2.39 stdc_count_ones_ul F
+GLIBC_2.39 stdc_count_ones_ull F
+GLIBC_2.39 stdc_count_ones_us F
+GLIBC_2.39 stdc_count_zeros_uc F
+GLIBC_2.39 stdc_count_zeros_ui F
+GLIBC_2.39 stdc_count_zeros_ul F
+GLIBC_2.39 stdc_count_zeros_ull F
+GLIBC_2.39 stdc_count_zeros_us F
+GLIBC_2.39 stdc_first_leading_one_uc F
+GLIBC_2.39 stdc_first_leading_one_ui F
+GLIBC_2.39 stdc_first_leading_one_ul F
+GLIBC_2.39 stdc_first_leading_one_ull F
+GLIBC_2.39 stdc_first_leading_one_us F
+GLIBC_2.39 stdc_first_leading_zero_uc F
+GLIBC_2.39 stdc_first_leading_zero_ui F
+GLIBC_2.39 stdc_first_leading_zero_ul F
+GLIBC_2.39 stdc_first_leading_zero_ull F
+GLIBC_2.39 stdc_first_leading_zero_us F
+GLIBC_2.39 stdc_first_trailing_one_uc F
+GLIBC_2.39 stdc_first_trailing_one_ui F
+GLIBC_2.39 stdc_first_trailing_one_ul F
+GLIBC_2.39 stdc_first_trailing_one_ull F
+GLIBC_2.39 stdc_first_trailing_one_us F
+GLIBC_2.39 stdc_first_trailing_zero_uc F
+GLIBC_2.39 stdc_first_trailing_zero_ui F
+GLIBC_2.39 stdc_first_trailing_zero_ul F
+GLIBC_2.39 stdc_first_trailing_zero_ull F
+GLIBC_2.39 stdc_first_trailing_zero_us F
+GLIBC_2.39 stdc_has_single_bit_uc F
+GLIBC_2.39 stdc_has_single_bit_ui F
+GLIBC_2.39 stdc_has_single_bit_ul F
+GLIBC_2.39 stdc_has_single_bit_ull F
+GLIBC_2.39 stdc_has_single_bit_us F
+GLIBC_2.39 stdc_leading_ones_uc F
+GLIBC_2.39 stdc_leading_ones_ui F
+GLIBC_2.39 stdc_leading_ones_ul F
+GLIBC_2.39 stdc_leading_ones_ull F
+GLIBC_2.39 stdc_leading_ones_us F
+GLIBC_2.39 stdc_leading_zeros_uc F
+GLIBC_2.39 stdc_leading_zeros_ui F
+GLIBC_2.39 stdc_leading_zeros_ul F
+GLIBC_2.39 stdc_leading_zeros_ull F
+GLIBC_2.39 stdc_leading_zeros_us F
+GLIBC_2.39 stdc_trailing_ones_uc F
+GLIBC_2.39 stdc_trailing_ones_ui F
+GLIBC_2.39 stdc_trailing_ones_ul F
+GLIBC_2.39 stdc_trailing_ones_ull F
+GLIBC_2.39 stdc_trailing_ones_us F
+GLIBC_2.39 stdc_trailing_zeros_uc F
+GLIBC_2.39 stdc_trailing_zeros_ui F
+GLIBC_2.39 stdc_trailing_zeros_ul F
+GLIBC_2.39 stdc_trailing_zeros_ull F
+GLIBC_2.39 stdc_trailing_zeros_us F
diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/localplt.data b/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/localplt.data
new file mode 100644
index 0000000000..d40826c783
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/localplt.data
@@ -0,0 +1,23 @@
+# See scripts/check-localplt.awk for how this file is processed.
+# PLT use is required for the malloc family and for matherr because
+# users can define their own functions and have library internals call them.
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: realloc
+libc.so: __fixsfsi
+libc.so: __divsf3
+libc.so: __adddf3
+libc.so: __eqdf2
+libc.so: __gedf2
+libc.so: __floatsisf
+libc.so: __eqsf2
+libc.so: __subsf3
+libc.so: __mulsf3
+libc.so: __muldf3
+libc.so: __subdf3
+libc.so: __divdf3
+libc.so: __ledf2
+libc.so: __floatsidf
+libc.so: __extendsfdf2
+libc.so: __addsf3
-- 
2.39.3


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-03-27 17:10     ` Joseph Myers
  2024-03-31 10:14       ` caiyinyu
@ 2024-03-31 10:31       ` caiyinyu
  2024-04-02 21:10         ` Joseph Myers
  1 sibling, 1 reply; 16+ messages in thread
From: caiyinyu @ 2024-03-31 10:31 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha, adhemerval.zanella, xry111, xuchenghua


在 2024/3/28 上午1:10, Joseph Myers 写道:
> On Wed, 27 Mar 2024, caiyinyu wrote:
>
>> Yes, this patch does make sense in both libc and libm and it can be proved by
>> the following glibc tests:
> Please explain more how it works.
>
>> All the functions Implemented in this patch are exported from libm.so the same
>> as powerpc nofpu.
> I'm talking about functions such as __adddf3 (which would need to be
> exported from libc, not libm, to provide exceptions / rounding modes
> support for software floating point).  I don't see them in any Versions
> file for LoongArch.
>
> Furthermore, this patch isn't changing sfp-machine.h for LoongArch, which
> uses fpu_control.h to get rounding mode / exceptions state, and it isn't
> changing how fpu_control.h uses constant 0 for that state in the
> soft-float case.  So I don't see how it would produce *working* exceptions
> / rounding modes support for software floating-point arithmetic.

I revised and submitted the version 2 patch:

The main corrections in the version 2 patch are:
1. Correcting the nofpu libc files:  sim-full.c sfp-machine.h soft-supp.h.
2. Updating/modifying the fpu/nofpu libc 
Versions/libc.abilist/localplt.data files.

v1: https://sourceware.org/pipermail/libc-alpha/2024-March/155597.html
v2: https://sourceware.org/pipermail/libc-alpha/2024-March/155707.html

LoongArch soft float support was added in version 2.37, but the fe* 
functions
were not completely added. I want to backport this patch if possible
(it requires some modifications) to the 2.37/38/39/master branch, so the 
version of
the relevant symbols in  Versions is GLIBC_2.37.

Here is the difference between v1 and v2 :
1.
diff --git a/sysdeps/loongarch/nofpu/sim-full.c 
b/sysdeps/loongarch/nofpu/sim-full.c
index a2bbb9f880..b10e5b2f4d 100644
--- a/sysdeps/loongarch/nofpu/sim-full.c
+++ b/sysdeps/loongarch/nofpu/sim-full.c
@@ -16,8 +16,22 @@
     License along with the GNU C Library.  If not, see
     <https://www.gnu.org/licenses/>.  */

+#include "soft-fp.h"
  #include "soft-supp.h"
+#include <signal.h>

  /* By default, no exceptions should trap.  */
  __thread int __sim_cw_thread;
  libc_hidden_tls_def (__sim_cw_thread);
+
+void
+__simulate_exceptions (int excepts)
+{
+  int enable;
+  __sim_cw_thread |= excepts;
+
+  enable = __sim_cw_thread & _FPU_ENABLE_MASK;
+  if (excepts & __sim_cw_thread & (enable << ENABLE_SHIFT))
+    raise (SIGFPE);
+}
+libc_hidden_def (__simulate_exceptions)
diff --git a/sysdeps/loongarch/nofpu/soft-supp.h 
b/sysdeps/loongarch/nofpu/soft-supp.h
index 37d83399e8..8d3ba09764 100644
--- a/sysdeps/loongarch/nofpu/soft-supp.h
+++ b/sysdeps/loongarch/nofpu/soft-supp.h
@@ -18,3 +18,5 @@

  extern __thread int __sim_cw_thread attribute_tls_model_ie;
  libc_hidden_tls_proto (__sim_cw_thread, tls_model ("initial-exec"));
+
+extern void __simulate_exceptions (int excepts);
diff --git a/sysdeps/loongarch/sfp-machine.h 
b/sysdeps/loongarch/sfp-machine.h
index cbf66500db..eda6c66423 100644
--- a/sysdeps/loongarch/sfp-machine.h
+++ b/sysdeps/loongarch/sfp-machine.h
@@ -64,10 +64,6 @@
      } \
    while (0)

-#define _FP_DECL_EX fpu_control_t _fcw
-
-#define FP_ROUNDMODE (_fcw & 0x300)
-
  #define FP_RND_NEAREST FE_TONEAREST
  #define FP_RND_ZERO FE_TOWARDZERO
  #define FP_RND_PINF FE_UPWARD
@@ -82,6 +78,8 @@
  #define _FP_TININESS_AFTER_ROUNDING 1

  #ifdef __loongarch_hard_float
+#define _FP_DECL_EX fpu_control_t _fcw
+#define FP_ROUNDMODE (_fcw & 0x300)
  #define FP_INIT_ROUNDMODE \
    do \
      { \
@@ -98,5 +96,12 @@
    while (0)
  #define FP_TRAPPING_EXCEPTIONS ((_fcw << 16) & 0x1f0000)
  #else
-#define FP_INIT_ROUNDMODE _fcw = FP_RND_NEAREST
+#define FP_HANDLE_EXCEPTIONS    __simulate_exceptions (_fex)
+#define FP_ROUNDMODE        (__sim_cw_thread & _FPU_RC_MASK)
+#define FP_TRAPPING_EXCEPTIONS    (__sim_cw_thread & _FPU_ENABLE_MASK)
+
+extern __thread int __sim_cw_thread attribute_tls_model_ie;
+libc_hidden_tls_proto (__sim_cw_thread, tls_model ("initial-exec"));
+extern void __simulate_exceptions (int excepts);
+libc_hidden_proto (__simulate_exceptions)
  #endif

2. libc.abilist is too long so not listed here.
diff --git a/sysdeps/loongarch/nofpu/Versions 
b/sysdeps/loongarch/nofpu/Versions
index 6d7f6aae6c..73b6a71bbd 100644
--- a/sysdeps/loongarch/nofpu/Versions
+++ b/sysdeps/loongarch/nofpu/Versions
@@ -1,5 +1,13 @@
  libc {
+  GLIBC_2.37 {
+    __adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2;
+    __extendsfdf2; __fixdfsi; __fixsfsi;
+    __fixunsdfsi; __fixunssfsi;
+    __floatsidf; __floatsisf;
+    __gedf2; __gesf2; __ledf2; __lesf2; __muldf3; __mulsf3;
+    __negdf2; __negsf2; __subdf3; __subsf3; __truncdfsf2;
+  }
    GLIBC_PRIVATE {
-    __sim_cw_thread;
+    __sim_cw_thread; __simulate_exceptions;
    }
  }
diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/fpu/localplt.data 
b/sysdeps/unix/sysv/linux/loongarch/lp64/fpu/localplt.data
new file mode 100644
index 0000000000..547b1c1b7f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/loongarch/lp64/fpu/localplt.data
@@ -0,0 +1,7 @@
+# See scripts/check-localplt.awk for how this file is processed.
+# PLT use is required for the malloc family and for matherr because
+# users can define their own functions and have library internals call 
them.
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: realloc
diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/Implies 
b/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/Implies
new file mode 100644
index 0000000000..1090fb545a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/Implies
@@ -0,0 +1 @@
+loongarch/nofpu
diff --git a/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/localplt.data 
b/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/localplt.data
new file mode 100644
index 0000000000..d40826c783
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/loongarch/lp64/nofpu/localplt.data
@@ -0,0 +1,23 @@
+# See scripts/check-localplt.awk for how this file is processed.
+# PLT use is required for the malloc family and for matherr because
+# users can define their own functions and have library internals call 
them.
+libc.so: calloc
+libc.so: free
+libc.so: malloc
+libc.so: realloc
+libc.so: __fixsfsi
+libc.so: __divsf3
+libc.so: __adddf3
+libc.so: __eqdf2
+libc.so: __gedf2
+libc.so: __floatsisf
+libc.so: __eqsf2
+libc.so: __subsf3
+libc.so: __mulsf3
+libc.so: __muldf3
+libc.so: __subdf3
+libc.so: __divdf3
+libc.so: __ledf2
+libc.so: __floatsidf
+libc.so: __extendsfdf2
+libc.so: __addsf3


>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-03-31 10:14       ` caiyinyu
@ 2024-04-01 13:19         ` Florian Weimer
  2024-04-02  3:40           ` caiyinyu
  0 siblings, 1 reply; 16+ messages in thread
From: Florian Weimer @ 2024-04-01 13:19 UTC (permalink / raw)
  To: caiyinyu; +Cc: josmyers, libc-alpha, adhemerval.zanella, xry111

> This patch accomplishes the following:
> 1. Implements soft floating-point functions to enhance compatibility and
>   flexibility in environments without hardware floating-point support.
> 2. Refactors macro definitions by moving them from `fenv_libc.h` to
>   `fpu_control.h`. This change not only simplifies the codebase but also
>   eliminates the need for the unexported header file `fenv_libc.h`,
>   streamlining the inclusion of floating-point utilities across different
>   modules.

This patch appears to add a new ABI.  The commit message doesn't mention
this, and it probably needs a NEWS update, too.

The new ABI is backdated to glibc 2.36.  For new ABIs, we would expect a
glibc 2.40 baseline, but this is not a hard technical requirement.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-04-01 13:19         ` Florian Weimer
@ 2024-04-02  3:40           ` caiyinyu
  2024-04-02 10:40             ` Xi Ruoyao
  2024-04-02 21:18             ` Joseph Myers
  0 siblings, 2 replies; 16+ messages in thread
From: caiyinyu @ 2024-04-02  3:40 UTC (permalink / raw)
  To: Florian Weimer; +Cc: josmyers, libc-alpha, adhemerval.zanella, xry111


在 2024/4/1 下午9:19, Florian Weimer 写道:
>> This patch accomplishes the following:
>> 1. Implements soft floating-point functions to enhance compatibility and
>>    flexibility in environments without hardware floating-point support.
>> 2. Refactors macro definitions by moving them from `fenv_libc.h` to
>>    `fpu_control.h`. This change not only simplifies the codebase but also
>>    eliminates the need for the unexported header file `fenv_libc.h`,
>>    streamlining the inclusion of floating-point utilities across different
>>    modules.
> This patch appears to add a new ABI.  The commit message doesn't mention
> this, and it probably needs a NEWS update, too.
>
> The new ABI is backdated to glibc 2.36.  For new ABIs, we would expect a
> glibc 2.40 baseline, but this is not a hard technical requirement.


The LoongArch soft ABI was added to glibc in version 2.37[1], but it was 
not fully implemented,
lacking functions for handling soft float exceptions/rounding modes. 
This patch fills in
the missing functions and fixes related failed test cases.
Therefore, would backporting this patch to 2.37 be sufficient?

I will update the NEWS (if necessary) and
the commit message of this patch in the v3 version of the patch as follows:

diff --git a/NEWS b/NEWS
index da4b2223e9..b64607ff57 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,11 @@ Major new features:
    more extensive verification tests for AT_SECURE programs and not 
meant to
    be a security feature.

+* Added missing functions for handling soft float exceptions/rounding modes
+  in the LoongArch soft ABI. The LoongArch soft ABI was introduced in 
version
+  2.37 of glibc, but it did not include comprehensive support for soft 
float
+  exceptions/rounding modes.
+
  Deprecated and removed features, and other changes affecting 
compatibility:

    [Add deprecations, removals and changes affecting compatibility here]


commit info:

     LoongArch: Add soft floating-point fe* function implementations.

     This patch accomplishes the following:
     1. Implements soft floating-point functions to enhance 
compatibility and
       flexibility in environments without hardware floating-point support.
     2. Refactors macro definitions by moving them from `fenv_libc.h` to
       `fpu_control.h`. This change not only simplifies the codebase but 
also
       eliminates the need for the unexported header file `fenv_libc.h`,
       streamlining the inclusion of floating-point utilities across 
different
       modules.

     The LoongArch soft ABI was introduced in version 2.37 of glibc, but 
it did
     not include comprehensive support for soft float 
exceptions/rounding modes.
     This commit added missing functions for handling soft float 
exceptions/rounding
     modes in the LoongArch soft ABI and fixes related failed test cases.

     Signed-off-by: caiyinyu <caiyinyu@loongson.cn>

[1]
commit 930993921f2f381b545ea1b1f2d9c534b2b72b08
Author: caiyinyu <caiyinyu@loongson.cn>
Date:   Mon Aug 22 16:00:51 2022 +0800

     LoongArch: Add soft float support.


  scripts/build-many-glibcs.py                      |  4 ++++
  sysdeps/loongarch/Makefile                        |  8 --------
  sysdeps/loongarch/__longjmp.S                     |  2 ++
  sysdeps/loongarch/bits/setjmp.h                   |  3 +++
  sysdeps/loongarch/dl-trampoline.S                 | 11 +++++++++--
  sysdeps/loongarch/fpu_control.h                   | 13 +++++++++++++
  sysdeps/loongarch/nofpu/Implies                   |  1 +
  sysdeps/loongarch/nofpu/math-tests-exceptions.h   | 28 
++++++++++++++++++++++++++++
  sysdeps/loongarch/nofpu/math-tests-rounding.h     | 27 
+++++++++++++++++++++++++++
  sysdeps/loongarch/preconfigure                    |  1 -
  sysdeps/loongarch/preconfigure.ac                 |  1 -
  sysdeps/loongarch/setjmp.S                        |  2 ++
  sysdeps/unix/sysv/linux/loongarch/Makefile        |  9 +++++++++
  sysdeps/unix/sysv/linux/loongarch/configure       | 51 
++++++++++++++++++++++++++++++++++++++++++++++++---
  sysdeps/unix/sysv/linux/loongarch/configure.ac    | 22 
+++++++++++++++++++---
  sysdeps/unix/sysv/linux/loongarch/ldd-rewrite.sed |  2 +-
  sysdeps/unix/sysv/linux/loongarch/shlib-versions  |  2 ++

> Thanks,
> Florian


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-04-02  3:40           ` caiyinyu
@ 2024-04-02 10:40             ` Xi Ruoyao
  2024-04-02 11:45               ` Florian Weimer
  2024-04-02 12:12               ` Andreas Schwab
  2024-04-02 21:18             ` Joseph Myers
  1 sibling, 2 replies; 16+ messages in thread
From: Xi Ruoyao @ 2024-04-02 10:40 UTC (permalink / raw)
  To: caiyinyu, Florian Weimer; +Cc: josmyers, libc-alpha, adhemerval.zanella

On Tue, 2024-04-02 at 11:40 +0800, caiyinyu wrote:
> The LoongArch soft ABI was added to glibc in version 2.37[1], but it was 
> not fully implemented,
> lacking functions for handling soft float exceptions/rounding modes. 
> This patch fills in
> the missing functions and fixes related failed test cases.
> Therefore, would backporting this patch to 2.37 be sufficient?

The problem is this change is breaking ABI.  The behavior of
feenableexcept etc. *is* a part of the ABI.  For example, if a not so
careful programmer invokes feenableexcept(FE_INVALID) and then
mistakenly invokes something like acos(1.0000001), before this change
the program will continue to run with a NaN, but after this change it'll
crash with SIGFPE.

You may argue such a program is buggy, but ABI stability requires that
even such a buggy program should still behave, unless it's invoking an
undefined behavior per the specification **when the program was built**.
For example, on x86_64 Glibc still have memcpy@GLIBC_2.2.5 which is
actually memmove, to support programs built before ISO C (invoking
memcpy with overlapping ranges, doing so was well defined before ISO C
but an undefined behavior today).

In this case, the specification before Glibc 2.40 is well defined as
"feenableexcept will do nothing and return an error": there is even a
linker warning actively tells the user this definition!

So backporting this to 2.37 is a no-go.  Doing so will back-stab people
relying on the ABI stability of the rolling-release branch.  
Instead we should raise the ABI version to 2.40, so soft-fp programs
linked with these Glibc-2.37 functions will refuse to run with Glibc-
2.40.  This is "adding a new ABI."

In the NEWS file we can tell the users "if your program errors out with
`cannot find ${something}@GLIBC_2_37`, you need to relink it and test it
thoroughly again to ensure it does not intentionally or unintentionally
relies on the behavior predating Glibc 2.40."

Or maybe we can provide both feenableexcept@GLIBC_2_37 and
feenableexcept@GLIBC_2_40 in libm.so.6?  I don't know if doing so is
really possible.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-04-02 10:40             ` Xi Ruoyao
@ 2024-04-02 11:45               ` Florian Weimer
  2024-04-02 12:02                 ` Xi Ruoyao
  2024-04-02 12:12               ` Andreas Schwab
  1 sibling, 1 reply; 16+ messages in thread
From: Florian Weimer @ 2024-04-02 11:45 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: caiyinyu, josmyers, libc-alpha, adhemerval.zanella

* Xi Ruoyao:

> On Tue, 2024-04-02 at 11:40 +0800, caiyinyu wrote:
>> The LoongArch soft ABI was added to glibc in version 2.37[1], but it was 
>> not fully implemented,
>> lacking functions for handling soft float exceptions/rounding modes. 
>> This patch fills in
>> the missing functions and fixes related failed test cases.
>> Therefore, would backporting this patch to 2.37 be sufficient?
>
> The problem is this change is breaking ABI.  The behavior of
> feenableexcept etc. *is* a part of the ABI.  For example, if a not so
> careful programmer invokes feenableexcept(FE_INVALID) and then
> mistakenly invokes something like acos(1.0000001), before this change
> the program will continue to run with a NaN, but after this change it'll
> crash with SIGFPE.

That's a behavioral change, not an ABI change.

> You may argue such a program is buggy, but ABI stability requires that
> even such a buggy program should still behave, unless it's invoking an
> undefined behavior per the specification **when the program was built**.
> For example, on x86_64 Glibc still have memcpy@GLIBC_2.2.5 which is
> actually memmove, to support programs built before ISO C (invoking
> memcpy with overlapping ranges, doing so was well defined before ISO C
> but an undefined behavior today).

No, this was done to keep Adobe Flash working:

  Strange sound on mp3 flash website  
  <https://bugzilla.redhat.com/show_bug.cgi?id=638477>

In general, we do not promise bug-for-bug compatibility.

> In this case, the specification before Glibc 2.40 is well defined as
> "feenableexcept will do nothing and return an error": there is even a
> linker warning actively tells the user this definition!

On the other hand, if an application keeps using the stub despite this
warning, I think it should be prepared for turning into a real
implementation.

> Or maybe we can provide both feenableexcept@GLIBC_2_37 and
> feenableexcept@GLIBC_2_40 in libm.so.6?  I don't know if doing so is
> really possible.

Yes, it's possible to add a compat symbol for that and keep the
do-nothing behavior for old applications.

Wouldn't the issue manifest on other architectures with a working
(non-stub) feenableexcept implementation?

Thanks,
Florian


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-04-02 11:45               ` Florian Weimer
@ 2024-04-02 12:02                 ` Xi Ruoyao
  2024-04-02 12:34                   ` Florian Weimer
  0 siblings, 1 reply; 16+ messages in thread
From: Xi Ruoyao @ 2024-04-02 12:02 UTC (permalink / raw)
  To: Florian Weimer; +Cc: caiyinyu, josmyers, libc-alpha, adhemerval.zanella

On Tue, 2024-04-02 at 13:45 +0200, Florian Weimer wrote:
> > Or maybe we can provide both feenableexcept@GLIBC_2_37 and
> > feenableexcept@GLIBC_2_40 in libm.so.6?  I don't know if doing so is
> > really possible.
> 
> Yes, it's possible to add a compat symbol for that and keep the
> do-nothing behavior for old applications.
> 
> Wouldn't the issue manifest on other architectures with a working
> (non-stub) feenableexcept implementation?

Has there been another port where the fe* implementation was changed
from stub to real?  Then I'd say just do what that port did.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-04-02 10:40             ` Xi Ruoyao
  2024-04-02 11:45               ` Florian Weimer
@ 2024-04-02 12:12               ` Andreas Schwab
  1 sibling, 0 replies; 16+ messages in thread
From: Andreas Schwab @ 2024-04-02 12:12 UTC (permalink / raw)
  To: Xi Ruoyao
  Cc: caiyinyu, Florian Weimer, josmyers, libc-alpha, adhemerval.zanella

On Apr 02 2024, Xi Ruoyao wrote:

> The problem is this change is breaking ABI.  The behavior of
> feenableexcept etc. *is* a part of the ABI.  For example, if a not so
> careful programmer invokes feenableexcept(FE_INVALID) and then
> mistakenly invokes something like acos(1.0000001), before this change
> the program will continue to run with a NaN, but after this change it'll
> crash with SIGFPE.

If you ask for FE_INVALID exceptions, you need to be prepared for them.
This is not the default mode of operation.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-04-02 12:02                 ` Xi Ruoyao
@ 2024-04-02 12:34                   ` Florian Weimer
  0 siblings, 0 replies; 16+ messages in thread
From: Florian Weimer @ 2024-04-02 12:34 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: caiyinyu, josmyers, libc-alpha, adhemerval.zanella

* Xi Ruoyao:

> On Tue, 2024-04-02 at 13:45 +0200, Florian Weimer wrote:
>> > Or maybe we can provide both feenableexcept@GLIBC_2_37 and
>> > feenableexcept@GLIBC_2_40 in libm.so.6?  I don't know if doing so is
>> > really possible.
>> 
>> Yes, it's possible to add a compat symbol for that and keep the
>> do-nothing behavior for old applications.
>> 
>> Wouldn't the issue manifest on other architectures with a working
>> (non-stub) feenableexcept implementation?
>
> Has there been another port where the fe* implementation was changed
> from stub to real?  Then I'd say just do what that port did.

Several, actually, but that was more than twenty years ago.  Not sure if
that tells us anything for today.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-03-31 10:31       ` caiyinyu
@ 2024-04-02 21:10         ` Joseph Myers
  0 siblings, 0 replies; 16+ messages in thread
From: Joseph Myers @ 2024-04-02 21:10 UTC (permalink / raw)
  To: caiyinyu; +Cc: libc-alpha, adhemerval.zanella, xry111, xuchenghua

[-- Attachment #1: Type: text/plain, Size: 1636 bytes --]

On Sun, 31 Mar 2024, caiyinyu wrote:

> LoongArch soft float support was added in version 2.37, but the fe* functions
> were not completely added. I want to backport this patch if possible
> (it requires some modifications) to the 2.37/38/39/master branch, so the
> version of
> the relevant symbols in  Versions is GLIBC_2.37.

I don't think such new symbol additions are appropriate for backporting; 
the GLIBC_2.37 symbol version contents should have been fixed at the time 
2.37 was released.

> diff --git a/sysdeps/loongarch/nofpu/Versions
> b/sysdeps/loongarch/nofpu/Versions
> index 6d7f6aae6c..73b6a71bbd 100644
> --- a/sysdeps/loongarch/nofpu/Versions
> +++ b/sysdeps/loongarch/nofpu/Versions
> @@ -1,5 +1,13 @@
>  libc {
> +  GLIBC_2.37 {
> +    __adddf3; __addsf3; __divdf3; __divsf3; __eqdf2; __eqsf2;
> +    __extendsfdf2; __fixdfsi; __fixsfsi;
> +    __fixunsdfsi; __fixunssfsi;
> +    __floatsidf; __floatsisf;
> +    __gedf2; __gesf2; __ledf2; __lesf2; __muldf3; __mulsf3;
> +    __negdf2; __negsf2; __subdf3; __subsf3; __truncdfsf2;
> +  }

I'd tend to expect you also to have the symbols that powerpc-nofpu has at 
GLIBC_2.4 version.

    __floatundidf; __floatundisf;
    __floatunsidf; __floatunsisf;
    __unorddf2; __unordsf2;
    __nedf2; __nesf2;
    __gtdf2; __gtsf2;
    __ltdf2; __ltsf2;

Also, as LoongArch uses binary128 long double, I'd expect all the TFmode 
symbols as well.  And as a 64-bit architecture, I'd expect TImode symbols 
(conversions between floating modes and 128-bit signed and unsigned 
integers, in both directions) as well.

-- 
Joseph S. Myers
josmyers@redhat.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
  2024-04-02  3:40           ` caiyinyu
  2024-04-02 10:40             ` Xi Ruoyao
@ 2024-04-02 21:18             ` Joseph Myers
  1 sibling, 0 replies; 16+ messages in thread
From: Joseph Myers @ 2024-04-02 21:18 UTC (permalink / raw)
  To: caiyinyu; +Cc: Florian Weimer, libc-alpha, adhemerval.zanella, xry111

On Tue, 2 Apr 2024, caiyinyu wrote:

> The LoongArch soft ABI was added to glibc in version 2.37[1], but it was not
> fully implemented,
> lacking functions for handling soft float exceptions/rounding modes. This

That's the normal expectation for soft-float configurations - that they 
don't provide exceptions / rounding modes support; the powerpc-nofpu 
configuration is very much the unusual case.  (More broadly, the 
expectation is that floating-point use in general is fairly limited on 
soft-float systems; that any heavy uses of floating-point, including 
anyone concerned with exceptions / rounding modes, would normally be using 
hardware floating-point arithmetic.)

-- 
Joseph S. Myers
josmyers@redhat.com


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] LoongArch: Add soft floating-point fe* function implementations.
@ 2024-04-02 14:46 caiyinyu
  0 siblings, 0 replies; 16+ messages in thread
From: caiyinyu @ 2024-04-02 14:46 UTC (permalink / raw)
  To: Florian Weimer, Xi Ruoyao; +Cc: josmyers, libc-alpha, adhemerval.zanella

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-04-02 21:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 12:46 [PATCH] LoongArch: Add soft floating-point fe* function implementations caiyinyu
2024-03-26 17:34 ` Joseph Myers
2024-03-27  8:42   ` caiyinyu
2024-03-27 17:10     ` Joseph Myers
2024-03-31 10:14       ` caiyinyu
2024-04-01 13:19         ` Florian Weimer
2024-04-02  3:40           ` caiyinyu
2024-04-02 10:40             ` Xi Ruoyao
2024-04-02 11:45               ` Florian Weimer
2024-04-02 12:02                 ` Xi Ruoyao
2024-04-02 12:34                   ` Florian Weimer
2024-04-02 12:12               ` Andreas Schwab
2024-04-02 21:18             ` Joseph Myers
2024-03-31 10:31       ` caiyinyu
2024-04-02 21:10         ` Joseph Myers
2024-04-02 14:46 caiyinyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).