xref: /openbsd-src/lib/libm/arch/i387/s_copysign.S (revision 6d9c1604e2b9950ba6aad939ef3b473074496c63)
1/*	$OpenBSD: s_copysign.S,v 1.4 2016/12/22 16:11:26 naddy Exp $ */
2/*
3 * Written by J.T. Conklin <jtc@netbsd.org>.
4 * Public domain.
5 */
6
7#include "DEFS.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
18END_STD(copysign)
19