[BACK]Return to fpsetsticky.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/fpsetsticky.S, Revision 1.5

1.5     ! drochner    1: /*     $NetBSD: fpsetsticky.S,v 1.4 2004/03/05 16:27:56 drochner Exp $ */
1.1       fvdl        2:
                      3: /*
1.3       fvdl        4:  * Written by Frank van der Linden at Wasabi Systems for NetBSD
1.1       fvdl        5:  * Public domain.
                      6:  */
                      7:
                      8: #include <machine/asm.h>
                      9:
1.3       fvdl       10: /*
                     11:  * XXX set both the x87 status 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:
1.2       thorpej    18: #ifdef WEAK_ALIAS
                     19: WEAK_ALIAS(fpsetsticky, _fpsetsticky)
                     20: ENTRY(_fpsetsticky)
                     21: #else
1.1       fvdl       22: ENTRY(fpsetsticky)
1.2       thorpej    23: #endif
1.3       fvdl       24:        fnstenv -28(%rsp)
                     25:        stmxcsr -32(%rsp)
                     26:
                     27:        andl    $63,%edi
                     28:
                     29:        movl    -24(%rsp),%eax
                     30:        movl    %eax,%edx
1.5     ! drochner   31:        andb    $0xc0,%dl
1.3       fvdl       32:
                     33:        orl     %edi,%edx
                     34:        movl    %edx,-24(%rsp)
                     35:
                     36:        movl    -32(%rsp),%edx
1.4       drochner   37:        orl     %edx,%eax
                     38:        andl    $63,%eax
                     39:        andb    $0xc0,%dl
1.3       fvdl       40:        orl     %edi,%edx
                     41:        movl    %edx,-32(%rsp)
                     42:
                     43:        ldmxcsr -32(%rsp)
                     44:        fldenv  -28(%rsp)
1.1       fvdl       45:        ret

CVSweb <webmaster@jp.NetBSD.org>