diff options
author | NetBSD project <NetBSD project> | 2015-07-30 09:50:51 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2015-07-30 09:50:51 +0000 |
commit | 3352b62bebfd1e5c2e9961f481df968ab317d78d (patch) | |
tree | 12bfd6162cefbb63fa6e26c9fc9b7c9526838d9d /StdLib/Include/ieeefp.h | |
parent | b393333538ee3a6b16a3a1d25ab2372942c3aac7 (diff) | |
download | edk2-3352b62bebfd1e5c2e9961f481df968ab317d78d.tar.gz edk2-3352b62bebfd1e5c2e9961f481df968ab317d78d.tar.bz2 edk2-3352b62bebfd1e5c2e9961f481df968ab317d78d.zip |
StdLib/LibC: Add software floating point library from NetBSD
Floating point processing is not supported on ARM for UEFI. In order to
support UEFI applications in AppPkg we use this library to provide the
required functionality.
Changes as compared to the NetBSD version:
- Formatting changes (tabs to spaces, DOS line endings etc).
- Disable exceptions as described in the float_raise() function.
- Disable definition of 'Symbolic Boolean literals' in milieu.h.
Source originally from: NetBSD project
- Source: http://cvsweb.netbsd.org/bsdweb.cgi/?only_with_tag=MAIN
- Licensing and Copyright: http://www.netbsd.org/about/redistribution.html
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Daryl McDaniel <edk2-lists@mc2research.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18116 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/Include/ieeefp.h')
-rw-r--r-- | StdLib/Include/ieeefp.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/StdLib/Include/ieeefp.h b/StdLib/Include/ieeefp.h new file mode 100644 index 0000000000..ee3edf5566 --- /dev/null +++ b/StdLib/Include/ieeefp.h @@ -0,0 +1,46 @@ +/* $NetBSD: ieeefp.h,v 1.9 2011/03/27 05:13:15 mrg Exp $ */
+/** @file
+*
+* Copyright (c) 2013 - 2014, ARM Limited. All rights reserved.
+*
+* This program and the accompanying materials
+* are licensed and made available under the terms and conditions of the BSD License
+* which accompanies this distribution. The full text of the license may be found at
+* http://opensource.org/licenses/bsd-license.php
+*
+* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+*
+**/
+/*
+ * Written by J.T. Conklin, Apr 6, 1995
+ * Public domain.
+ */
+
+#ifndef _IEEEFP_H_
+#define _IEEEFP_H_
+
+#include <sys/cdefs.h>
+#include <machine/ieeefp.h>
+
+__BEGIN_DECLS
+typedef fp_rnd fp_rnd_t;
+#ifdef _X86_IEEEFP_H_ /* XXX */
+typedef fp_prec fp_prec_t;
+#endif
+typedef fp_except fp_except_t;
+
+fp_rnd_t fpgetround(void);
+fp_rnd_t fpsetround(fp_rnd_t);
+#ifdef _X86_IEEEFP_H_ /* XXX */
+fp_prec_t fpgetprec(void);
+fp_prec_t fpsetprec(fp_prec_t);
+#endif
+fp_except_t fpgetmask(void);
+fp_except_t fpsetmask(fp_except_t);
+fp_except_t fpgetsticky(void);
+fp_except_t fpsetsticky(fp_except_t);
+fp_except_t fpresetsticky(fp_except_t);
+__END_DECLS
+
+#endif /* _IEEEFP_H_ */
|