SP_FBITS
xm << (DP_FBITS - SP_FBITS));
while ((xm >> SP_FBITS) == 0) {
(u64) xm << (DP_FBITS - SP_FBITS));
for (i = SP_FBITS - 1; i >= 0; i--)
for (i = SP_FBITS - 1; i >= 0; i--)
for (i = SP_FBITS - 1; i >= 0; i--)
else if (ieee754_csr.nan2008 ^ !(vm & SP_MBIT(SP_FBITS - 1))) \
ieee754sp_get_rounding(sn, xm) >> (SP_FBITS + 1 + 3))
if (xm >> (SP_FBITS + 1 + 3)) {
assert((xm >> (SP_FBITS + 1)) == 0); /* no excess */
assert((xm >> (SP_FBITS + 1)) == 0); /* no excess */
qbit = (SPMANT(x) & SP_MBIT(SP_FBITS - 1)) == SP_MBIT(SP_FBITS - 1);
SPMANT(r) |= SP_MBIT(SP_FBITS - 1);
SPMANT(r) &= ~SP_MBIT(SP_FBITS - 1);
SPMANT(r) |= SP_MBIT(SP_FBITS - 2);
assert((xm >> (SP_FBITS + 1 + 3)) == 0); /* no excess */
#define SP_HIDDEN_BIT SP_MBIT(SP_FBITS)
((rs > (SP_FBITS+3))?1:((v) >> (rs)) | ((v) << (32-(rs)) != 0))
while ((m >> SP_FBITS) == 0) { m <<= 1; e--; }
assert(((m) >> SP_FBITS) == 0);
if (xm >> (SP_FBITS + 1 + 3)) { /* carry out */
while ((xm >> (SP_FBITS + 3)) == 0) {
for (bm = SP_MBIT(SP_FBITS + 2); bm; bm >>= 1) {
while ((rm >> (SP_FBITS + 3)) == 0) {
xm >> (DP_FBITS - SP_FBITS));
rm = (xm >> (DP_FBITS - (SP_FBITS + 3))) |
((xm << (64 - (DP_FBITS - (SP_FBITS + 3)))) != 0);
xe = SP_FBITS + 3;
if (xm >> (SP_FBITS + 1 + 3)) {
while (xm >> (SP_FBITS + 1 + 3)) {
while ((xm >> (SP_FBITS + 3)) == 0) {
xe = SP_FBITS + 3;
if (xm >> (SP_FBITS + 1 + 3)) {
while (xm >> (SP_FBITS + 1 + 3)) {
while ((xm >> (SP_FBITS + 3)) == 0) {
xm <<= 32 - (SP_FBITS + 1);
ym <<= 32 - (SP_FBITS + 1);
rm = (rm >> (32 - (SP_FBITS + 1 + 3))) |
((rm << (SP_FBITS + 1 + 3)) != 0);
rm = (rm >> (32 - (SP_FBITS + 1 + 3 + 1))) |
((rm << (SP_FBITS + 1 + 3 + 1)) != 0);
if (xe >= SP_FBITS)
residue <<= 31 - SP_FBITS;
xm >>= SP_FBITS - xe;
if (xm >> (SP_FBITS + 1 + 3)) { /* carry out */
while ((xm >> (SP_FBITS + 3)) == 0) {
if (xe > SP_FBITS) {
xm <<= xe - SP_FBITS;
residue <<= 31 - SP_FBITS;
xm >>= SP_FBITS - xe;
if (xe > SP_FBITS) {
xm <<= xe - SP_FBITS;
} else if (xe < SP_FBITS) {
residue = xm << (32 - SP_FBITS + xe);
xm >>= SP_FBITS - xe;