summaryrefslogtreecommitdiff
path: root/sys/arch/sh/include/ieeefp.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-10-06 21:02:56 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-10-06 21:02:56 +0000
commitf2984aabfd358ae2731013df5d571a596cb9a5eb (patch)
tree0b36a098a4b5fcb0d202c68c5a85123e7d95f419 /sys/arch/sh/include/ieeefp.h
parentb50063e7723d8a96f3eaeb641e59f7f161dcd917 (diff)
Preliminary bits for SuperH-based ports, based on NetBSD/sh3 codebase with
minor changes.
Diffstat (limited to 'sys/arch/sh/include/ieeefp.h')
-rw-r--r--sys/arch/sh/include/ieeefp.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/arch/sh/include/ieeefp.h b/sys/arch/sh/include/ieeefp.h
new file mode 100644
index 00000000000..141048038ad
--- /dev/null
+++ b/sys/arch/sh/include/ieeefp.h
@@ -0,0 +1,27 @@
+/* $OpenBSD: ieeefp.h,v 1.1 2006/10/06 21:02:55 miod Exp $ */
+/* $NetBSD: ieeefp.h,v 1.3 2002/04/28 17:10:34 uch Exp $ */
+
+/*
+ * Written by J.T. Conklin, Apr 6, 1995
+ * Public domain.
+ */
+
+#ifndef _SH_IEEEFP_H_
+#define _SH_IEEEFP_H_
+
+typedef int fp_except;
+#define FP_X_INV 0x01 /* invalid operation exception */
+#define FP_X_DNML 0x02 /* denormalization exception */
+#define FP_X_DZ 0x04 /* divide-by-zero exception */
+#define FP_X_OFL 0x08 /* overflow exception */
+#define FP_X_UFL 0x10 /* underflow exception */
+#define FP_X_IMP 0x20 /* imprecise (loss of precision) */
+
+typedef enum {
+ FP_RN=0, /* round to nearest representable number */
+ FP_RM=1, /* round toward negative infinity */
+ FP_RP=2, /* round toward positive infinity */
+ FP_RZ=3 /* round to zero (truncate) */
+} fp_rnd;
+
+#endif /* !_SH_IEEEFP_H_ */