Lines Matching refs:xm
56 static u64 ieee754dp_get_rounding(int sn, u64 xm) in ieee754dp_get_rounding() argument
60 if (xm & (DP_MBIT(3) - 1)) { in ieee754dp_get_rounding()
65 xm += 0x3 + ((xm >> 3) & 1); in ieee754dp_get_rounding()
70 xm += 0x8; in ieee754dp_get_rounding()
74 xm += 0x8; in ieee754dp_get_rounding()
78 return xm; in ieee754dp_get_rounding()
87 union ieee754dp ieee754dp_format(int sn, int xe, u64 xm) in ieee754dp_format() argument
89 assert(xm); /* we don't gen exact zeros (probably should) */ in ieee754dp_format()
91 assert((xm >> (DP_FBITS + 1 + 3)) == 0); /* no excess */ in ieee754dp_format()
92 assert(xm & (DP_HIDDEN_BIT << 3)); in ieee754dp_format()
120 ieee754dp_get_rounding(sn, xm) >> (DP_FBITS + 1 + 3)) in ieee754dp_format()
124 xm = ieee754dp_get_rounding(sn, xm); in ieee754dp_format()
125 xm >>= 1; in ieee754dp_format()
127 xm &= ~(DP_MBIT(3) - 1); in ieee754dp_format()
133 xm = XDPSRS(xm, es); in ieee754dp_format()
135 assert((xm & (DP_HIDDEN_BIT << 3)) == 0); in ieee754dp_format()
139 if (xm & (DP_MBIT(3) - 1)) { in ieee754dp_format()
141 if ((xm & (DP_HIDDEN_BIT << 3)) == 0) { in ieee754dp_format()
147 xm = ieee754dp_get_rounding(sn, xm); in ieee754dp_format()
150 if (xm >> (DP_FBITS + 3 + 1)) { in ieee754dp_format()
152 xm >>= 1; in ieee754dp_format()
157 xm >>= 3; in ieee754dp_format()
159 assert((xm >> (DP_FBITS + 1)) == 0); /* no excess */ in ieee754dp_format()
185 if ((xm & DP_HIDDEN_BIT) == 0) { in ieee754dp_format()
190 return builddp(sn, DP_EMIN - 1 + DP_EBIAS, xm); in ieee754dp_format()
192 assert((xm >> (DP_FBITS + 1)) == 0); /* no excess */ in ieee754dp_format()
193 assert(xm & DP_HIDDEN_BIT); in ieee754dp_format()
195 return builddp(sn, xe + DP_EBIAS, xm & ~DP_HIDDEN_BIT); in ieee754dp_format()