The second argument is not a float, so the "abi.h" abstraction
doesn't work. Open-code the argument handling instead. Should fix the ldexp() bug reported by Brendon Costa in port-amd64.
This commit is contained in:
parent
a1cdcab3c8
commit
0e514dc492
|
@ -5,15 +5,22 @@
|
|||
|
||||
#include <machine/asm.h>
|
||||
|
||||
#include "abi.h"
|
||||
|
||||
RCSID("$NetBSD: s_scalbn.S,v 1.7 2003/07/26 19:25:03 salo Exp $")
|
||||
RCSID("$NetBSD: s_scalbn.S,v 1.8 2006/03/21 11:35:21 drochner Exp $")
|
||||
|
||||
ENTRY(scalbn)
|
||||
XMM_TWO_ARG_DOUBLE_PROLOGUE
|
||||
fildl ARG_DOUBLE_TWO
|
||||
fldl ARG_DOUBLE_ONE
|
||||
#ifdef __x86_64__
|
||||
movl %edi,-12(%rsp)
|
||||
fildl -12(%rsp)
|
||||
movsd %xmm0,-8(%rsp)
|
||||
fldl -8(%rsp)
|
||||
fscale
|
||||
fstp %st(1) /* bug fix for fp stack overflow */
|
||||
XMM_DOUBLE_EPILOGUE
|
||||
fstpl -8(%rsp)
|
||||
movsd -8(%rsp),%xmm0
|
||||
fstp %st(0)
|
||||
#else
|
||||
fildl 12(%esp)
|
||||
fldl 4(%esp)
|
||||
fscale
|
||||
fstp %st(1) /* clean up stack */
|
||||
#endif
|
||||
ret
|
||||
|
|
|
@ -5,15 +5,22 @@
|
|||
|
||||
#include <machine/asm.h>
|
||||
|
||||
#include "abi.h"
|
||||
|
||||
RCSID("$NetBSD: s_scalbnf.S,v 1.6 2003/07/26 19:25:03 salo Exp $")
|
||||
RCSID("$NetBSD: s_scalbnf.S,v 1.7 2006/03/21 11:35:21 drochner Exp $")
|
||||
|
||||
ENTRY(scalbnf)
|
||||
XMM_TWO_ARG_FLOAT_PROLOGUE
|
||||
fildl ARG_FLOAT_TWO
|
||||
flds ARG_FLOAT_ONE
|
||||
#ifdef __x86_64__
|
||||
movl %edi,-8(%rsp)
|
||||
fildl -8(%rsp)
|
||||
movss %xmm0,-4(%rsp)
|
||||
flds -4(%rsp)
|
||||
fscale
|
||||
fstp %st(1) /* bug fix for fp stack overflow */
|
||||
XMM_FLOAT_EPILOGUE
|
||||
fstps -4(%rsp)
|
||||
movss -4(%rsp),%xmm0
|
||||
fstp %st(0)
|
||||
#else
|
||||
fildl 8(%esp)
|
||||
flds 4(%esp)
|
||||
fscale
|
||||
fstp %st(1) /* clean up stack */
|
||||
#endif
|
||||
ret
|
||||
|
|
Loading…
Reference in New Issue