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