summaryrefslogtreecommitdiff
path: root/lib/libm/arch/i387/s_copysign.S
blob: eeb1627626ffca383947d1f2648476c1aef67ee6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*	$OpenBSD: s_copysign.S,v 1.2 2005/08/02 11:17:31 espie Exp $ */
/*
 * Written by J.T. Conklin <jtc@netbsd.org>.
 * Public domain.
 */

#include <machine/asm.h>

ENTRY(copysign)
	movl	16(%esp),%edx
	andl	$0x80000000,%edx
	movl	8(%esp),%eax
	andl	$0x7fffffff,%eax
	orl	%edx,%eax
	movl	%eax,8(%esp)
	fldl	4(%esp)
	ret