fabs.S revision 1.3
11.1Sglass/*-
21.1Sglass * Copyright (c) 1993
31.1Sglass *	The Regents of the University of California.  All rights reserved.
41.1Sglass *
51.1Sglass * This code is derived from software contributed to Berkeley by
61.1Sglass * Ralph Campbell.
71.1Sglass *
81.1Sglass * Redistribution and use in source and binary forms, with or without
91.1Sglass * modification, are permitted provided that the following conditions
101.1Sglass * are met:
111.1Sglass * 1. Redistributions of source code must retain the above copyright
121.1Sglass *    notice, this list of conditions and the following disclaimer.
131.1Sglass * 2. Redistributions in binary form must reproduce the above copyright
141.1Sglass *    notice, this list of conditions and the following disclaimer in the
151.1Sglass *    documentation and/or other materials provided with the distribution.
161.1Sglass * 3. All advertising materials mentioning features or use of this software
171.1Sglass *    must display the following acknowledgement:
181.1Sglass *	This product includes software developed by the University of
191.1Sglass *	California, Berkeley and its contributors.
201.1Sglass * 4. Neither the name of the University nor the names of its contributors
211.1Sglass *    may be used to endorse or promote products derived from this software
221.1Sglass *    without specific prior written permission.
231.1Sglass *
241.1Sglass * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
251.1Sglass * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
261.1Sglass * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
271.1Sglass * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
281.1Sglass * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
291.1Sglass * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
301.1Sglass * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
311.1Sglass * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
321.1Sglass * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
331.1Sglass * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
341.1Sglass * SUCH DAMAGE.
351.1Sglass */
361.1Sglass
371.1Sglass#include <machine/machAsmDefs.h>
381.1Sglass
391.1Sglass#if defined(LIBC_SCCS) && !defined(lint)
401.1Sglass	ASMSTR("from: @(#)fabs.s	8.1 (Berkeley) 2/16/94")
411.3Smycroft	ASMSTR("$Id: fabs.S,v 1.3 1994/12/15 17:24:47 mycroft Exp $")
421.1Sglass#endif /* LIBC_SCCS and not lint */
431.1Sglass
441.1Sglass	.set	noreorder
451.1Sglass
461.1Sglass/*
471.1Sglass * fabs(x)
481.1Sglass *	double x;
491.1Sglass *
501.1Sglass * Return absolute value of x.
511.1Sglass */
521.3SmycroftLEAF(fabs)
531.1Sglass	j	ra
541.1Sglass	abs.d	$f0, $f12		# compute absolute value of x
551.3SmycroftEND(fabs)
56