/linux-2.6.39/arch/mips/math-emu/ |
D | ieee754dp.c | 102 static u64 get_rounding(int sn, u64 xm) in get_rounding() argument 106 if (xm & (DP_MBIT(3) - 1)) { in get_rounding() 111 xm += 0x3 + ((xm >> 3) & 1); in get_rounding() 116 xm += 0x8; in get_rounding() 120 xm += 0x8; in get_rounding() 124 return xm; in get_rounding() 133 ieee754dp ieee754dp_format(int sn, int xe, u64 xm) in ieee754dp_format() argument 135 assert(xm); /* we don't gen exact zeros (probably should) */ in ieee754dp_format() 137 assert((xm >> (DP_MBITS + 1 + 3)) == 0); /* no execess */ in ieee754dp_format() 138 assert(xm & (DP_HIDDEN_BIT << 3)); in ieee754dp_format() [all …]
|
D | ieee754sp.c | 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() [all …]
|
D | sp_tlong.c | 52 if (xe == 63 && xs && xm == SP_HIDDEN_BIT) in ieee754sp_tlong() 61 xm <<= xe - SP_MBITS; in ieee754sp_tlong() 69 residue = xm; in ieee754sp_tlong() 72 xm = 0; in ieee754sp_tlong() 74 residue = xm << (32 - SP_MBITS + xe); in ieee754sp_tlong() 77 xm >>= SP_MBITS - xe; in ieee754sp_tlong() 79 odd = (xm & 0x1) != 0x0; in ieee754sp_tlong() 83 xm++; in ieee754sp_tlong() 89 xm++; in ieee754sp_tlong() 93 xm++; in ieee754sp_tlong() [all …]
|
D | dp_tint.c | 59 xm <<= xe - DP_MBITS; in ieee754dp_tint() 67 residue = xm; in ieee754dp_tint() 70 xm = 0; in ieee754dp_tint() 72 residue = xm << (64 - DP_MBITS + xe); in ieee754dp_tint() 75 xm >>= DP_MBITS - xe; in ieee754dp_tint() 79 odd = (xm & 0x1) != 0x0; in ieee754dp_tint() 83 xm++; in ieee754dp_tint() 89 xm++; in ieee754dp_tint() 93 xm++; in ieee754dp_tint() 97 if ((xm >> 31) != 0 && (xs == 0 || xm != 0x80000000)) { in ieee754dp_tint() [all …]
|
D | sp_tint.c | 53 if (xe == 31 && xs && xm == SP_HIDDEN_BIT) in ieee754sp_tint() 62 xm <<= xe - SP_MBITS; in ieee754sp_tint() 70 residue = xm; in ieee754sp_tint() 73 xm = 0; in ieee754sp_tint() 78 residue = xm << (xe + 1); in ieee754sp_tint() 82 xm >>= SP_MBITS - xe; in ieee754sp_tint() 84 odd = (xm & 0x1) != 0x0; in ieee754sp_tint() 88 xm++; in ieee754sp_tint() 94 xm++; in ieee754sp_tint() 98 xm++; in ieee754sp_tint() [all …]
|
D | dp_tlong.c | 52 if (xe == 63 && xs && xm == DP_HIDDEN_BIT) in ieee754dp_tlong() 61 xm <<= xe - DP_MBITS; in ieee754dp_tlong() 69 residue = xm; in ieee754dp_tlong() 72 xm = 0; in ieee754dp_tlong() 77 residue = xm << (xe + 1); in ieee754dp_tlong() 81 xm >>= DP_MBITS - xe; in ieee754dp_tlong() 83 odd = (xm & 0x1) != 0x0; in ieee754dp_tlong() 87 xm++; in ieee754dp_tlong() 93 xm++; in ieee754dp_tlong() 97 xm++; in ieee754dp_tlong() [all …]
|
D | dp_sub.c | 130 assert(xm & DP_HIDDEN_BIT); in ieee754dp_sub() 135 xm <<= 3; in ieee754dp_sub() 148 xm = XDPSRS(xm, s); in ieee754dp_sub() 157 xm = xm + ym; in ieee754dp_sub() 161 if (xm >> (DP_MBITS + 1 + 3)) { /* carry out */ in ieee754dp_sub() 162 xm = XDPSRS1(xm); /* shift preserving sticky */ in ieee754dp_sub() 166 if (xm >= ym) { in ieee754dp_sub() 167 xm = xm - ym; in ieee754dp_sub() 171 xm = ym - xm; in ieee754dp_sub() 175 if (xm == 0) { in ieee754dp_sub() [all …]
|
D | dp_add.c | 125 assert(xm & DP_HIDDEN_BIT); in ieee754dp_add() 129 xm <<= 3; in ieee754dp_add() 142 xm = XDPSRS(xm, s); in ieee754dp_add() 152 xm = xm + ym; in ieee754dp_add() 156 if (xm >> (DP_MBITS + 1 + 3)) { /* carry out */ in ieee754dp_add() 157 xm = XDPSRS1(xm); in ieee754dp_add() 161 if (xm >= ym) { in ieee754dp_add() 162 xm = xm - ym; in ieee754dp_add() 166 xm = ym - xm; in ieee754dp_add() 170 if (xm == 0) in ieee754dp_add() [all …]
|
D | dp_fint.c | 31 u64 xm; in ieee754dp_fint() local 47 xm = ((unsigned) 1 << 31); /* max neg can't be safely negated */ in ieee754dp_fint() 49 xm = -x; in ieee754dp_fint() 51 xm = x; in ieee754dp_fint() 57 while ((xm >> DP_MBITS) == 0) { in ieee754dp_fint() 58 xm <<= 1; in ieee754dp_fint() 61 return builddp(xs, xe + DP_EBIAS, xm & ~DP_HIDDEN_BIT); in ieee754dp_fint() 65 while ((xm >> (DP_MBITS + 3)) == 0) { in ieee754dp_fint() 66 xm <<= 1; in ieee754dp_fint() 69 DPNORMRET1(xs, xe, xm, "fint", x); in ieee754dp_fint()
|
D | sp_fint.c | 31 unsigned xm; in ieee754sp_fint() local 47 xm = ((unsigned) 1 << 31); /* max neg can't be safely negated */ in ieee754sp_fint() 49 xm = -x; in ieee754sp_fint() 51 xm = x; in ieee754sp_fint() 55 if (xm >> (SP_MBITS + 1 + 3)) { in ieee754sp_fint() 58 while (xm >> (SP_MBITS + 1 + 3)) { in ieee754sp_fint() 64 while ((xm >> (SP_MBITS + 3)) == 0) { in ieee754sp_fint() 65 xm <<= 1; in ieee754sp_fint() 69 SPNORMRET1(xs, xe, xm, "fint", x); in ieee754sp_fint()
|
D | sp_flong.c | 31 u64 xm; /* <--- need 64-bit mantissa temp */ in ieee754sp_flong() local 47 xm = (1ULL << 63); /* max neg can't be safely negated */ in ieee754sp_flong() 49 xm = -x; in ieee754sp_flong() 51 xm = x; in ieee754sp_flong() 55 if (xm >> (SP_MBITS + 1 + 3)) { in ieee754sp_flong() 58 while (xm >> (SP_MBITS + 1 + 3)) { in ieee754sp_flong() 63 while ((xm >> (SP_MBITS + 3)) == 0) { in ieee754sp_flong() 64 xm <<= 1; in ieee754sp_flong() 68 SPNORMRET1(xs, xe, xm, "sp_flong", x); in ieee754sp_flong()
|
D | dp_flong.c | 31 u64 xm; in ieee754dp_flong() local 47 xm = (1ULL << 63); /* max neg can't be safely negated */ in ieee754dp_flong() 49 xm = -x; in ieee754dp_flong() 51 xm = x; in ieee754dp_flong() 56 if (xm >> (DP_MBITS + 1 + 3)) { in ieee754dp_flong() 58 while (xm >> (DP_MBITS + 1 + 3)) { in ieee754dp_flong() 63 while ((xm >> (DP_MBITS + 3)) == 0) { in ieee754dp_flong() 64 xm <<= 1; in ieee754dp_flong() 68 DPNORMRET1(xs, xe, xm, "dp_flong", x); in ieee754dp_flong()
|
D | sp_add.c | 122 assert(xm & SP_HIDDEN_BIT); in ieee754sp_add() 126 xm <<= 3; in ieee754sp_add() 147 xm = xm + ym; in ieee754sp_add() 151 if (xm >> (SP_MBITS + 1 + 3)) { /* carry out */ in ieee754sp_add() 155 if (xm >= ym) { in ieee754sp_add() 156 xm = xm - ym; in ieee754sp_add() 160 xm = ym - xm; in ieee754sp_add() 164 if (xm == 0) in ieee754sp_add() 169 while ((xm >> (SP_MBITS + 3)) == 0) { in ieee754sp_add() 170 xm <<= 1; in ieee754sp_add() [all …]
|
D | sp_sub.c | 127 assert(xm & SP_HIDDEN_BIT); in ieee754sp_sub() 132 xm <<= 3; in ieee754sp_sub() 152 xm = xm + ym; in ieee754sp_sub() 156 if (xm >> (SP_MBITS + 1 + 3)) { /* carry out */ in ieee754sp_sub() 160 if (xm >= ym) { in ieee754sp_sub() 161 xm = xm - ym; in ieee754sp_sub() 165 xm = ym - xm; in ieee754sp_sub() 169 if (xm == 0) { in ieee754sp_sub() 177 while ((xm >> (SP_MBITS + 3)) == 0) { in ieee754sp_sub() 178 xm <<= 1; in ieee754sp_sub() [all …]
|
D | sp_modf.c | 64 ((xm >> (SP_MBITS - xe)) << (SP_MBITS - xe)) & in ieee754sp_modf() 70 xm = (xm << (32 - (SP_MBITS - xe))) >> (32 - (SP_MBITS - xe)); in ieee754sp_modf() 71 if (xm == 0) in ieee754sp_modf() 74 while ((xm >> SP_MBITS) == 0) { in ieee754sp_modf() 75 xm <<= 1; in ieee754sp_modf() 78 return buildsp(xs, xe + SP_EBIAS, xm & ~SP_HIDDEN_BIT); in ieee754sp_modf()
|
D | dp_modf.c | 64 ((xm >> (DP_MBITS - xe)) << (DP_MBITS - xe)) & in ieee754dp_modf() 70 xm = (xm << (64 - (DP_MBITS - xe))) >> (64 - (DP_MBITS - xe)); in ieee754dp_modf() 71 if (xm == 0) in ieee754dp_modf() 74 while ((xm >> DP_MBITS) == 0) { in ieee754dp_modf() 75 xm <<= 1; in ieee754dp_modf() 78 return builddp(xs, xe + DP_EBIAS, xm & ~DP_HIDDEN_BIT); in ieee754dp_modf()
|
D | ieee754sp.h | 35 xm = (rs > (SP_MBITS+3))?1:((xm) >> (rs)) | ((xm) << (32-(rs)) != 0)) 38 (xe++, (xm = (xm >> 1) | (xm & 1))) 50 #define SPDNORMX SPDNORMx(xm, xe)
|
D | dp_fsp.c | 46 ((u64) xm in ieee754dp_fsp() 56 while ((xm >> SP_MBITS) == 0) { in ieee754dp_fsp() 57 xm <<= 1; in ieee754dp_fsp() 69 xm &= ~SP_HIDDEN_BIT; in ieee754dp_fsp() 72 (u64) xm << (DP_MBITS - SP_MBITS)); in ieee754dp_fsp()
|
D | sp_div.c | 118 assert(xm & SP_HIDDEN_BIT); in ieee754sp_div() 122 xm <<= 3; in ieee754sp_div() 133 if (xm >= ym) { in ieee754sp_div() 134 xm -= ym; in ieee754sp_div() 136 if (xm == 0) in ieee754sp_div() 139 xm <<= 1; in ieee754sp_div() 142 if (xm) in ieee754sp_div()
|
D | dp_div.c | 118 assert(xm & DP_HIDDEN_BIT); in ieee754dp_div() 122 xm <<= 3; in ieee754dp_div() 133 if (xm >= ym) { in ieee754dp_div() 134 xm -= ym; in ieee754dp_div() 136 if (xm == 0) in ieee754dp_div() 139 xm <<= 1; in ieee754dp_div() 142 if (xm) in ieee754dp_div()
|
D | ieee754dp.h | 37 (xe++, (xm = (xm >> 1) | (xm & 1))) 45 #define DPDNORMX DPDNORMx(xm, xe)
|
D | ieee754int.h | 73 unsigned xm; int xe; int xs __maybe_unused; int xc 102 #define EXPLODEXSP EXPLODESP(x, xc, xs, xe, xm) 107 u64 xm; int xe; int xs __maybe_unused; int xc 136 #define EXPLODEXDP EXPLODEDP(x, xc, xs, xe, xm) 161 #define FLUSHXDP FLUSHDP(x, xc, xs, xe, xm) 163 #define FLUSHXSP FLUSHSP(x, xc, xs, xe, xm)
|
D | sp_fdp.c | 46 (xm >> (DP_MBITS - SP_MBITS))); in ieee754sp_fdp() 71 rm = (xm >> (DP_MBITS - (SP_MBITS + 3))) | in ieee754sp_fdp() 72 ((xm << (64 - (DP_MBITS - (SP_MBITS + 3)))) != 0); in ieee754sp_fdp()
|
D | sp_mul.c | 108 assert(xm & SP_HIDDEN_BIT); in ieee754sp_mul() 117 xm <<= 32 - (SP_MBITS + 1); in ieee754sp_mul() 123 unsigned short lxm = xm & 0xffff; in ieee754sp_mul() 124 unsigned short hxm = xm >> 16; in ieee754sp_mul()
|
D | dp_mul.c | 108 assert(xm & DP_HIDDEN_BIT); in ieee754dp_mul() 116 xm <<= 64 - (DP_MBITS + 1); in ieee754dp_mul() 126 unsigned lxm = xm; in ieee754dp_mul() 127 unsigned hxm = xm >> 32; in ieee754dp_mul()
|