tools/llvm: Do not build with symbols
[minix3.git] / lib / libc / arch / i386 / gen / fpsetround.S
blob0a0766097111fedd298269cb6d597f0946836331
1 /*      $NetBSD: fpsetround.S,v 1.5 2011/09/30 23:45:41 christos Exp $  */
3 /*
4  * Written by Frank van der Linden at Wasabi Systems for NetBSD.
5  * Public domain.
6  */
8 #include <machine/asm.h>
11  * XXX set both the x87 control word
12  * Applications should only set exception and round flags
13  */ 
16 #ifdef WEAK_ALIAS
17 WEAK_ALIAS(fpsetround, _fpsetround)
18 ENTRY(_fpsetround)
19 #else
20 ENTRY(fpsetround)
21 #endif
23         fnstcw  -4(%esp)
24         movl    -4(%esp), %edx
25         movl    %edx, %eax
26         andl    $0x00000c00, %eax       
27         andl    $0xfffff3ff, %edx
28         movl    4(%esp), %ecx
29         orl     %ecx, %edx
30         movl    %edx, -4(%esp)
31         fldcw   -4(%esp)
33         ret