Lines Matching refs:xm
103 static unsigned get_rounding(int sn, unsigned xm) in get_rounding() argument
107 if (xm & (SP_MBIT(3) - 1)) { in get_rounding()
112 xm += 0x3 + ((xm >> 3) & 1); in get_rounding()
117 xm += 0x8; in get_rounding()
121 xm += 0x8; in get_rounding()
125 return xm; in get_rounding()
134 ieee754sp ieee754sp_format(int sn, int xe, unsigned xm) in ieee754sp_format() argument
136 assert(xm); /* we don't gen exact zeros (probably should) */ in ieee754sp_format()
138 assert((xm >> (SP_MBITS + 1 + 3)) == 0); /* no execess */ in ieee754sp_format()
139 assert(xm & (SP_HIDDEN_BIT << 3)); in ieee754sp_format()
167 && get_rounding(sn, xm) >> (SP_MBITS + 1 + 3)) in ieee754sp_format()
171 xm = get_rounding(sn, xm); in ieee754sp_format()
172 xm >>= 1; in ieee754sp_format()
174 xm &= ~(SP_MBIT(3) - 1); in ieee754sp_format()
181 assert((xm & (SP_HIDDEN_BIT << 3)) == 0); in ieee754sp_format()
185 if (xm & (SP_MBIT(3) - 1)) { in ieee754sp_format()
187 if ((xm & (SP_HIDDEN_BIT << 3)) == 0) { in ieee754sp_format()
193 xm = get_rounding(sn, xm); in ieee754sp_format()
196 if (xm >> (SP_MBITS + 1 + 3)) { in ieee754sp_format()
198 xm >>= 1; in ieee754sp_format()
203 xm >>= 3; in ieee754sp_format()
205 assert((xm >> (SP_MBITS + 1)) == 0); /* no execess */ in ieee754sp_format()
231 if ((xm & SP_HIDDEN_BIT) == 0) { in ieee754sp_format()
236 return buildsp(sn, SP_EMIN - 1 + SP_EBIAS, xm); in ieee754sp_format()
238 assert((xm >> (SP_MBITS + 1)) == 0); /* no execess */ in ieee754sp_format()
239 assert(xm & SP_HIDDEN_BIT); in ieee754sp_format()
241 return buildsp(sn, xe + SP_EBIAS, xm & ~SP_HIDDEN_BIT); in ieee754sp_format()