Add long double version of x86 scalb functions
This commit is contained in:
parent
ff820d76df
commit
3a4e9cb991
|
@ -5,14 +5,14 @@
|
||||||
|
|
||||||
#include <machine/asm.h>
|
#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
|
#ifdef WEAK_ALIAS
|
||||||
WEAK_ALIAS(scalbn,_scalbn)
|
WEAK_ALIAS(scalbn,_scalbln)
|
||||||
|
WEAK_ALIAS(scalbln,_scalbln)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ENTRY(_scalbn)
|
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
|
ENTRY(_scalbn)
|
||||||
movl %edi,-12(%rsp)
|
movl %edi,-12(%rsp)
|
||||||
fildl -12(%rsp)
|
fildl -12(%rsp)
|
||||||
movsd %xmm0,-8(%rsp)
|
movsd %xmm0,-8(%rsp)
|
||||||
|
@ -21,6 +21,21 @@ ENTRY(_scalbn)
|
||||||
fstpl -8(%rsp)
|
fstpl -8(%rsp)
|
||||||
movsd -8(%rsp),%xmm0
|
movsd -8(%rsp),%xmm0
|
||||||
fstp %st(0)
|
fstp %st(0)
|
||||||
|
ret
|
||||||
|
#elif defined(STRONG_ALIAS)
|
||||||
|
STRONG_ALIAS(_scalbn, scalbln)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ENTRY(_scalbln)
|
||||||
|
#ifdef __x86_64__
|
||||||
|
movq %rdx,-16(%rsp)
|
||||||
|
fildq -16(%rsp)
|
||||||
|
movsd %xmm0,-8(%rsp)
|
||||||
|
fldl -8(%rsp)
|
||||||
|
fscale
|
||||||
|
fstpl -8(%rsp)
|
||||||
|
movsd -8(%rsp),%xmm0
|
||||||
|
fstp %st(0)
|
||||||
#else
|
#else
|
||||||
fildl 12(%esp)
|
fildl 12(%esp)
|
||||||
fldl 4(%esp)
|
fldl 4(%esp)
|
||||||
|
|
|
@ -5,14 +5,15 @@
|
||||||
|
|
||||||
#include <machine/asm.h>
|
#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
|
#ifdef WEAK_ALIAS
|
||||||
WEAK_ALIAS(scalbnf,_scalbnf)
|
WEAK_ALIAS(scalbnf,_scalbnf)
|
||||||
|
WEAK_ALIAS(scalblnf,_scalblnf)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ENTRY(_scalbnf)
|
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
|
ENTRY(_scalbnf)
|
||||||
movl %edi,-8(%rsp)
|
movl %edi,-8(%rsp)
|
||||||
fildl -8(%rsp)
|
fildl -8(%rsp)
|
||||||
movss %xmm0,-4(%rsp)
|
movss %xmm0,-4(%rsp)
|
||||||
|
@ -21,6 +22,21 @@ ENTRY(_scalbnf)
|
||||||
fstps -4(%rsp)
|
fstps -4(%rsp)
|
||||||
movss -4(%rsp),%xmm0
|
movss -4(%rsp),%xmm0
|
||||||
fstp %st(0)
|
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
|
#else
|
||||||
fildl 8(%esp)
|
fildl 8(%esp)
|
||||||
flds 4(%esp)
|
flds 4(%esp)
|
||||||
|
|
|
@ -5,19 +5,32 @@
|
||||||
|
|
||||||
#include <machine/asm.h>
|
#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
|
#ifdef WEAK_ALIAS
|
||||||
WEAK_ALIAS(scalbnl,_scalbnl)
|
WEAK_ALIAS(scalbnl,_scalbnl)
|
||||||
|
WEAK_ALIAS(scalblnl,_scalblnl)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ENTRY(_scalbnl)
|
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
|
ENTRY(_scalbnl)
|
||||||
movl %edi,-4(%rsp)
|
movl %edi,-4(%rsp)
|
||||||
fildl -4(%rsp)
|
fildl -4(%rsp)
|
||||||
fldt 8(%rsp)
|
fldt 8(%rsp)
|
||||||
fscale
|
fscale
|
||||||
fstp %st(1)
|
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
|
#else
|
||||||
fildl 16(%esp)
|
fildl 16(%esp)
|
||||||
fldt 4(%esp)
|
fldt 4(%esp)
|
||||||
|
|
Loading…
Reference in New Issue