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 long double version of x86 scalb func...
details: https://anonhg.NetBSD.org/src/rev/6fa8c23f7cb6
branches: trunk
changeset: 784840:6fa8c23f7cb6
user: matt <matt%NetBSD.org@localhost>
date: Mon Feb 11 01:19:33 2013 +0000
description:
Add long double version of x86 scalb functions
diffstat:
lib/libm/arch/i387/s_scalbn.S | 25 ++++++++++++++++++++-----
lib/libm/arch/i387/s_scalbnf.S | 20 ++++++++++++++++++--
lib/libm/arch/i387/s_scalbnl.S | 17 +++++++++++++++--
3 files changed, 53 insertions(+), 9 deletions(-)
diffs (121 lines):
diff -r f12a407ef826 -r 6fa8c23f7cb6 lib/libm/arch/i387/s_scalbn.S
--- a/lib/libm/arch/i387/s_scalbn.S Mon Feb 11 00:49:23 2013 +0000
+++ b/lib/libm/arch/i387/s_scalbn.S Mon Feb 11 01:19:33 2013 +0000
@@ -5,16 +5,31 @@
#include <machine/asm.h>
-RCSID("$NetBSD: s_scalbn.S,v 1.9 2010/04/23 19:17:07 drochner Exp $")
+RCSID("$NetBSD: s_scalbn.S,v 1.10 2013/02/11 01:19:33 matt Exp $")
#ifdef WEAK_ALIAS
-WEAK_ALIAS(scalbn,_scalbn)
+WEAK_ALIAS(scalbn,_scalbln)
+WEAK_ALIAS(scalbln,_scalbln)
+#endif
+#ifdef __x86_64__
+ENTRY(_scalbn)
+ movl %edi,-12(%rsp)
+ fildl -12(%rsp)
+ movsd %xmm0,-8(%rsp)
+ fldl -8(%rsp)
+ fscale
+ fstpl -8(%rsp)
+ movsd -8(%rsp),%xmm0
+ fstp %st(0)
+ ret
+#elif defined(STRONG_ALIAS)
+STRONG_ALIAS(_scalbn, scalbln)
#endif
-ENTRY(_scalbn)
+ENTRY(_scalbln)
#ifdef __x86_64__
- movl %edi,-12(%rsp)
- fildl -12(%rsp)
+ movq %rdx,-16(%rsp)
+ fildq -16(%rsp)
movsd %xmm0,-8(%rsp)
fldl -8(%rsp)
fscale
diff -r f12a407ef826 -r 6fa8c23f7cb6 lib/libm/arch/i387/s_scalbnf.S
--- a/lib/libm/arch/i387/s_scalbnf.S Mon Feb 11 00:49:23 2013 +0000
+++ b/lib/libm/arch/i387/s_scalbnf.S Mon Feb 11 01:19:33 2013 +0000
@@ -5,14 +5,15 @@
#include <machine/asm.h>
-RCSID("$NetBSD: s_scalbnf.S,v 1.8 2010/04/23 19:17:07 drochner Exp $")
+RCSID("$NetBSD: s_scalbnf.S,v 1.9 2013/02/11 01:19:33 matt Exp $")
#ifdef WEAK_ALIAS
WEAK_ALIAS(scalbnf,_scalbnf)
+WEAK_ALIAS(scalblnf,_scalblnf)
#endif
+#ifdef __x86_64__
ENTRY(_scalbnf)
-#ifdef __x86_64__
movl %edi,-8(%rsp)
fildl -8(%rsp)
movss %xmm0,-4(%rsp)
@@ -21,6 +22,21 @@
fstps -4(%rsp)
movss -4(%rsp),%xmm0
fstp %st(0)
+ ret
+#elif defined(STRONG_ALIAS)
+STRONG_ALIAS(_scalbnf,_scalbnf)
+#endif
+
+ENTRY(_scalblnf)
+#ifdef __x86_64__
+ movq %rdx,-16(%rsp)
+ fildq -16(%rsp)
+ movss %xmm0,-4(%rsp)
+ flds -4(%rsp)
+ fscale
+ fstps -4(%rsp)
+ movss -4(%rsp),%xmm0
+ fstp %st(0)
#else
fildl 8(%esp)
flds 4(%esp)
diff -r f12a407ef826 -r 6fa8c23f7cb6 lib/libm/arch/i387/s_scalbnl.S
--- a/lib/libm/arch/i387/s_scalbnl.S Mon Feb 11 00:49:23 2013 +0000
+++ b/lib/libm/arch/i387/s_scalbnl.S Mon Feb 11 01:19:33 2013 +0000
@@ -5,19 +5,32 @@
#include <machine/asm.h>
-RCSID("$NetBSD: s_scalbnl.S,v 1.1 2011/07/26 17:03:23 joerg Exp $")
+RCSID("$NetBSD: s_scalbnl.S,v 1.2 2013/02/11 01:19:33 matt Exp $")
#ifdef WEAK_ALIAS
WEAK_ALIAS(scalbnl,_scalbnl)
+WEAK_ALIAS(scalblnl,_scalblnl)
#endif
+#ifdef __x86_64__
ENTRY(_scalbnl)
-#ifdef __x86_64__
movl %edi,-4(%rsp)
fildl -4(%rsp)
fldt 8(%rsp)
fscale
fstp %st(1)
+ ret
+#elif defined(STRONG_ALIAS)
+STRONG_ALIAS(_scalbnl,_scalblnl)
+#endif
+
+ENTRY(_scalblnl)
+#ifdef __x86_64__
+ movq %rdx,-8(%rsp)
+ fildq -8(%rsp)
+ fldt 8(%rsp)
+ fscale
+ fstp %st(1)
#else
fildl 16(%esp)
fldt 4(%esp)
Home |
Main Index |
Thread Index |
Old Index