]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/LibC/Softfloat/fpgetmask.c
StdLib/LibC: Add software floating point library from NetBSD
[mirror_edk2.git] / StdLib / LibC / Softfloat / fpgetmask.c
diff --git a/StdLib/LibC/Softfloat/fpgetmask.c b/StdLib/LibC/Softfloat/fpgetmask.c
new file mode 100644 (file)
index 0000000..fe0f623
--- /dev/null
@@ -0,0 +1,55 @@
+/* $NetBSD: fpgetmask.c,v 1.4 2008/04/28 20:23:00 martin Exp $ */\r
+\r
+/*-\r
+ * Copyright (c) 1997 The NetBSD Foundation, Inc.\r
+ * All rights reserved.\r
+ *\r
+ * This code is derived from software contributed to The NetBSD Foundation\r
+ * by Neil A. Carson and Mark Brinicombe\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ *    notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the\r
+ *    documentation and/or other materials provided with the distribution.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS\r
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\r
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS\r
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
+ * POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+#include <sys/cdefs.h>\r
+#if defined(LIBC_SCCS) && !defined(lint)\r
+__RCSID("$NetBSD: fpgetmask.c,v 1.4 2008/04/28 20:23:00 martin Exp $");\r
+#endif /* LIBC_SCCS and not lint */\r
+\r
+#include "namespace.h"\r
+\r
+#include <ieeefp.h>\r
+#ifdef SOFTFLOAT_FOR_GCC\r
+#include "softfloat-for-gcc.h"\r
+#endif\r
+#include "milieu.h"\r
+#include "softfloat.h"\r
+\r
+#ifdef __weak_alias\r
+__weak_alias(fpgetmask,_fpgetmask)\r
+#endif\r
+\r
+fp_except\r
+fpgetmask(void)\r
+{\r
+\r
+    return float_exception_mask;\r
+}\r