]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - soft-fp/floatdisf.c
soft-fp: Add brain format support
[thirdparty/glibc.git] / soft-fp / floatdisf.c
index 72252e4a999184cb4f70db59aac39ec3ff2e79ef..ab70d9e3136ba8448bb1537caf290f748a3199a4 100644 (file)
@@ -1,9 +1,7 @@
 /* Software floating-point emulation.
    Convert a 64bit signed integer to IEEE single
-   Copyright (C) 1997-2013 Free Software Foundation, Inc.
+   Copyright (C) 1997-2024 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Richard Henderson (rth@cygnus.com) and
-                 Jakub Jelinek (jj@ultra.linux.cz).
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include "soft-fp.h"
 #include "single.h"
 
-SFtype __floatdisf(DItype i)
+SFtype
+__floatdisf (DItype i)
 {
   FP_DECL_EX;
-  FP_DECL_S(A);
+  FP_DECL_S (A);
   SFtype a;
 
-  FP_FROM_INT_S(A, i, DI_BITS, UDItype);
-  FP_PACK_RAW_S(a, A);
+  FP_INIT_ROUNDMODE;
+  FP_FROM_INT_S (A, i, DI_BITS, UDItype);
+  FP_PACK_RAW_S (a, A);
   FP_HANDLE_EXCEPTIONS;
 
   return a;