Lines Matching +full:0 +full:x800000

25 	0x800000,
26 0x8b95c2,
27 0x9837f0,
28 0xa5fed7,
29 0xb504f3,
30 0xc5672a,
31 0xd744fd,
32 0xeac0c7
45 exp = ((s >> 23) & 0xff) - 127; in eexp2()
48 if (exp == 128 && (s & 0x7fffff) != 0) in eexp2()
49 return s | 0x400000; /* return QNaN */ in eexp2()
50 /* 2^-big = 0, 2^+big = +Inf */ in eexp2()
51 return (s & 0x80000000)? 0: 0x7f800000; /* 0 or +Inf */ in eexp2()
54 return 0x3f800000; /* 1.0 */ in eexp2()
57 pwr = (s & 0x7fffff) | 0x800000; in eexp2()
58 if (exp > 0) in eexp2()
62 if (s & 0x80000000) in eexp2()
68 return 0x7f800000; in eexp2()
70 return 0; in eexp2()
76 asm("mulhwu %0,%1,%2" : "=r" (frac) in eexp2()
77 : "r" (pwr << 12), "r" (0x172b83ff)); in eexp2()
78 asm("mulhwu %0,%1,%2" : "=r" (frac) : "r" (frac), "r" (mant)); in eexp2()
81 if (exp >= 0) in eexp2()
98 exp = s & 0x7f800000; in elog2()
99 mant = s & 0x7fffff; in elog2()
100 if (exp == 0x7f800000) { /* Inf or NaN */ in elog2()
101 if (mant != 0) in elog2()
102 s |= 0x400000; /* turn NaN into QNaN */ in elog2()
105 if ((exp | mant) == 0) /* +0 or -0 */ in elog2()
106 return 0xff800000; /* return -Inf */ in elog2()
108 if (exp == 0) { in elog2()
110 asm("cntlzw %0,%1" : "=r" (lz) : "r" (mant)); in elog2()
114 mant |= 0x800000; in elog2()
118 if (mant >= 0xb504f3) { /* 2^0.5 * 2^23 */ in elog2()
119 exp |= 0x400000; /* 0.5 * 2^23 */ in elog2()
120 asm("mulhwu %0,%1,%2" : "=r" (mant) in elog2()
121 : "r" (mant), "r" (0xb504f334)); /* 2^-0.5 * 2^32 */ in elog2()
123 if (mant >= 0x9837f0) { /* 2^0.25 * 2^23 */ in elog2()
124 exp |= 0x200000; /* 0.25 * 2^23 */ in elog2()
125 asm("mulhwu %0,%1,%2" : "=r" (mant) in elog2()
126 : "r" (mant), "r" (0xd744fccb)); /* 2^-0.25 * 2^32 */ in elog2()
128 if (mant >= 0x8b95c2) { /* 2^0.125 * 2^23 */ in elog2()
129 exp |= 0x100000; /* 0.125 * 2^23 */ in elog2()
130 asm("mulhwu %0,%1,%2" : "=r" (mant) in elog2()
131 : "r" (mant), "r" (0xeac0c6e8)); /* 2^-0.125 * 2^32 */ in elog2()
133 if (mant > 0x800000) { /* 1.0 * 2^23 */ in elog2()
136 asm("mulhwu %0,%1,%2" : "=r" (frac) in elog2()
137 : "r" ((mant - 0x800000) << 1), "r" (0xb0c7cd3a)); in elog2()
140 s = exp & 0x80000000; in elog2()
141 if (exp != 0) { in elog2()
144 asm("cntlzw %0,%1" : "=r" (lz) : "r" (exp)); in elog2()
146 if (lz > 0) in elog2()
148 else if (lz < 0) in elog2()
161 exp = (x >> 23) & 0xff; in ctsxs()
162 mant = x & 0x7fffff; in ctsxs()
163 if (exp == 255 && mant != 0) in ctsxs()
164 return 0; /* NaN -> 0 */ in ctsxs()
166 if (exp < 0) in ctsxs()
167 return 0; /* round towards zero */ in ctsxs()
170 if (x + (scale << 23) != 0xcf000000) in ctsxs()
172 return (x & 0x80000000)? 0x80000000: 0x7fffffff; in ctsxs()
174 mant |= 0x800000; in ctsxs()
176 return (x & 0x80000000)? -mant: mant; in ctsxs()
184 exp = (x >> 23) & 0xff; in ctuxs()
185 mant = x & 0x7fffff; in ctuxs()
186 if (exp == 255 && mant != 0) in ctuxs()
187 return 0; /* NaN -> 0 */ in ctuxs()
189 if (exp < 0) in ctuxs()
190 return 0; /* round towards zero */ in ctuxs()
191 if (x & 0x80000000) { in ctuxs()
192 /* negative => saturate to 0 */ in ctuxs()
194 return 0; in ctuxs()
199 return 0xffffffff; in ctuxs()
201 mant |= 0x800000; in ctuxs()
206 /* Round to floating integer, towards 0 */
211 exp = ((x >> 23) & 0xff) - 127; in rfiz()
212 if (exp == 128 && (x & 0x7fffff) != 0) in rfiz()
213 return x | 0x400000; /* NaN -> make it a QNaN */ in rfiz()
216 if (exp < 0) in rfiz()
217 return x & 0x80000000; /* |x| < 1.0 rounds to 0 */ in rfiz()
218 return x & ~(0x7fffff >> exp); in rfiz()
226 exp = ((x >> 23) & 0xff) - 127; in rfii()
227 if (exp == 128 && (x & 0x7fffff) != 0) in rfii()
228 return x | 0x400000; /* NaN -> make it a QNaN */ in rfii()
231 if ((x & 0x7fffffff) == 0) in rfii()
232 return x; /* +/-0 -> +/-0 */ in rfii()
233 if (exp < 0) in rfii()
234 /* 0 < |x| < 1.0 rounds to +/- 1.0 */ in rfii()
235 return (x & 0x80000000) | 0x3f800000; in rfii()
236 mask = 0x7fffff >> exp; in rfii()
247 exp = ((x >> 23) & 0xff) - 127; in rfin()
248 if (exp == 128 && (x & 0x7fffff) != 0) in rfin()
249 return x | 0x400000; /* NaN -> make it a QNaN */ in rfin()
253 return x & 0x80000000; /* |x| < 0.5 -> +/-0 */ in rfin()
256 return (x & 0x80000000) | 0x3f800000; in rfin()
257 half = 0x400000 >> exp; in rfin()
259 return (x + half) & ~(0x7fffff >> exp); in rfin()
275 vd = (word >> 21) & 0x1f; in emulate_altivec()
276 va = (word >> 16) & 0x1f; in emulate_altivec()
277 vb = (word >> 11) & 0x1f; in emulate_altivec()
278 vc = (word >> 6) & 0x1f; in emulate_altivec()
281 switch (word & 0x3f) { in emulate_altivec()
284 case 0: /* vaddfp */ in emulate_altivec()
297 for (i = 0; i < 4; ++i) in emulate_altivec()
301 for (i = 0; i < 4; ++i) in emulate_altivec()
305 for (i = 0; i < 4; ++i) in emulate_altivec()
309 for (i = 0; i < 4; ++i) in emulate_altivec()
313 for (i = 0; i < 4; ++i) { in emulate_altivec()
315 x = (x & 0x80000000)? rfiz(x): rfii(x); in emulate_altivec()
320 for (i = 0; i < 4; ++i) { in emulate_altivec()
322 x = (x & 0x80000000)? rfii(x): rfiz(x); in emulate_altivec()
327 for (i = 0; i < 4; ++i) in emulate_altivec()
332 for (i = 0; i < 4; ++i) in emulate_altivec()
350 return 0; in emulate_altivec()