xref: /netbsd/lib/libc/arch/x86_64/gen/fabs.S (revision bf9ec67e)
1/*	$NetBSD: fabs.S,v 1.1 2001/06/19 00:25:02 fvdl Exp $	*/
2
3#include <machine/asm.h>
4#if defined(LIBC_SCCS)
5	RCSID("$NetBSD: fabs.S,v 1.1 2001/06/19 00:25:02 fvdl Exp $")
6#endif
7
8/*
9 * Ok, this sucks. Is there really no way to push an xmm register onto
10 * the FP stack directly?
11 */
12
13ENTRY(fabs)
14	movsd	%xmm0, -8(%rsp)
15	fldl	-8(%rsp)
16	fabs
17	fstp	-8(%rsp)
18	movsd	-8(%rsp),%xmm0
19	ret
20