Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/x86_64/gen simplify: it doesn't need an i387 t...
details: https://anonhg.NetBSD.org/src/rev/cd769a5cf8f7
branches: trunk
changeset: 559768:cd769a5cf8f7
user: drochner <drochner%NetBSD.org@localhost>
date: Tue Mar 23 17:11:35 2004 +0000
description:
simplify: it doesn't need an i387 to kill a sign bit
diffstat:
lib/libc/arch/x86_64/gen/fabs.S | 20 +++++++++-----------
1 files changed, 9 insertions(+), 11 deletions(-)
diffs (32 lines):
diff -r eba0e5ad9352 -r cd769a5cf8f7 lib/libc/arch/x86_64/gen/fabs.S
--- a/lib/libc/arch/x86_64/gen/fabs.S Tue Mar 23 16:33:47 2004 +0000
+++ b/lib/libc/arch/x86_64/gen/fabs.S Tue Mar 23 17:11:35 2004 +0000
@@ -1,19 +1,17 @@
-/* $NetBSD: fabs.S,v 1.2 2004/02/26 19:19:06 drochner Exp $ */
+/* $NetBSD: fabs.S,v 1.3 2004/03/23 17:11:35 drochner Exp $ */
#include <machine/asm.h>
#if defined(LIBC_SCCS)
- RCSID("$NetBSD: fabs.S,v 1.2 2004/02/26 19:19:06 drochner Exp $")
+ RCSID("$NetBSD: fabs.S,v 1.3 2004/03/23 17:11:35 drochner Exp $")
#endif
-/*
- * Ok, this sucks. Is there really no way to push an xmm register onto
- * the FP stack directly?
- */
+ .section .rodata
+ .align 8
+__signmask:
+ .long 0xffffffff
+ .long 0x7fffffff
ENTRY(fabs)
- movsd %xmm0, -8(%rsp)
- fldl -8(%rsp)
- fabs
- fstpl -8(%rsp)
- movsd -8(%rsp),%xmm0
+ movsd __signmask(%rip),%xmm1
+ andpd %xmm1,%xmm0
ret
Home |
Main Index |
Thread Index |
Old Index