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:
parent
acb72828ee
commit
dee070ee6e
@ -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) \
|
||||
|
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user