freebsd-dev/lib/libc/amd64/gen/fabs.S
David E. O'Brien 32fdc4235e Floating point libc functions traditionally written in ASM.
AMD64 does away with the x87 in 64-bit long mode, so we have to play the
SSE/SSE2 game now.

Obtained from:	NetBSD/x86-64
2003-04-30 16:21:03 +00:00

19 lines
349 B
ArmAsm

#include <machine/asm.h>
#if defined(LIBC_SCCS)
RCSID("$NetBSD: fabs.S,v 1.4 1997/07/16 14:37:16 christos Exp $")
#endif
__FBSDID("$FreeBSD$");
/*
* Ok, this sucks. Is there really no way to push an xmm register onto
* the FP stack directly?
*/
ENTRY(fabs)
movsd %xmm0, -8(%rsp)
fldl -8(%rsp)
fabs
fstp -8(%rsp)
movsd -8(%rsp),%xmm0
ret