From owner-svn-src-all@FreeBSD.ORG Fri Oct 21 06:41:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E59F1065674; Fri, 21 Oct 2011 06:41:47 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2B5DC8FC0A; Fri, 21 Oct 2011 06:41:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9L6fl60010701; Fri, 21 Oct 2011 06:41:47 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9L6fkuC010692; Fri, 21 Oct 2011 06:41:46 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201110210641.p9L6fkuC010692@svn.freebsd.org> From: David Schultz Date: Fri, 21 Oct 2011 06:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 06:41:47 -0000 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 #include -#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 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 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_ */