/linux/arch/mips/math-emu/ |
A D | ieee754dp.c | 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() 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() 147 xm = ieee754dp_get_rounding(sn, xm); in ieee754dp_format() 152 xm >>= 1; in ieee754dp_format() [all …]
|
A D | ieee754sp.c | 65 xm += 0x3 + ((xm >> 3) & 1); in ieee754sp_get_rounding() 70 xm += 0x8; in ieee754sp_get_rounding() 74 xm += 0x8; in ieee754sp_get_rounding() 78 return xm; in ieee754sp_get_rounding() 124 xm = ieee754sp_get_rounding(sn, xm); in ieee754sp_format() 125 xm >>= 1; in ieee754sp_format() 127 xm &= ~(SP_MBIT(3) - 1); in ieee754sp_format() 132 xm = XSPSRS(xm, es); in ieee754sp_format() 146 xm = ieee754sp_get_rounding(sn, xm); in ieee754sp_format() 151 xm >>= 1; in ieee754sp_format() [all …]
|
A D | dp_add.c | 107 assert(xm & DP_HIDDEN_BIT); in ieee754dp_add() 113 xm <<= 3; in ieee754dp_add() 128 xm = XDPSRS(xm, s); in ieee754dp_add() 139 xm = xm + ym; in ieee754dp_add() 142 xm = XDPSRS1(xm); in ieee754dp_add() 146 if (xm >= ym) { in ieee754dp_add() 147 xm = xm - ym; in ieee754dp_add() 149 xm = ym - xm; in ieee754dp_add() 152 if (xm == 0) in ieee754dp_add() 159 xm <<= 1; in ieee754dp_add() [all …]
|
A D | dp_sub.c | 114 assert(xm & DP_HIDDEN_BIT); in ieee754dp_sub() 119 xm <<= 3; in ieee754dp_sub() 134 xm = XDPSRS(xm, s); in ieee754dp_sub() 143 xm = xm + ym; in ieee754dp_sub() 146 xm = XDPSRS1(xm); /* shift preserving sticky */ in ieee754dp_sub() 150 if (xm >= ym) { in ieee754dp_sub() 151 xm = xm - ym; in ieee754dp_sub() 153 xm = ym - xm; in ieee754dp_sub() 156 if (xm == 0) { in ieee754dp_sub() 166 xm <<= 1; in ieee754dp_sub() [all …]
|
A D | sp_tlong.c | 54 xm <<= xe - SP_FBITS; in ieee754sp_tlong() 57 residue = xm; in ieee754sp_tlong() 60 xm = 0; in ieee754sp_tlong() 65 xm >>= SP_FBITS - xe; in ieee754sp_tlong() 67 odd = (xm & 0x1) != 0x0; in ieee754sp_tlong() 71 xm++; in ieee754sp_tlong() 77 xm++; in ieee754sp_tlong() 81 xm++; in ieee754sp_tlong() 84 if ((xm >> 63) != 0) { in ieee754sp_tlong() 93 return -xm; in ieee754sp_tlong() [all …]
|
A D | dp_tint.c | 51 xm <<= xe - DP_FBITS; in ieee754dp_tint() 54 residue = xm; in ieee754dp_tint() 57 xm = 0; in ieee754dp_tint() 62 xm >>= DP_FBITS - xe; in ieee754dp_tint() 66 odd = (xm & 0x1) != 0x0; in ieee754dp_tint() 70 xm++; in ieee754dp_tint() 76 xm++; in ieee754dp_tint() 80 xm++; in ieee754dp_tint() 84 if ((xm >> 31) != 0 && (xs == 0 || xm != 0x80000000)) { in ieee754dp_tint() 93 return -xm; in ieee754dp_tint() [all …]
|
A D | dp_tlong.c | 54 xm <<= xe - DP_FBITS; in ieee754dp_tlong() 57 residue = xm; in ieee754dp_tlong() 60 xm = 0; in ieee754dp_tlong() 69 xm >>= DP_FBITS - xe; in ieee754dp_tlong() 71 odd = (xm & 0x1) != 0x0; in ieee754dp_tlong() 75 xm++; in ieee754dp_tlong() 81 xm++; in ieee754dp_tlong() 85 xm++; in ieee754dp_tlong() 88 if ((xm >> 63) != 0) { in ieee754dp_tlong() 97 return -xm; in ieee754dp_tlong() [all …]
|
A D | sp_tint.c | 54 xm <<= xe - SP_FBITS; in ieee754sp_tint() 57 residue = xm; in ieee754sp_tint() 60 xm = 0; in ieee754sp_tint() 69 xm >>= SP_FBITS - xe; in ieee754sp_tint() 71 odd = (xm & 0x1) != 0x0; in ieee754sp_tint() 75 xm++; in ieee754sp_tint() 81 xm++; in ieee754sp_tint() 85 xm++; in ieee754sp_tint() 88 if ((xm >> 31) != 0) { in ieee754sp_tint() 97 return -xm; in ieee754sp_tint() [all …]
|
A D | sp_add.c | 107 assert(xm & SP_HIDDEN_BIT); in ieee754sp_add() 113 xm <<= 3; in ieee754sp_add() 128 xm = XSPSRS(xm, s); in ieee754sp_add() 139 xm = xm + ym; in ieee754sp_add() 145 if (xm >= ym) { in ieee754sp_add() 146 xm = xm - ym; in ieee754sp_add() 148 xm = ym - xm; in ieee754sp_add() 151 if (xm == 0) in ieee754sp_add() 157 while ((xm >> (SP_FBITS + 3)) == 0) { in ieee754sp_add() 158 xm <<= 1; in ieee754sp_add() [all …]
|
A D | sp_sub.c | 112 assert(xm & SP_HIDDEN_BIT); in ieee754sp_sub() 117 xm <<= 3; in ieee754sp_sub() 132 xm = XSPSRS(xm, s); in ieee754sp_sub() 141 xm = xm + ym; in ieee754sp_sub() 147 if (xm >= ym) { in ieee754sp_sub() 148 xm = xm - ym; in ieee754sp_sub() 150 xm = ym - xm; in ieee754sp_sub() 153 if (xm == 0) { in ieee754sp_sub() 161 while ((xm >> (SP_FBITS + 3)) == 0) { in ieee754sp_sub() 162 xm <<= 1; in ieee754sp_sub() [all …]
|
A D | sp_fint.c | 14 unsigned int xm; in ieee754sp_fint() local 30 xm = ((unsigned) 1 << 31); /* max neg can't be safely negated */ in ieee754sp_fint() 32 xm = -x; in ieee754sp_fint() 34 xm = x; in ieee754sp_fint() 38 if (xm >> (SP_FBITS + 1 + 3)) { in ieee754sp_fint() 41 while (xm >> (SP_FBITS + 1 + 3)) { in ieee754sp_fint() 47 while ((xm >> (SP_FBITS + 3)) == 0) { in ieee754sp_fint() 48 xm <<= 1; in ieee754sp_fint() 52 return ieee754sp_format(xs, xe, xm); in ieee754sp_fint()
|
A D | dp_flong.c | 14 u64 xm; in ieee754dp_flong() local 30 xm = (1ULL << 63); /* max neg can't be safely negated */ in ieee754dp_flong() 32 xm = -x; in ieee754dp_flong() 34 xm = x; in ieee754dp_flong() 39 if (xm >> (DP_FBITS + 1 + 3)) { in ieee754dp_flong() 41 while (xm >> (DP_FBITS + 1 + 3)) { in ieee754dp_flong() 46 while ((xm >> (DP_FBITS + 3)) == 0) { in ieee754dp_flong() 47 xm <<= 1; in ieee754dp_flong() 52 return ieee754dp_format(xs, xe, xm); in ieee754dp_flong()
|
A D | sp_flong.c | 14 u64 xm; /* <--- need 64-bit mantissa temp */ in ieee754sp_flong() local 30 xm = (1ULL << 63); /* max neg can't be safely negated */ in ieee754sp_flong() 32 xm = -x; in ieee754sp_flong() 34 xm = x; in ieee754sp_flong() 38 if (xm >> (SP_FBITS + 1 + 3)) { in ieee754sp_flong() 41 while (xm >> (SP_FBITS + 1 + 3)) { in ieee754sp_flong() 46 while ((xm >> (SP_FBITS + 3)) == 0) { in ieee754sp_flong() 47 xm <<= 1; in ieee754sp_flong() 51 return ieee754sp_format(xs, xe, xm); in ieee754sp_flong()
|
A D | dp_rint.c | 41 residue = xm; in ieee754dp_rint() 44 xm = 0; in ieee754dp_rint() 46 residue = xm << (64 - DP_FBITS + xe); in ieee754dp_rint() 49 xm >>= DP_FBITS - xe; in ieee754dp_rint() 52 odd = (xm & 0x1) != 0x0; in ieee754dp_rint() 57 xm++; in ieee754dp_rint() 63 xm++; in ieee754dp_rint() 67 xm++; in ieee754dp_rint() 74 ret = ieee754dp_flong(xm); in ieee754dp_rint()
|
A D | sp_rint.c | 41 residue = xm; in ieee754sp_rint() 44 xm = 0; in ieee754sp_rint() 46 residue = xm << (xe + 1); in ieee754sp_rint() 50 xm >>= SP_FBITS - xe; in ieee754sp_rint() 53 odd = (xm & 0x1) != 0x0; in ieee754sp_rint() 58 xm++; in ieee754sp_rint() 64 xm++; in ieee754sp_rint() 68 xm++; in ieee754sp_rint() 75 ret = ieee754sp_flong(xm); in ieee754sp_rint()
|
A D | dp_fsp.c | 13 static inline union ieee754dp ieee754dp_nan_fsp(int xs, u64 xm) in ieee754dp_nan_fsp() argument 16 xm << (DP_FBITS - SP_FBITS)); in ieee754dp_nan_fsp() 31 return ieee754dp_nanxcpt(ieee754dp_nan_fsp(xs, xm)); in ieee754dp_fsp() 34 return ieee754dp_nan_fsp(xs, xm); in ieee754dp_fsp() 44 while ((xm >> SP_FBITS) == 0) { in ieee754dp_fsp() 45 xm <<= 1; in ieee754dp_fsp() 59 xm &= ~SP_HIDDEN_BIT; in ieee754dp_fsp() 62 (u64) xm << (DP_FBITS - SP_FBITS)); in ieee754dp_fsp()
|
A D | dp_fint.c | 14 u64 xm; in ieee754dp_fint() local 30 xm = ((unsigned) 1 << 31); /* max neg can't be safely negated */ in ieee754dp_fint() 32 xm = -x; in ieee754dp_fint() 34 xm = x; in ieee754dp_fint() 39 while ((xm >> DP_FBITS) == 0) { in ieee754dp_fint() 40 xm <<= 1; in ieee754dp_fint() 43 return builddp(xs, xe + DP_EBIAS, xm & ~DP_HIDDEN_BIT); in ieee754dp_fint()
|
A D | dp_div.c | 106 assert(xm & DP_HIDDEN_BIT); in ieee754dp_div() 110 xm <<= 3; in ieee754dp_div() 119 if (xm >= ym) { in ieee754dp_div() 120 xm -= ym; in ieee754dp_div() 122 if (xm == 0) in ieee754dp_div() 125 xm <<= 1; in ieee754dp_div() 129 if (xm) in ieee754dp_div()
|
A D | sp_div.c | 106 assert(xm & SP_HIDDEN_BIT); in ieee754sp_div() 110 xm <<= 3; in ieee754sp_div() 119 if (xm >= ym) { in ieee754sp_div() 120 xm -= ym; in ieee754sp_div() 122 if (xm == 0) in ieee754sp_div() 125 xm <<= 1; in ieee754sp_div() 129 if (xm) in ieee754sp_div()
|
A D | sp_fdp.c | 13 static inline union ieee754sp ieee754sp_nan_fdp(int xs, u64 xm) in ieee754sp_nan_fdp() argument 16 xm >> (DP_FBITS - SP_FBITS)); in ieee754sp_nan_fdp() 39 y = ieee754sp_nan_fdp(xs, xm); in ieee754sp_fdp() 69 rm = (xm >> (DP_FBITS - (SP_FBITS + 3))) | in ieee754sp_fdp() 70 ((xm << (64 - (DP_FBITS - (SP_FBITS + 3)))) != 0); in ieee754sp_fdp()
|
A D | ieee754int.h | 46 unsigned int xm; int xe; int xs __maybe_unused; int xc 78 #define EXPLODEXSP EXPLODESP(x, xc, xs, xe, xm) 84 u64 xm; int xe; int xs __maybe_unused; int xc 116 #define EXPLODEXDP EXPLODEDP(x, xc, xs, xe, xm) 142 #define FLUSHXDP FLUSHDP(x, xc, xs, xe, xm) 145 #define FLUSHXSP FLUSHSP(x, xc, xs, xe, xm)
|
A D | dp_fmax.c | 107 assert(xm & DP_HIDDEN_BIT); in ieee754dp_fmax() 134 if (xm <= ym) in ieee754dp_fmax() 139 if (xm <= ym) in ieee754dp_fmax() 235 assert(xm & DP_HIDDEN_BIT); in ieee754dp_fmaxa() 245 if (xm < ym) in ieee754dp_fmaxa() 247 else if (xm > ym) in ieee754dp_fmaxa()
|
A D | dp_fmin.c | 107 assert(xm & DP_HIDDEN_BIT); in ieee754dp_fmin() 134 if (xm <= ym) in ieee754dp_fmin() 139 if (xm <= ym) in ieee754dp_fmin() 235 assert(xm & DP_HIDDEN_BIT); in ieee754dp_fmina() 245 if (xm < ym) in ieee754dp_fmina() 247 else if (xm > ym) in ieee754dp_fmina()
|
A D | sp_fmax.c | 107 assert(xm & SP_HIDDEN_BIT); in ieee754sp_fmax() 134 if (xm <= ym) in ieee754sp_fmax() 139 if (xm <= ym) in ieee754sp_fmax() 235 assert(xm & SP_HIDDEN_BIT); in ieee754sp_fmaxa() 245 if (xm < ym) in ieee754sp_fmaxa() 247 else if (xm > ym) in ieee754sp_fmaxa()
|
A D | sp_fmin.c | 107 assert(xm & SP_HIDDEN_BIT); in ieee754sp_fmin() 134 if (xm <= ym) in ieee754sp_fmin() 139 if (xm <= ym) in ieee754sp_fmin() 235 assert(xm & SP_HIDDEN_BIT); in ieee754sp_fmina() 245 if (xm < ym) in ieee754sp_fmina() 247 else if (xm > ym) in ieee754sp_fmina()
|