]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/LibC/Softfloat/negxf2.c
StdLib/LibC: Add software floating point library from NetBSD
[mirror_edk2.git] / StdLib / LibC / Softfloat / negxf2.c
diff --git a/StdLib/LibC/Softfloat/negxf2.c b/StdLib/LibC/Softfloat/negxf2.c
new file mode 100644 (file)
index 0000000..c640415
--- /dev/null
@@ -0,0 +1,39 @@
+/* $NetBSD: negxf2.c,v 1.2 2004/09/27 10:16:24 he Exp $ */\r
+/** @file\r
+*\r
+*  Copyright (c) 2013 - 2014, ARM Limited. All rights reserved.\r
+*\r
+*  This program and the accompanying materials\r
+*  are licensed and made available under the terms and conditions of the BSD License\r
+*  which accompanies this distribution.  The full text of the license may be found at\r
+*  http://opensource.org/licenses/bsd-license.php\r
+*\r
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+*\r
+**/\r
+/*\r
+ * Written by Ben Harris, 2000.  This file is in the Public Domain.\r
+ */\r
+\r
+#include "softfloat-for-gcc.h"\r
+#include "milieu.h"\r
+#include "softfloat.h"\r
+\r
+#include <sys/cdefs.h>\r
+#if defined(LIBC_SCCS) && !defined(lint)\r
+__RCSID("$NetBSD: negxf2.c,v 1.2 2004/09/27 10:16:24 he Exp $");\r
+#endif /* LIBC_SCCS and not lint */\r
+\r
+#ifdef FLOATX80\r
+\r
+floatx80 __negxf2(floatx80);\r
+\r
+floatx80\r
+__negxf2(floatx80 a)\r
+{\r
+\r
+    /* libgcc1.c says -a */\r
+    return __mulxf3(a,__floatsixf(-1));\r
+}\r
+#endif /* FLOATX80 */\r