llabs.S revision 1.2
11.2Skleink/* $NetBSD: llabs.S,v 1.2 2001/05/29 13:03:02 kleink Exp $ */ 21.1Skleink 31.1Skleink/*- 41.1Skleink * Copyright (c) 1990 The Regents of the University of California. 51.1Skleink * All rights reserved. 61.1Skleink * 71.1Skleink * This code is derived from software contributed to Berkeley by 81.1Skleink * the Systems Programming Group of the University of Utah Computer 91.1Skleink * Science Department. 101.1Skleink * 111.1Skleink * Redistribution and use in source and binary forms, with or without 121.1Skleink * modification, are permitted provided that the following conditions 131.1Skleink * are met: 141.1Skleink * 1. Redistributions of source code must retain the above copyright 151.1Skleink * notice, this list of conditions and the following disclaimer. 161.1Skleink * 2. Redistributions in binary form must reproduce the above copyright 171.1Skleink * notice, this list of conditions and the following disclaimer in the 181.1Skleink * documentation and/or other materials provided with the distribution. 191.1Skleink * 3. All advertising materials mentioning features or use of this software 201.1Skleink * must display the following acknowledgement: 211.1Skleink * This product includes software developed by the University of 221.1Skleink * California, Berkeley and its contributors. 231.1Skleink * 4. Neither the name of the University nor the names of its contributors 241.1Skleink * may be used to endorse or promote products derived from this software 251.1Skleink * without specific prior written permission. 261.1Skleink * 271.1Skleink * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 281.1Skleink * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 291.1Skleink * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 301.1Skleink * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 311.1Skleink * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 321.1Skleink * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 331.1Skleink * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 341.1Skleink * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 351.1Skleink * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 361.1Skleink * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 371.1Skleink * SUCH DAMAGE. 381.1Skleink */ 391.1Skleink 401.1Skleink#include <machine/asm.h> 411.1Skleink 421.1Skleink#if defined(LIBC_SCCS) && !defined(lint) 431.1Skleink#if 0 441.1Skleink RCSID("from: @(#)abs.s 5.1 (Berkeley) 5/12/90") 451.1Skleink#else 461.2Skleink RCSID("$NetBSD: llabs.S,v 1.2 2001/05/29 13:03:02 kleink Exp $") 471.1Skleink#endif 481.1Skleink#endif /* LIBC_SCCS and not lint */ 491.1Skleink 501.2Skleink#ifdef WEAK_ALIAS 511.2SkleinkWEAK_ALIAS(llabs, _llabs) 521.2Skleink#endif 531.1Skleink/* llabs - long long int absolute value */ 541.1Skleink 551.2Skleink#ifdef WEAK_ALIAS 561.2SkleinkENTRY(_llabs) 571.2Skleink#else 581.1SkleinkENTRY(llabs) 591.2Skleink#endif 601.1Skleink movl %sp@(8),%d1 611.1Skleink movl %sp@(4),%d0 621.1Skleink jge L1 631.1Skleink negl %d1 641.1Skleink negxl %d0 651.1SkleinkL1: 661.1Skleink rts 67