summaryrefslogtreecommitdiff
path: root/libm/m68k/fegetmode.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2025-04-26 19:13:59 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2025-04-27 05:03:56 +0200
commitd69c496886cd57f95a13f4f883eb1a5b73be83ab (patch)
treed7d8aa34b6cd2bf01e2631713858af67e57009d6 /libm/m68k/fegetmode.c
parent12d8572ae301c5ce9a622f658894bdfc88c8d724 (diff)
m68k: add fenv support from glibc
Diffstat (limited to 'libm/m68k/fegetmode.c')
-rw-r--r--libm/m68k/fegetmode.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/libm/m68k/fegetmode.c b/libm/m68k/fegetmode.c
new file mode 100644
index 000000000..19f49922a
--- /dev/null
+++ b/libm/m68k/fegetmode.c
@@ -0,0 +1,26 @@
+/* Store current floating-point control modes. M68K version.
+ Copyright (C) 2016-2025 Free Software Foundation, Inc.
+
+ 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 <fenv.h>
+#include <fpu_control.h>
+
+int
+fegetmode (femode_t *modep)
+{
+ _FPU_GETCW (*modep);
+ return 0;
+}