xref: /csrg-svn/lib/libc/hp300/stdlib/abs.s (revision 61121)
141790Sbostic/*-
2*61121Sbostic * Copyright (c) 1990, 1993
3*61121Sbostic *	The Regents of the University of California.  All rights reserved.
441790Sbostic *
541790Sbostic * This code is derived from software contributed to Berkeley by
641790Sbostic * the Systems Programming Group of the University of Utah Computer
741790Sbostic * Science Department.
841790Sbostic *
941790Sbostic * %sccs.include.redist.c%
1041790Sbostic */
1141790Sbostic
1241790Sbostic#if defined(LIBC_SCCS) && !defined(lint)
13*61121Sbostic	.asciz "@(#)abs.s	8.1 (Berkeley) 06/04/93"
1441790Sbostic#endif /* LIBC_SCCS and not lint */
1541790Sbostic
1641790Sbostic/* abs - int absolute value */
1741790Sbostic
1841790Sbostic#include "DEFS.h"
1941790Sbostic
2041790SbosticENTRY(abs)
2141790Sbostic	movl	sp@(4),d0
2241790Sbostic	jge	L1
2341790Sbostic	negl	d0
2441790SbosticL1:
2541790Sbostic	rts
26