xref: /original-bsd/lib/libc/sparc/stdlib/abs.s (revision 444a7056)
1/*
2 * Copyright (c) 1992 The Regents of the University of California.
3 * 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: abs.s,v 1.1 91/07/06 18:01:57 torek Exp $
12 */
13
14#if defined(LIBC_SCCS) && !defined(lint)
15	.asciz "@(#)abs.s	5.1 (Berkeley) 06/25/92"
16#endif /* LIBC_SCCS and not lint */
17
18/* abs - int absolute value */
19
20#include "DEFS.h"
21
22ENTRY(abs)
23	tst	%o0
24	bl,a	1f
25	neg	%o0
261:	retl
27	nop
28