diff options
author | Martynas Venckus <martynas@cvs.openbsd.org> | 2011-07-09 18:00:54 +0000 |
---|---|---|
committer | Martynas Venckus <martynas@cvs.openbsd.org> | 2011-07-09 18:00:54 +0000 |
commit | 47d7e2efdf6b12d92917a87bcd89f209bb84db69 (patch) | |
tree | c578e796172c7b1df3424a0408ca069e78c34bba /lib | |
parent | 3da6eeecf5f5646afabc209c118bf439cfaf740c (diff) |
Switch to the SSE code. OK mikeb@.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libm/arch/amd64/s_copysign.S | 21 | ||||
-rw-r--r-- | lib/libm/arch/amd64/s_copysignf.S | 28 |
2 files changed, 5 insertions, 44 deletions
diff --git a/lib/libm/arch/amd64/s_copysign.S b/lib/libm/arch/amd64/s_copysign.S index 92efcac557c..7f8c98c3b6c 100644 --- a/lib/libm/arch/amd64/s_copysign.S +++ b/lib/libm/arch/amd64/s_copysign.S @@ -1,13 +1,9 @@ -/* $OpenBSD: s_copysign.S,v 1.3 2009/04/08 22:30:41 martynas Exp $ */ +/* $OpenBSD: s_copysign.S,v 1.4 2011/07/09 18:00:53 martynas Exp $ */ /* * Written by J.T. Conklin <jtc@NetBSD.org>. * Public domain. */ -/* - * XXXfvdl might as well split this file. - */ - #include <machine/asm.h> .Lpos: @@ -16,24 +12,9 @@ .quad 0x7fffffffffffffff ENTRY(copysign) -#if 0 - /* - * XXXfvdl gas doesn't grok this yet. - */ movq .Lpos(%rip),%xmm2 movq .Lneg(%rip),%xmm3 pand %xmm2,%xmm1 pand %xmm3,%xmm0 por %xmm1,%xmm0 -#else - movsd %xmm0,-8(%rsp) - movsd %xmm1,-16(%rsp) - movl -12(%rsp),%edx - andl $0x80000000,%edx - movl -4(%rsp),%eax - andl $0x7fffffff,%eax - orl %edx,%eax - movl %eax,-4(%rsp) - movsd -8(%rsp),%xmm0 -#endif ret diff --git a/lib/libm/arch/amd64/s_copysignf.S b/lib/libm/arch/amd64/s_copysignf.S index b0e29f8718f..618203b46af 100644 --- a/lib/libm/arch/amd64/s_copysignf.S +++ b/lib/libm/arch/amd64/s_copysignf.S @@ -1,4 +1,4 @@ -/* $OpenBSD: s_copysignf.S,v 1.3 2009/04/08 22:30:41 martynas Exp $ */ +/* $OpenBSD: s_copysignf.S,v 1.4 2011/07/09 18:00:53 martynas Exp $ */ /* * Written by J.T. Conklin <jtc@NetBSD.org>. * Public domain. @@ -6,35 +6,15 @@ #include <machine/asm.h> -/* - * XXXfvdl split this file. - */ - .Lneg: .long 0x7fffffff .Lpos: .long 0x80000000 ENTRY(copysignf) -#if 0 - /* - * XXXfvdl gas doesn't grok this. - * but it's legal according to the p4 manual. - */ movss .Lpos(%rip),%xmm2 movss .Lneg(%rip),%xmm3 - pandq %xmm2,%xmm1 - pandq %xmm3,%xmm0 - porq %xmm1,%xmm0 -#else - movss %xmm0,-4(%rsp) - movss %xmm1,-8(%rsp) - movl -8(%rsp),%edx - andl $0x80000000,%edx - movl -4(%rsp),%eax - andl $0x7fffffff,%eax - orl %edx,%eax - movl %eax,-4(%rsp) - movss -4(%rsp),%xmm0 -#endif + pand %xmm2,%xmm1 + pand %xmm3,%xmm0 + por %xmm1,%xmm0 ret |