summaryrefslogtreecommitdiff
path: root/lib/libc/arch/x86_64/gen/fpsetround.S
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/arch/x86_64/gen/fpsetround.S')
-rw-r--r--lib/libc/arch/x86_64/gen/fpsetround.S49
1 files changed, 0 insertions, 49 deletions
diff --git a/lib/libc/arch/x86_64/gen/fpsetround.S b/lib/libc/arch/x86_64/gen/fpsetround.S
deleted file mode 100644
index b8508f8b6bd..00000000000
--- a/lib/libc/arch/x86_64/gen/fpsetround.S
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $OpenBSD: fpsetround.S,v 1.1 2004/01/28 01:44:45 mickey Exp $ */
-/* $NetBSD: fpsetround.S,v 1.3 2002/06/12 19:17:22 fvdl Exp $ */
-
-/*
- * Written by Frank van der Linden at Wasabi Systems for NetBSD.
- * Public domain.
- */
-
-#include <machine/asm.h>
-
-/*
- * XXX set both the x87 control word and the SSE mxcsr register.
- * Applications should only set exception and round flags
- * via the fp*() interface, otherwise the status words
- * will get our of sync.
- */
-
-
-#ifdef WEAK_ALIAS
-WEAK_ALIAS(fpsetround, _fpsetround)
-ENTRY(_fpsetround)
-#else
-ENTRY(fpsetround)
-#endif
- fnstcw -4(%rsp)
- stmxcsr -8(%rsp)
-
- andl $3,%edi
-
- movl -4(%rsp),%edx
- rorl $10,%edx
- movl %edx,%eax
- andl $3,%eax
-
- andl $~3,%edx
- orl %edi,%edx
- roll $10,%edx
- movl %edx,-4(%rsp)
-
- movl -8(%rsp),%edx
- rorl $13,%edx
- andl $~3,%edx
- orl %edi,%edx
- roll $13,%edx
- movl %edx,-8(%rsp)
-
- ldmxcsr -8(%rsp)
- fldcw -4(%rsp)
- ret