Lines Matching refs:pu

67 	unpacked	*pu)		/* unpacked result */  in round()  argument
72 sr = pu->sticky|pu->rounded; in round()
79 increment = pu->rounded; in round()
85 increment = (pu->sign == 0) & (sr != 0); in round()
88 increment = (pu->sign != 0) & (sr != 0); in round()
92 pu->significand[3]++; in round()
93 if (pu->significand[3] == 0) { in round()
94 pu->significand[2]++; in round()
95 if (pu->significand[2] == 0) { in round()
96 pu->significand[1]++; in round()
97 if (pu->significand[1] == 0) { in round()
98 pu->significand[0]++; /* rounding carried out */ in round()
99 if (pu->significand[0] == 0x20000) { in round()
100 pu->exponent++; in round()
101 pu->significand[0] = 0x10000; in round()
108 (pu->sticky == 0) && increment != 0) { /* ambiguous case */ in round()
109 pu->significand[3] &= 0xfffffffe; /* force round to even */ in round()
116 unpacked *pu, /* unpacked result */ in packint32() argument
119 switch (pu->fpclass) { in packint32()
124 if (pu->exponent >= 32) in packint32()
126 fpu_rightshift(pu, 112 - pu->exponent); in packint32()
127 round(pfpsd, pu); in packint32()
128 if (pu->significand[3] >= 0x80000000) in packint32()
129 if ((pu->sign == 0)||(pu->significand[3] > 0x80000000)) in packint32()
131 *px = pu->significand[3]; in packint32()
132 if (pu->sign) in packint32()
139 if (pu->sign) in packint32()
152 unpacked *pu, /* unpacked result */ in packint64() argument
160 switch (pu->fpclass) { in packint64()
165 if (pu->exponent >= 64) in packint64()
167 fpu_rightshift(pu, 112 - pu->exponent); in packint64()
168 round(pfpsd, pu); in packint64()
169 if (pu->significand[2] >= 0x80000000) in packint64()
170 if ((pu->sign == 0) || in packint64()
171 (pu->significand[2] > 0x80000000) || in packint64()
172 (((pu->significand[2] == 0x80000000) && in packint64()
173 (pu->significand[3] > 0)))) in packint64()
175 x.i[0] = pu->significand[2]; in packint64()
176 x.i[1] = pu->significand[3]; in packint64()
178 if (pu->sign) in packint64()
185 if (pu->sign) in packint64()
198 unpacked *pu, /* unpacked result */ in packsingle() argument
201 px->sign = pu->sign; in packsingle()
202 switch (pu->fpclass) { in packsingle()
214 fpu_rightshift(pu, 113-24); in packsingle()
216 px->significand = 0x400000|(0x3fffff&pu->significand[3]); in packsingle()
219 fpu_rightshift(pu, 113-24); in packsingle()
220 pu->exponent += SINGLE_BIAS; in packsingle()
221 if (pu->exponent <= 0) { in packsingle()
223 fpu_rightshift(pu, 1 - pu->exponent); in packsingle()
224 round(pfpsd, pu); in packsingle()
225 if (pu->significand[3] == 0x800000) { in packsingle()
235 px->significand = 0x7fffff & pu->significand[3]; in packsingle()
246 round(pfpsd, pu); in packsingle()
247 if (pu->significand[3] == 0x1000000) { /* rounding overflow */ in packsingle()
248 pu->significand[3] = 0x800000; in packsingle()
249 pu->exponent += 1; in packsingle()
251 if (pu->exponent >= 0xff) { in packsingle()
258 if (overflow_to_infinity(pfpsd, pu->sign)) in packsingle()
264 px->exponent = pu->exponent; in packsingle()
265 px->significand = 0x7fffff & pu->significand[3]; in packsingle()
272 unpacked *pu, /* unpacked result */ in packdouble() argument
276 px->sign = pu->sign; in packdouble()
277 switch (pu->fpclass) { in packdouble()
291 fpu_rightshift(pu, 113-53); in packdouble()
293 px->significand = 0x80000 | (0x7ffff & pu->significand[2]); in packdouble()
294 *py = pu->significand[3]; in packdouble()
297 fpu_rightshift(pu, 113-53); in packdouble()
298 pu->exponent += DOUBLE_BIAS; in packdouble()
299 if (pu->exponent <= 0) { /* underflow */ in packdouble()
301 fpu_rightshift(pu, 1 - pu->exponent); in packdouble()
302 round(pfpsd, pu); in packdouble()
303 if (pu->significand[2] == 0x100000) { in packdouble()
315 px->significand = 0xfffff & pu->significand[2]; in packdouble()
316 *py = pu->significand[3]; in packdouble()
327 round(pfpsd, pu); in packdouble()
328 if (pu->significand[2] == 0x200000) { /* rounding overflow */ in packdouble()
329 pu->significand[2] = 0x100000; in packdouble()
330 pu->exponent += 1; in packdouble()
332 if (pu->exponent >= 0x7ff) { /* overflow */ in packdouble()
339 if (overflow_to_infinity(pfpsd, pu->sign)) in packdouble()
346 px->exponent = pu->exponent; in packdouble()
347 px->significand = 0xfffff & pu->significand[2]; in packdouble()
348 *py = pu->significand[3]; in packdouble()
356 unpacked *pu, /* unpacked result */ in packextended() argument
362 px->sign = pu->sign; in packextended()
363 switch (pu->fpclass) { in packextended()
382 px->significand = 0x8000 | pu->significand[0]; in packextended()
387 *py = pu->significand[1]; in packextended()
388 *pz = pu->significand[2]; in packextended()
389 *pw = pu->significand[3]; in packextended()
392 pu->exponent += EXTENDED_BIAS; in packextended()
393 if (pu->exponent <= 0) { /* underflow */ in packextended()
394 fpu_rightshift(pu, 1-pu->exponent); in packextended()
395 round(pfpsd, pu); in packextended()
396 if (pu->significand[0] < 0x00010000) { in packextended()
414 px->significand = pu->significand[0]; in packextended()
415 *py = pu->significand[1]; in packextended()
416 *pz = pu->significand[2]; in packextended()
417 *pw = pu->significand[3]; in packextended()
420 round(pfpsd, pu); /* rounding overflow handled in round() */ in packextended()
421 if (pu->exponent >= 0x7fff) { /* overflow */ in packextended()
428 if (overflow_to_infinity(pfpsd, pu->sign)) in packextended()
437 px->exponent = pu->exponent; in packextended()
438 px->significand = pu->significand[0]; in packextended()
439 *py = pu->significand[1]; in packextended()
440 *pz = pu->significand[2]; in packextended()
441 *pw = pu->significand[3]; in packextended()
449 unpacked *pu, /* unpacked operand */ in _fp_pack() argument
459 packint32(pfpsd, pu, &x); in _fp_pack()
468 packint64(pfpsd, pu, &x); in _fp_pack()
479 packsingle(pfpsd, pu, &x); in _fp_pack()
492 packdouble(pfpsd, pu, &db.x[0], &db.y[1]); in _fp_pack()
521 packsingle(pfpsd, pu, &tx); in _fp_pack()
522 pu = &U; in _fp_pack()
523 unpacksingle(pfpsd, pu, tx); in _fp_pack()
531 packdouble(pfpsd, pu, &tx, &ty); in _fp_pack()
532 pu = &U; in _fp_pack()
533 unpackdouble(pfpsd, pu, tx, ty); in _fp_pack()
538 k = pu->exponent + EXTENDED_BIAS; in _fp_pack()
541 fpu_rightshift(pu, 113-64); in _fp_pack()
542 round(pfpsd, pu); in _fp_pack()
543 pu->sticky = pu->rounded = 0; in _fp_pack()
544 pu->exponent += k; in _fp_pack()
545 fpu_normalize(pu); in _fp_pack()
549 packextended(pfpsd, pu, &ex.x, &ex.y[1], in _fp_pack()
569 uint32_t *pu, /* unpacked operand */ in _fp_pack_word() argument
572 pfpsd->fp_current_write_freg(pu, n, pfpsd); in _fp_pack_word()
578 uint64_t *pu, /* unpacked operand */ in _fp_pack_extword() argument
583 pfpsd->fp_current_write_dreg(pu, DOUBLE(n), pfpsd); in _fp_pack_extword()