xref: /original-bsd/lib/libc/sparc/gen/fabs.s (revision c3e32dec)
1/*
2 * Copyright (c) 1992, 1993
3 *	The Regents of the University of California.  All rights reserved.
4 *
5 * This software was developed by the Computer Systems Engineering group
6 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
7 * contributed to Berkeley.
8 *
9 * %sccs.include.redist.c%
10 *
11 * from: $Header: fabs.s,v 1.4 91/10/07 23:59:05 torek Exp $
12 */
13
14#if defined(LIBC_SCCS) && !defined(lint)
15	.asciz "@(#)fabs.s	8.1 (Berkeley) 06/04/93"
16#endif /* LIBC_SCCS and not lint */
17
18/* fabs - floating absolute value */
19
20#include "DEFS.h"
21
22ENTRY(fabs)
23	std	%o0, [%sp + 32]		! return value => %f0:f1
24	ldd	[%sp + 32], %f0		! (via kernel %o0/%o1 slot)
25	retl
26	 fabss	%f0, %f0		! return absolute value
27