Home | History | Annotate | Line # | Download | only in i387
s_copysignf.S revision 1.6
      1  1.1    jtc /*
      2  1.5   salo  * Written by J.T. Conklin <jtc (at) NetBSD.org>.
      3  1.2    jtc  * Public domain.
      4  1.1    jtc  */
      5  1.1    jtc 
      6  1.1    jtc #include <machine/asm.h>
      7  1.1    jtc 
      8  1.4   fvdl /*
      9  1.4   fvdl  * XXXfvdl split this file.
     10  1.4   fvdl  */
     11  1.4   fvdl 
     12  1.6  joerg RCSID("$NetBSD: s_copysignf.S,v 1.6 2011/06/18 20:49:26 joerg Exp $")
     13  1.4   fvdl 
     14  1.4   fvdl #ifdef __x86_64__
     15  1.4   fvdl .Lneg:
     16  1.4   fvdl 	.long 0x7fffffff
     17  1.4   fvdl .Lpos:
     18  1.4   fvdl 	.long 0x80000000
     19  1.4   fvdl #endif
     20  1.1    jtc 
     21  1.1    jtc ENTRY(copysignf)
     22  1.4   fvdl #ifdef __i386__
     23  1.1    jtc 	movl	8(%esp),%edx
     24  1.1    jtc 	andl	$0x80000000,%edx
     25  1.1    jtc 	movl	4(%esp),%eax
     26  1.1    jtc 	andl	$0x7fffffff,%eax
     27  1.1    jtc 	orl	%edx,%eax
     28  1.1    jtc 	movl	%eax,4(%esp)
     29  1.1    jtc 	flds	4(%esp)
     30  1.4   fvdl #else
     31  1.4   fvdl 	movss	%xmm0,-4(%rsp)
     32  1.4   fvdl 	movss	%xmm1,-8(%rsp)
     33  1.4   fvdl 	movl	-8(%rsp),%edx
     34  1.4   fvdl 	andl	$0x80000000,%edx
     35  1.4   fvdl 	movl	-4(%rsp),%eax
     36  1.4   fvdl 	andl	$0x7fffffff,%eax
     37  1.4   fvdl 	orl	%edx,%eax
     38  1.4   fvdl 	movl	%eax,-4(%rsp)
     39  1.4   fvdl 	movss	-4(%rsp),%xmm0
     40  1.4   fvdl #endif
     41  1.1    jtc 	ret
     42