]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/Include/Aarch64/machine/float.h
StdLib: Add support for AArch64
[mirror_edk2.git] / StdLib / Include / Aarch64 / machine / float.h
diff --git a/StdLib/Include/Aarch64/machine/float.h b/StdLib/Include/Aarch64/machine/float.h
new file mode 100644 (file)
index 0000000..f1da46c
--- /dev/null
@@ -0,0 +1,59 @@
+/*  $NetBSD: float.h,v 1.6 2005/12/11 12:16:47 christos Exp $   */\r
+/*-\r
+ * Copyright (c) 2008 The NetBSD Foundation, Inc.\r
+ * All rights reserved.\r
+ *\r
+ * This code is derived from software contributed to The NetBSD Foundation\r
+ * by\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
+#ifndef _AARCH64_FLOAT_H_\r
+#define _AARCH64_FLOAT_H_\r
+\r
+#ifndef __VFP_FP__\r
+#define LDBL_MANT_DIG   64\r
+#define LDBL_EPSILON    1.0842021724855044340E-19L\r
+#define LDBL_DIG        18\r
+#define LDBL_MIN_EXP    (-16381)\r
+#define LDBL_MIN        1.6810515715560467531E-4932L\r
+#define LDBL_MIN_10_EXP (-4931)\r
+#define LDBL_MAX_EXP    16384\r
+#define LDBL_MAX        1.1897314953572317650E+4932L\r
+#define LDBL_MAX_10_EXP 4932\r
+#endif\r
+\r
+#include <sys/float_ieee754.h>\r
+\r
+#ifndef __VFP_FP__\r
+#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \\r
+    !defined(_XOPEN_SOURCE) || \\r
+    ((__STDC_VERSION__ - 0) >= 199901L) || \\r
+    ((_POSIX_C_SOURCE - 0) >= 200112L) || \\r
+    ((_XOPEN_SOURCE  - 0) >= 600) || \\r
+    defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)\r
+#define DECIMAL_DIG     21\r
+#endif /* !defined(_ANSI_SOURCE) && ... */\r
+#endif /* !__VFP_FP__ */\r
+\r
+#endif /* !_AARCH64_FLOAT_H_ */\r