svn commit: r226607 - in head: include sys/amd64/include
sys/arm/include sys/i386/include sys/ia64/include
sys/mips/include sys/powerpc/include sys/sparc64/include
David Schultz
das at FreeBSD.org
Fri Oct 21 06:41:47 UTC 2011
Author: das
Date: Fri Oct 21 06:41:46 2011
New Revision: 226607
URL: http://svn.freebsd.org/changeset/base/226607
Log:
People porting FreeBSD to new architectures ought not have to
implement a deprecated FPU control interface in addition to the
standard one. To make this clearer, further deprecate ieeefp.h
by not declaring the function prototypes except on architectures
that implement them already.
Currently i386 and amd64 implement the ieeefp.h interface for
compatibility, and for fp[gs]etprec(), which doesn't exist on
most other hardware. Powerpc, sparc64, and ia64 partially implement
it and probably shouldn't, and other architectures don't implement it
at all.
Modified:
head/include/ieeefp.h
head/sys/amd64/include/ieeefp.h
head/sys/arm/include/ieeefp.h
head/sys/i386/include/ieeefp.h
head/sys/ia64/include/ieeefp.h
head/sys/mips/include/ieeefp.h
head/sys/powerpc/include/ieeefp.h
head/sys/sparc64/include/ieeefp.h
Modified: head/include/ieeefp.h
==============================================================================
--- head/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606)
+++ head/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607)
@@ -12,15 +12,4 @@
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
-#if !defined(_IEEEFP_INLINED_)
-__BEGIN_DECLS
-extern fp_rnd_t fpgetround(void);
-extern fp_rnd_t fpsetround(fp_rnd_t);
-extern fp_except_t fpgetmask(void);
-extern fp_except_t fpsetmask(fp_except_t);
-extern fp_except_t fpgetsticky(void);
-extern fp_except_t fpsetsticky(fp_except_t);
-__END_DECLS
-#endif /* !_IEEEFP_INLINED_ */
-
#endif /* _IEEEFP_H_ */
Modified: head/sys/amd64/include/ieeefp.h
==============================================================================
--- head/sys/amd64/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606)
+++ head/sys/amd64/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607)
@@ -39,6 +39,8 @@
#define _MACHINE_IEEEFP_H_
/*
+ * Deprecated historical FPU control interface
+ *
* IEEE floating point type, constant and function definitions.
* XXX: {FP,SSE}*FLD and {FP,SSE}*OFF are undocumented pollution.
*/
@@ -287,13 +289,16 @@ __fpgetsticky(void)
#define fpsetprec(m) __fpsetprec(m)
#define fpsetround(m) __fpsetround(m)
-/* Suppress prototypes in the MI header. */
-#define _IEEEFP_INLINED_ 1
-
#else /* !(!__IEEEFP_NOINLINES__ && __GNUCLIKE_ASM) */
/* Augment the userland declarations. */
__BEGIN_DECLS
+extern fp_rnd_t fpgetround(void);
+extern fp_rnd_t fpsetround(fp_rnd_t);
+extern fp_except_t fpgetmask(void);
+extern fp_except_t fpsetmask(fp_except_t);
+extern fp_except_t fpgetsticky(void);
+extern fp_except_t fpsetsticky(fp_except_t);
fp_prec_t fpgetprec(void);
fp_prec_t fpsetprec(fp_prec_t);
__END_DECLS
Modified: head/sys/arm/include/ieeefp.h
==============================================================================
--- head/sys/arm/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606)
+++ head/sys/arm/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607)
@@ -8,6 +8,8 @@
#ifndef _MACHINE_IEEEFP_H_
#define _MACHINE_IEEEFP_H_
+/* Deprecated historical FPU control interface */
+
/* FP exception codes */
#define FP_EXCEPT_INV 0
#define FP_EXCEPT_DZ 1
Modified: head/sys/i386/include/ieeefp.h
==============================================================================
--- head/sys/i386/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606)
+++ head/sys/i386/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607)
@@ -39,6 +39,8 @@
#define _MACHINE_IEEEFP_H_
/*
+ * Deprecated historical FPU control interface
+ *
* IEEE floating point type, constant and function definitions.
* XXX: FP*FLD and FP*OFF are undocumented pollution.
*/
@@ -253,7 +255,4 @@ fpresetsticky(fp_except_t _m)
#endif /* __GNUCLIKE_ASM */
-/* Suppress prototypes in the MI header. */
-#define _IEEEFP_INLINED_ 1
-
#endif /* !_MACHINE_IEEEFP_H_ */
Modified: head/sys/ia64/include/ieeefp.h
==============================================================================
--- head/sys/ia64/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606)
+++ head/sys/ia64/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607)
@@ -29,6 +29,8 @@
#ifndef _MACHINE_IEEEFP_H_
#define _MACHINE_IEEEFP_H_
+/* Deprecated historical FPU control interface */
+
#include <machine/fpu.h>
typedef int fp_except_t;
@@ -45,4 +47,11 @@ typedef enum {
FP_RZ /* round toward zero */
} fp_rnd_t;
+__BEGIN_DECLS
+extern fp_rnd_t fpgetround(void);
+extern fp_rnd_t fpsetround(fp_rnd_t);
+extern fp_except_t fpgetmask(void);
+extern fp_except_t fpsetmask(fp_except_t);
+__END_DECLS
+
#endif /* !_MACHINE_IEEEFP_H_ */
Modified: head/sys/mips/include/ieeefp.h
==============================================================================
--- head/sys/mips/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606)
+++ head/sys/mips/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607)
@@ -11,6 +11,8 @@
#ifndef _MACHINE_IEEEFP_H_
#define _MACHINE_IEEEFP_H_
+/* Deprecated historical FPU control interface */
+
typedef int fp_except;
typedef int fp_except_t;
Modified: head/sys/powerpc/include/ieeefp.h
==============================================================================
--- head/sys/powerpc/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606)
+++ head/sys/powerpc/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607)
@@ -8,6 +8,8 @@
#ifndef _MACHINE_IEEEFP_H_
#define _MACHINE_IEEEFP_H_
+/* Deprecated historical FPU control interface */
+
typedef int fp_except_t;
#define FP_X_IMP 0x01 /* imprecise (loss of precision) */
#define FP_X_DZ 0x02 /* divide-by-zero exception */
@@ -22,4 +24,12 @@ typedef enum {
FP_RM=3 /* round toward negative infinity */
} fp_rnd_t;
+__BEGIN_DECLS
+extern fp_rnd_t fpgetround(void);
+extern fp_rnd_t fpsetround(fp_rnd_t);
+extern fp_except_t fpgetmask(void);
+extern fp_except_t fpsetmask(fp_except_t);
+extern fp_except_t fpgetsticky(void);
+__END_DECLS
+
#endif /* _MACHINE_IEEEFP_H_ */
Modified: head/sys/sparc64/include/ieeefp.h
==============================================================================
--- head/sys/sparc64/include/ieeefp.h Fri Oct 21 06:40:36 2011 (r226606)
+++ head/sys/sparc64/include/ieeefp.h Fri Oct 21 06:41:46 2011 (r226607)
@@ -7,6 +7,8 @@
#ifndef _MACHINE_IEEEFP_H_
#define _MACHINE_IEEEFP_H_
+/* Deprecated FPU control interface */
+
#include <machine/fsr.h>
typedef int fp_except_t;
@@ -23,4 +25,13 @@ typedef enum {
FP_RM = FSR_RD_NINF /* round toward negative infinity */
} fp_rnd_t;
+__BEGIN_DECLS
+extern fp_rnd_t fpgetround(void);
+extern fp_rnd_t fpsetround(fp_rnd_t);
+extern fp_except_t fpgetmask(void);
+extern fp_except_t fpsetmask(fp_except_t);
+extern fp_except_t fpgetsticky(void);
+__END_DECLS
+
+
#endif /* _MACHINE_IEEEFP_H_ */
More information about the svn-src-all
mailing list