[BACK]Return to fpsetprec.S CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / arch / x86_64 / gen

Annotation of src/lib/libc/arch/x86_64/gen/fpsetprec.S, Revision 1.1

1.1     ! christos    1: /*     $NetBSD: fpsetround.S,v 1.3 2002/06/12 19:17:22 fvdl Exp $      */
        !             2:
        !             3: /*
        !             4:  * Written by Frank van der Linden at Wasabi Systems for NetBSD.
        !             5:  * Public domain.
        !             6:  */
        !             7:
        !             8: #include <machine/asm.h>
        !             9:
        !            10: /*
        !            11:  * XXX set both the x87 control word and the SSE mxcsr register.
        !            12:  * Applications should only set exception and round flags
        !            13:  * via the fp*() interface, otherwise the status words
        !            14:  * will get our of sync.
        !            15:  */
        !            16:
        !            17:
        !            18: #ifdef WEAK_ALIAS
        !            19: WEAK_ALIAS(fpsetprec, _fpsetprec)
        !            20: ENTRY(_fpsetprec)
        !            21: #else
        !            22: ENTRY(fpsetprec)
        !            23: #endif
        !            24:        fnstcw  -4(%rsp)
        !            25:
        !            26:        andl    $3,%edi
        !            27:
        !            28:        movl    -4(%rsp),%edx
        !            29:        rorl    $8,%edx
        !            30:        movl    %edx,%eax
        !            31:        andl    $3,%eax
        !            32:
        !            33:        andl    $~3,%edx
        !            34:        orl     %edi,%edx
        !            35:        roll    $8,%edx
        !            36:        movl    %edx,-4(%rsp)
        !            37:
        !            38:        fldcw   -4(%rsp)
        !            39:        ret

CVSweb <webmaster@jp.NetBSD.org>