summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/ieeefp.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2008-01-09 10:42:47 +0000
committerbde <bde@FreeBSD.org>2008-01-09 10:42:47 +0000
commitb52cfc10cb3db71f292b38c8ae859dc6a17c9385 (patch)
tree351cc25b503b6f5eddb7f1bf94d2a4e2f6137ce8 /sys/amd64/include/ieeefp.h
parentafa00fb3e4382898d0d2e3964a2180cd3a37eda9 (diff)
downloadFreeBSD-src-b52cfc10cb3db71f292b38c8ae859dc6a17c9385.zip
FreeBSD-src-b52cfc10cb3db71f292b38c8ae859dc6a17c9385.tar.gz
Improve some comments.
Diffstat (limited to 'sys/amd64/include/ieeefp.h')
-rw-r--r--sys/amd64/include/ieeefp.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/sys/amd64/include/ieeefp.h b/sys/amd64/include/ieeefp.h
index 196f79f..4fbbd09 100644
--- a/sys/amd64/include/ieeefp.h
+++ b/sys/amd64/include/ieeefp.h
@@ -35,13 +35,13 @@
* $FreeBSD$
*/
-/*
- * IEEE floating point type and constant definitions.
- */
-
#ifndef _MACHINE_IEEEFP_H_
#define _MACHINE_IEEEFP_H_
+/*
+ * IEEE floating point type, constant and function definitions.
+ */
+
#ifndef _SYS_CDEFS_H_
#error this file needs sys/cdefs.h as a prerequisite
#endif
@@ -143,7 +143,6 @@ typedef enum {
* merge the two together. I think.
*/
-/* Set rounding control */
static __inline__ fp_rnd_t
__fpgetround(void)
{
@@ -173,9 +172,10 @@ __fpsetround(fp_rnd_t _m)
}
/*
- * Set precision for fadd/fsub/fsqrt etc x87 instructions
+ * Get or set the rounding precision for x87 arithmetic operations.
* There is no equivalent SSE mode or control.
*/
+
static __inline__ fp_prec_t
__fpgetprec(void)
{
@@ -200,11 +200,11 @@ __fpsetprec(fp_rnd_t _m)
}
/*
- * Look at the exception masks
- * Note that x87 masks are inverse of the fp*() functions
- * API. ie: mask = 1 means disable for x87 and SSE, but
- * for the fp*() api, mask = 1 means enabled.
+ * Get or set the exception mask.
+ * Note that the x87 mask bits are inverted by the API -- a mask bit of 1
+ * means disable for x87 and SSE, but for fp*mask() it means enable.
*/
+
static __inline__ fp_except_t
__fpgetmask(void)
{
@@ -234,7 +234,6 @@ __fpsetmask(fp_except_t _m)
return (_p);
}
-/* See which sticky exceptions are pending, and reset them */
static __inline__ fp_except_t
__fpgetsticky(void)
{
@@ -265,10 +264,10 @@ __fpgetsticky(void)
/* Suppress prototypes in the MI header. */
#define _IEEEFP_INLINED_ 1
-#else /* !__IEEEFP_NOINLINES__ && !__cplusplus && __GNUCLIKE_ASM
- && __CC_SUPPORTS___INLINE__ */
+#else /* !(!__IEEEFP_NOINLINES__ && !__cplusplus && __GNUCLIKE_ASM
+ && __CC_SUPPORTS___INLINE__) */
-/* Augment the userland declarations */
+/* Augment the userland declarations. */
__BEGIN_DECLS
extern fp_prec_t fpgetprec(void);
extern fp_prec_t fpsetprec(fp_prec_t);
OpenPOWER on IntegriCloud