Lines Matching +full:10 +full:- +full:bits

12 |		value in memory; d0 contains the k-factor sign-extended
13 | to 32-bits. The input may be either normalized,
18 | Saves and Modifies: D2-D7,A2,FP2
23 | The k-factor is saved for use in d7. Clear the
31 | ILOG is the log base 10 of the input value. It is
45 | k-factor can dictate either the total number of digits,
53 | SCALE is equal to 10^ISCALE, where ISCALE is the number
57 | 10^^(abs(ISCALE)) using a rounding mode which is a
64 | only one rounding error. The grs bits are collected in
67 | A9. Scale X -> Y.
74 | compensated for by 'or-ing' in the INEX2 flag to
87 | or less than LEN -1 digits, adjust ILOG and repeat from
89 | result is exactly 10^LEN, decrement ILOG and divide
90 | the mantissa by 10.
95 | to be a fraction; i.e. (mantissa)/10^LEN and adjusted
106 | A16. Write sign bits to final string.
114 | d2: upper 32-bits of mantissa for binstr
115 | d3: scratch;lower 32-bits of mantissa for binstr
119 | d7: k-factor
165 moveml %d2-%d7/%a2,-(%a7)
166 fmovemx %fp0-%fp2,-(%a7)
169 | The k-factor is saved for use in d7. Clear BINDEC_FLG for
177 movel %d0,%d7 |move k-factor to d7
180 andiw #0xe000,%d0 |isolate stag bits
217 | ILOG is the log base 10 of the input value. It is approx-
224 | d0: k-factor/exponent
230 | d7: k-factor/Unchanged
244 movel #-4933,%d6 |force ILOG = -4933
266 fmovel #0,%FPSR |zero all of fpsr - nothing needed
277 | LEN is the number of digits to be displayed. The k-factor
293 | d7: k-factor/Unchanged
307 bles k_neg |if k <= 0, LEN = ILOG + 1 - k
329 | SCALE is equal to 10^ISCALE, where ISCALE is the number
332 | of ISCALE, used in A9. Fp1 contains 10^^(abs(ISCALE)) using
339 | ----------------------------------------------
346 | RZ 01 1 0 10/2 RM
347 | RZ 01 1 1 10/2 RM
348 | RM 10 0 0 11/3 RP
349 | RM 10 0 1 10/2 RM
350 | RM 10 1 0 10/2 RM
351 | RM 10 1 1 11/3 RP
352 | RP 11 0 0 10/2 RM
355 | RP 11 1 1 10/2 RM
359 | d0: exponent/scratch - final is 0
361 | d3: x/scratch - offset ptr into PTENRM array
365 | d7: k-factor/Unchanged
370 | fp1: x/10^ISCALE
380 cmpl %d6,%d7 |test k - ILOG
384 movel %d6,%d0 |calc ILOG + 1 - LEN in d0
393 cmpl #0xffffecd4,%d0 |test iscale <= -4908
401 bfextu USER_FPCR(%a6){#26:#2},%d1 |get initial rmode bits
402 lslw #1,%d1 |put them in bits 2:1
404 lslw #1,%d1 |put them in bits 3:1
411 lsll #4,%d3 |put bits in proper position
412 fmovel %d3,%fpcr |load bits into fpu
413 lsrl #4,%d3 |put bits in proper position
430 fmulx (%a1,%d3),%fp1 |mul by 10**(d3_bit_no)
440 | only one rounding error. The grs bits are collected in
450 | A9. Scale X -> Y.
453 | Check d2 for excess 10 exponential value. If not zero,
456 | multiply by 10^(d2), which is now only allowed to be 24,
457 | with a multiply by 10^8 and 10^16, which is exact since
458 | 10^24 is exact. If the input was denormalized, we must
470 | d7: k-factor/Unchanged
475 | fp1: 10^ISCALE/Unchanged
487 fdivx %fp1,%fp0 |calculate X / SCALE -> Y to fp0
493 fmovemx %fp1-%fp1,-(%a7) |load ETEMP with 10^ISCALE
494 movel 8(%a0),-(%a7) |load FPTEMP with input arg
495 movel 4(%a0),-(%a7)
496 movel (%a0),-(%a7)
499 clrl -(%a7) |clear lword on stack
502 moveb #BUSY_SIZE-4,1(%a7) |write current busy size
507 fmulx 36(%a1),%fp0 |multiply fp0 by 10^8
508 fmulx 48(%a1),%fp0 |multiply fp0 by 10^16
513 fmulx 36(%a1),%fp0 |multiply fp0 by 10^8
514 fmulx 48(%a1),%fp0 |multiply fp0 by 10^16
516 fmulx %fp1,%fp0 |calculate X * SCALE -> Y to fp0
521 | for by 'or-ing' in the INEX2 flag to the lsb of Y.
531 | d7: k-factor/Unchanged
536 | fp1: 10^ISCALE/Unchanged
572 | d7: k-factor/Unchanged
576 | a6: temp pointer to FP_SCR2(a6) - orig value saved and restored
578 | fp1: 10^ISCALE/Unchanged
586 moveml %d0-%d1/%a0-%a1,-(%a7) |save regs used by sintd0
587 movel L_SCR1(%a6),-(%a7)
588 movel L_SCR2(%a6),-(%a7)
593 orl #0x80000000,(%a0) |if neg, use -Y
595 movel USER_FPSR(%a6),-(%a7)
601 moveml (%a7)+,%d0-%d1/%a0-%a1 |restore regs used by sint
608 | or less than LEN -1 digits, adjust ILOG and repeat from
610 | result is exactly 10^LEN, decrement ILOG and divide
611 | the mantissa by 10. The calculation of 10^LEN cannot
612 | be inexact, since all powers of ten up to 10^27 are exact
613 | in extended precision, so the use of a previous power-of-ten
625 | d7: k-factor/Unchanged
630 | fp1: 10^ISCALE/Unchanged
631 | fp2: x/10^LEN
640 bne not_zr |if non-zero, go to second test
642 | Compute 10^(LEN-1)
646 subql #1,%d0 |d0 = LEN -1
651 fmulx (%a1,%d3),%fp2 |mul by 10**(d3_bit_no)
657 | 10^LEN-1 is computed for this test and A14. If the input was
658 | denormalized, check only the case in which YINT > 10^LEN.
665 | Compare abs(YINT) to 10^(LEN-1) and 10^LEN
669 fcmpx %fp2,%fp0 |compare abs(YINT) with 10^(LEN-1)
674 fmuls FTEN,%fp2 |compute 10^LEN
677 fmuls FTEN,%fp2 |compute 10^LEN
678 fcmpx %fp2,%fp0 |compare abs(YINT) with 10^LEN
681 fdivs FTEN,%fp0 |if equal, divide by 10
691 | and shouldn't have another; this is to check if abs(YINT) = 10^LEN
692 | 10^LEN is again computed using whatever table is in a1 since the
702 fmulx (%a1,%d3),%fp2 |mul by 10**(d3_bit_no)
708 fcmpx %fp2,%fp0 |check if abs(YINT) = 10^LEN
710 fdivs FTEN,%fp0 |divide abs(YINT) by 10
713 fmuls FTEN,%fp2 | if LEN++, the get 10^^LEN
719 | to be a fraction; i.e. (mantissa)/10^LEN and adjusted
727 | d0: x/LEN call to binstr - final is 0
729 | d2: x/ms 32-bits of mant of abs(YINT)
730 | d3: x/ls 32-bits of mant of abs(YINT)
734 | d7: k-factor/Unchanged
740 | fp1: 10^ISCALE/Unchanged
741 | fp2: 10^LEN/Unchanged
749 fdivx %fp2,%fp0 |divide abs(YINT) by 10^LEN
751 fmovex %fp0,(%a0) |move abs(YINT)/10^LEN to memory
790 | -----------------------------------------
792 | -----------------------------------------
795 | is non-zero, OPERR is signaled. In all cases, all 4 digits are
800 | d0: x/LEN call to binstr - final is 0
802 | d2: x/ms 32-bits of exp fraction/scratch
803 | d3: x/ls 32-bits of exp fraction
807 | d7: k-factor/Unchanged
812 | fp1: 10^ISCALE/Unchanged
813 | fp2: 10^LEN/Unchanged
815 | F_SCR2:Y with original exponent/ILOG/10^4
823 fbeq den_zero |if zero, use k-factor or 4933
828 tstl %d7 |check sign of the k-factor
845 fdivx 24(%a1),%fp0 |compute ILOG/10^4
876 | A16. Write sign bits to final string.
881 | d0: x/scratch - final is x
887 | d7: k-factor/Unchanged
892 | fp1: 10^ISCALE/Unchanged
893 | fp2: 10^LEN/Unchanged
895 | F_SCR2:ILOG/10^4
914 fmovel #0,%FPSR |clear possible inex2/ainex bits
915 fmovemx (%a7)+,%fp0-%fp2
916 moveml (%a7)+,%d2-%d7/%a2