diff options
Diffstat (limited to 'lib/libc/amd64/gen/fabs.S')
-rw-r--r-- | lib/libc/amd64/gen/fabs.S | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/libc/amd64/gen/fabs.S b/lib/libc/amd64/gen/fabs.S new file mode 100644 index 0000000..695c20c --- /dev/null +++ b/lib/libc/amd64/gen/fabs.S @@ -0,0 +1,18 @@ +#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 |