Fixed the return value of fpsetmask(). The API requires inversion of the

mask on both input and output to fpsetmask(), but this was only done for
input, so fpsetmask() returned the complement of the old mask (ANDed with
the mask bitfield).

PR:		38170
MFC after:	4 weeks
This commit is contained in:
bde 2002-06-01 17:39:46 +00:00
parent acb72828ee
commit dee070ee6e
2 changed files with 4 additions and 2 deletions

View File

@ -119,7 +119,8 @@ __fpsetreg(int _m, int _reg, int _fld, int _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)))
(~__fpsetreg(~(m), FP_MSKS_REG, FP_MSKS_FLD, FP_MSKS_OFF)) & \
(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) \

View File

@ -119,7 +119,8 @@ __fpsetreg(int _m, int _reg, int _fld, int _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)))
(~__fpsetreg(~(m), FP_MSKS_REG, FP_MSKS_FLD, FP_MSKS_OFF)) & \
(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) \