xref: /openbsd/lib/libm/arch/i387/s_copysign.S (revision 7b36286a)
1/*	$OpenBSD: s_copysign.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
2/*
3 * Written by J.T. Conklin <jtc@netbsd.org>.
4 * Public domain.
5 */
6
7#include <machine/asm.h>
8
9ENTRY(copysign)
10	movl	16(%esp),%edx
11	andl	$0x80000000,%edx
12	movl	8(%esp),%eax
13	andl	$0x7fffffff,%eax
14	orl	%edx,%eax
15	movl	%eax,8(%esp)
16	fldl	4(%esp)
17	ret
18