]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/Include/Aarch64/machine/ieeefp.h
StdLib: Add support for AArch64
[mirror_edk2.git] / StdLib / Include / Aarch64 / machine / ieeefp.h
diff --git a/StdLib/Include/Aarch64/machine/ieeefp.h b/StdLib/Include/Aarch64/machine/ieeefp.h
new file mode 100644 (file)
index 0000000..f37278b
--- /dev/null
@@ -0,0 +1,45 @@
+/*  $NetBSD: ieeefp.h,v 1.3 2013/04/23 05:42:23 matt Exp $  */\r
+\r
+/*\r
+ * Based on ieeefp.h written by J.T. Conklin, Apr 28, 1995\r
+ * Public domain.\r
+ */\r
+\r
+#ifndef _AARCH64_IEEEFP_H_\r
+#define _AARCH64_IEEEFP_H_\r
+\r
+#include <LibConfig.h>\r
+#include <sys/featuretest.h>\r
+\r
+#if defined(_NETBSD_SOURCE) || defined(_ISOC99_SOURCE)\r
+\r
+#include <machine/fenv.h>\r
+\r
+#if !defined(_ISOC99_SOURCE)\r
+\r
+/* Exception type (used by fpsetmask() et al.) */\r
+\r
+typedef int fp_except;\r
+\r
+/* Bit defines for fp_except */\r
+\r
+#define FP_X_INV    FE_INVALID      /* invalid operation exception */\r
+#define FP_X_DZ     FE_DIVBYZERO    /* divide-by-zero exception */\r
+#define FP_X_OFL    FE_OVERFLOW     /* overflow exception */\r
+#define FP_X_UFL    FE_UNDERFLOW    /* underflow exception */\r
+#define FP_X_IMP    FE_INEXACT      /* imprecise (prec. loss; "inexact") */\r
+\r
+/* Rounding modes */\r
+\r
+typedef enum {\r
+    FP_RN=FE_TONEAREST,     /* round to nearest representable number */\r
+    FP_RP=FE_UPWARD,        /* round toward positive infinity */\r
+    FP_RM=FE_DOWNWARD,      /* round toward negative infinity */\r
+    FP_RZ=FE_TOWARDZERO     /* round to zero (truncate) */\r
+} fp_rnd;\r
+\r
+#endif /* !_ISOC99_SOURCE */\r
+\r
+#endif /* _NETBSD_SOURCE || _ISOC99_SOURCE */\r
+\r
+#endif /* _AARCH64_IEEEFP_H_ */\r