xref: /csrg-svn/lib/libc/vax/gen/fabs.s (revision 34819)
134480Sbostic/*
234480Sbostic * Copyright (c) 1983 Regents of the University of California.
334480Sbostic * All rights reserved.
434480Sbostic *
534480Sbostic * Redistribution and use in source and binary forms are permitted
6*34819Sbostic * provided that the above copyright notice and this paragraph are
7*34819Sbostic * duplicated in all such forms and that any documentation,
8*34819Sbostic * advertising materials, and other materials related to such
9*34819Sbostic * distribution and use acknowledge that the software was developed
10*34819Sbostic * by the University of California, Berkeley.  The name of the
11*34819Sbostic * University may not be used to endorse or promote products derived
12*34819Sbostic * from this software without specific prior written permission.
13*34819Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14*34819Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15*34819Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1634480Sbostic */
1722284Smckusick
18*34819Sbostic#if defined(LIBC_SCCS) && !defined(lint)
19*34819Sbostic	.asciz "@(#)fabs.s	5.4 (Berkeley) 06/27/88"
20*34819Sbostic#endif /* LIBC_SCCS and not lint */
2134480Sbostic
2213415Sroot/* fabs - floating absolute value */
2313415Sroot
2413415Sroot#include "DEFS.h"
2513415Sroot
2617329SsamENTRY(fabs, 0)
2713415Sroot	movd	4(ap),r0
2813415Sroot	bgeq	1f
2913415Sroot	mnegd	r0,r0
3013415Sroot1:
3113415Sroot	ret
32