Annotation of researchv10no/libc/gen/frexp.s, revision 1.1.1.1

1.1       root        1: #
                      2: #      double frexp (value, eptr)
                      3: #              double value;
                      4: #              int *eptr;
                      5: #
                      6: #      Frexp breaks "value" up into a fraction and an exponent.
                      7: #      It stores the exponent indirectly through eptr, and
                      8: #      returns the fraction.  More specifically, after
                      9: #
                     10: #              double d, frexp();
                     11: #              int e;
                     12: #              d = frexp (x, &e);
                     13: #
                     14: #      then |d| will be less than 1, and x will be equal to d*(2**e).
                     15: #      Further, if x is not zero, d will be no less than 1/2, and if
                     16: #      x is zero, both d and e will be zero too.
                     17: #
                     18: #
                     19: #      Entry point
                     20: #
                     21:        .text
                     22:        .globl  _frexp
                     23: _frexp:        .word   0x0000
                     24: 
                     25:        movd    4(ap),r0                # (r0,r1) := value
                     26:        extzv   $7,$8,r0,*12(ap)        # Fetch exponent
                     27:        jeql    fr1                     # If exponent zero, we're done
                     28:        subl2   $128,*12(ap)            # Bias the exponent appropriately
                     29:        insv    $128,$7,$8,r0           # Force the result exponent to biased 0
                     30: fr1:   ret

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.