Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3-0]: src/lib/libm/arch/i387 Pull up following revision(s) (reque...
details: https://anonhg.NetBSD.org/src/rev/6607159d6b54
branches: netbsd-3-0
changeset: 579261:6607159d6b54
user: tron <tron%NetBSD.org@localhost>
date: Wed Jul 26 20:19:30 2006 +0000
description:
Pull up following revision(s) (requested by drochner in ticket #1236):
lib/libm/arch/i387/s_scalbn.S: revision 1.8
lib/libm/arch/i387/s_scalbnf.S: revision 1.7
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.
diffstat:
lib/libm/arch/i387/s_scalbn.S | 23 +++++++++++++++--------
lib/libm/arch/i387/s_scalbnf.S | 23 +++++++++++++++--------
2 files changed, 30 insertions(+), 16 deletions(-)
diffs (68 lines):
diff -r 1aad26f2fc59 -r 6607159d6b54 lib/libm/arch/i387/s_scalbn.S
--- a/lib/libm/arch/i387/s_scalbn.S Sun Jul 16 12:23:40 2006 +0000
+++ b/lib/libm/arch/i387/s_scalbn.S Wed Jul 26 20:19:30 2006 +0000
@@ -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.7.10.1 2006/07/26 20:19:30 tron 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
diff -r 1aad26f2fc59 -r 6607159d6b54 lib/libm/arch/i387/s_scalbnf.S
--- a/lib/libm/arch/i387/s_scalbnf.S Sun Jul 16 12:23:40 2006 +0000
+++ b/lib/libm/arch/i387/s_scalbnf.S Wed Jul 26 20:19:30 2006 +0000
@@ -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.6.10.1 2006/07/26 20:19:31 tron 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
Home |
Main Index |
Thread Index |
Old Index