Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm/arch/i387 Add optimised version of scalbnl for x86.
details: https://anonhg.NetBSD.org/src/rev/51b7300712b1
branches: trunk
changeset: 767672:51b7300712b1
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Jul 26 17:03:23 2011 +0000
description:
Add optimised version of scalbnl for x86.
diffstat:
lib/libm/arch/i387/s_scalbnl.S | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diffs (31 lines):
diff -r d0c6589b99ba -r 51b7300712b1 lib/libm/arch/i387/s_scalbnl.S
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/arch/i387/s_scalbnl.S Tue Jul 26 17:03:23 2011 +0000
@@ -0,0 +1,27 @@
+/*
+ * Written by J.T. Conklin <jtc%NetBSD.org@localhost>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+RCSID("$NetBSD: s_scalbnl.S,v 1.1 2011/07/26 17:03:23 joerg Exp $")
+
+#ifdef WEAK_ALIAS
+WEAK_ALIAS(scalbnl,_scalbnl)
+#endif
+
+ENTRY(_scalbnl)
+#ifdef __x86_64__
+ movl %edi,-4(%rsp)
+ fildl -4(%rsp)
+ fldt 8(%rsp)
+ fscale
+ fstp %st(1)
+#else
+ fildl 16(%esp)
+ fldt 4(%esp)
+ fscale
+ fstp %st(1) /* clean up stack */
+#endif
+ ret
Home |
Main Index |
Thread Index |
Old Index