binutils214 stage 2/4.
[dragonfly.git] / lib / libc / amd64 / gen / fabs.S
1 /*
2  * $NetBSD: fabs.S,v 1.4 1997/07/16 14:37:16 christos Exp $
3  * $FreeBSD: src/lib/libc/amd64/gen/fabs.S,v 1.2 2003/09/26 01:49:48 peter Exp $
4  * $DragonFly: src/lib/libc/amd64/gen/fabs.S,v 1.1 2004/02/02 05:43:14 dillon Exp $
5  */
6
7 #include <machine/asm.h>
8
9 /*
10  * Ok, this sucks. Is there really no way to push an xmm register onto
11  * the FP stack directly?
12  */
13
14 ENTRY(fabs)
15         movsd   %xmm0, -8(%rsp)
16         fldl    -8(%rsp)
17         fabs
18         fstpl   -8(%rsp)
19         movsd   -8(%rsp),%xmm0
20         ret