Home
last modified time | relevance | path

Searched refs:xm (Results 1 – 25 of 36) sorted by relevance

12

/linux-2.6.39/arch/mips/math-emu/
Dieee754dp.c102 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 …]
Dieee754sp.c103 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 …]
Dsp_tlong.c52 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 …]
Ddp_tint.c59 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 …]
Dsp_tint.c53 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 …]
Ddp_tlong.c52 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 …]
Ddp_sub.c130 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 …]
Ddp_add.c125 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 …]
Ddp_fint.c31 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()
Dsp_fint.c31 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()
Dsp_flong.c31 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()
Ddp_flong.c31 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()
Dsp_add.c122 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 …]
Dsp_sub.c127 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 …]
Dsp_modf.c64 ((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()
Ddp_modf.c64 ((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()
Dieee754sp.h35 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)
Ddp_fsp.c46 ((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()
Dsp_div.c118 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()
Ddp_div.c118 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()
Dieee754dp.h37 (xe++, (xm = (xm >> 1) | (xm & 1)))
45 #define DPDNORMX DPDNORMx(xm, xe)
Dieee754int.h73 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)
Dsp_fdp.c46 (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()
Dsp_mul.c108 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()
Ddp_mul.c108 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()

12