Annotation of coherent/b/lib/libc/crt/i386/frexp.s, revision 1.1.1.1

1.1       root        1: //////////
                      2: / libc/crt/i386/frexp.s
                      3: / i386 C runtime library.
                      4: / IEEE software floating point support.
                      5: / i386 IEEE software floating point library.
                      6: / frexp()
                      7: //////////
                      8: 
                      9: //////////
                     10: / double
                     11: / frexp(real, ep) double real; int *ep;
                     12: /
                     13: / Store exponent e through ep and return mantissa m,
                     14: / where real = m * 2^e, 1/2 <= |m| < 1.
                     15: //////////
                     16: 
                     17:        .globl  frexp
                     18: 
                     19: real   .equ    4
                     20: ep     .equ    real+8
                     21: EXPMASK        .equ    0x7FF00000
                     22: DEFEXP .equ    1022
                     23: 
                     24: frexp:
                     25:        movl    %edx, real+4(%esp)      / real sign/exp to EDX
                     26:        movl    %ecx, $EXPMASK
                     27:        andl    %ecx, %edx              / extract exponent bits in ECX
                     28:        jnz     ?L0                     / watch for -0.0
                     29:        movl    %edx, %ecx              / exponent 0, zap sign bit in case -0.0
                     30: 
                     31: ?L0:
                     32:        xorl    %edx, %ecx              / mask off exponent in EDX
                     33:        orl     %edx, $DEFEXP<<20       / and replace with new exponent
                     34:        shrl    %ecx, $20               / unshifted exponent in ECX
                     35:        subl    %ecx, $DEFEXP           / unbiased
                     36:        movl    %eax, ep(%esp)          / ep to EAX
                     37:        movl    (%eax), %ecx            / store exponent
                     38:        movl    %eax, real(%esp)        / fetch low mantissa dword to EAX
                     39:        ret
                     40: 
                     41: / end of libc/crt/i386/frexp.s

unix.superglobalmegacorp.com

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