summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>1998-04-27 14:17:30 +0000
committerdes <des@FreeBSD.org>1998-04-27 14:17:30 +0000
commit1278274147545de017ceeec4a6397c31eda5fe16 (patch)
tree5f152332f9d78968433289b3b3b3a26cd6ae18fb /sys/i386
parent1e8b395cf1615195ef035dd1b2c59e5f565345da (diff)
downloadFreeBSD-src-1278274147545de017ceeec4a6397c31eda5fe16.zip
FreeBSD-src-1278274147545de017ceeec4a6397c31eda5fe16.tar.gz
Cast return values to the appropriate fp_*_t. Note that the man page
incorrectly refers to them as e.g. fp_except rather than fp_except_t. PR: misc/6310 Submitted by: Niall Smart
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/include/floatingpoint.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/i386/include/floatingpoint.h b/sys/i386/include/floatingpoint.h
index b6adce5..cd2561f 100644
--- a/sys/i386/include/floatingpoint.h
+++ b/sys/i386/include/floatingpoint.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#) floatingpoint.h 1.0 (Berkeley) 9/23/93
- * $Id$
+ * $Id: floatingpoint.h,v 1.8 1997/02/22 09:34:37 peter Exp $
*/
#ifndef _FLOATINGPOINT_H_
@@ -108,14 +108,14 @@ __fpsetreg(int _m, int _reg, int _fld, int _off)
/*
* SysV/386 FP control interface
*/
-#define fpgetround() ((__fpgetreg(FP_RND_REG) & FP_RND_FLD) >> FP_RND_OFF)
-#define fpsetround(m) __fpsetreg((m), FP_RND_REG, FP_RND_FLD, FP_RND_OFF)
-#define fpgetprec() ((__fpgetreg(FP_PRC_REG) & FP_PRC_FLD) >> FP_PRC_OFF)
-#define fpsetprec(m) __fpsetreg((m), FP_PRC_REG, FP_PRC_FLD, FP_PRC_OFF)
-#define fpgetmask() ((~__fpgetreg(FP_MSKS_REG) & FP_MSKS_FLD) >> FP_MSKS_OFF)
-#define fpsetmask(m) __fpsetreg(~(m), FP_MSKS_REG, FP_MSKS_FLD, FP_MSKS_OFF)
-#define fpgetsticky() ((__fpgetreg(FP_STKY_REG) & FP_STKY_FLD) >> FP_STKY_OFF)
-#define fpresetsticky(m) __fpsetreg(0, FP_STKY_REG, (m), FP_STKY_OFF)
+#define fpgetround() ((fp_rnd_t) ((__fpgetreg(FP_RND_REG) & FP_RND_FLD) >> FP_RND_OFF))
+#define fpsetround(m) ((fp_rnd_t) __fpsetreg((m), FP_RND_REG, FP_RND_FLD, FP_RND_OFF))
+#define fpgetprec() ((fp_prec_t) ((__fpgetreg(FP_PRC_REG) & FP_PRC_FLD) >> FP_PRC_OFF))
+#define fpsetprec(m) ((fp_prec_t) __fpsetreg((m), FP_PRC_REG, FP_PRC_FLD, FP_PRC_OFF))
+#define fpgetmask() ((fp_except_t) ((~__fpgetreg(FP_MSKS_REG) & FP_MSKS_FLD) >> FP_MSKS_OFF))
+#define fpsetmask(m) ((fp_except_t) (__fpsetreg(~(m), FP_MSKS_REG, FP_MSKS_FLD, FP_MSKS_OFF)))
+#define fpgetsticky() ((fp_except_t) ((__fpgetreg(FP_STKY_REG) & FP_STKY_FLD) >> FP_STKY_OFF))
+#define fpresetsticky(m) ((fp_except_t) __fpsetreg(0, FP_STKY_REG, (m), FP_STKY_OFF))
#define fpsetsticky(m) fpresetsticky(m)
#endif /* !_FLOATINGPOINT_H_ */
OpenPOWER on IntegriCloud