llabs.S revision 1.2
11.2Skleink/* $NetBSD: llabs.S,v 1.2 2001/05/29 13:03:01 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 * William Jolitz. 91.1Skleink * 101.1Skleink * Redistribution and use in source and binary forms, with or without 111.1Skleink * modification, are permitted provided that the following conditions 121.1Skleink * are met: 131.1Skleink * 1. Redistributions of source code must retain the above copyright 141.1Skleink * notice, this list of conditions and the following disclaimer. 151.1Skleink * 2. Redistributions in binary form must reproduce the above copyright 161.1Skleink * notice, this list of conditions and the following disclaimer in the 171.1Skleink * documentation and/or other materials provided with the distribution. 181.1Skleink * 3. All advertising materials mentioning features or use of this software 191.1Skleink * must display the following acknowledgement: 201.1Skleink * This product includes software developed by the University of 211.1Skleink * California, Berkeley and its contributors. 221.1Skleink * 4. Neither the name of the University nor the names of its contributors 231.1Skleink * may be used to endorse or promote products derived from this software 241.1Skleink * without specific prior written permission. 251.1Skleink * 261.1Skleink * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 271.1Skleink * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 281.1Skleink * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 291.1Skleink * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 301.1Skleink * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 311.1Skleink * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 321.1Skleink * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 331.1Skleink * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 341.1Skleink * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 351.1Skleink * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 361.1Skleink * SUCH DAMAGE. 371.1Skleink * 381.1Skleink * from: @(#)abs.s 5.2 (Berkeley) 12/17/90 391.1Skleink */ 401.1Skleink 411.1Skleink#include <machine/asm.h> 421.1Skleink#if defined(LIBC_SCCS) 431.2Skleink RCSID("$NetBSD: llabs.S,v 1.2 2001/05/29 13:03:01 kleink Exp $") 441.1Skleink#endif 451.1Skleink 461.2Skleink#ifdef WEAK_ALIAS 471.2SkleinkWEAK_ALIAS(llabs, llabs) 481.2Skleink#endif 491.2Skleink 501.2Skleink#ifdef WEAK_ALIAS 511.1SkleinkENTRY(llabs) 521.2Skleink#else 531.2SkleinkENTRY(_llabs) 541.2Skleink#endif 551.1Skleink movl 8(%esp),%edx 561.1Skleink movl 4(%esp),%eax 571.1Skleink testl %edx,%edx 581.1Skleink jns 1f 591.1Skleink negl %eax 601.1Skleink adcl $0,%edx 611.1Skleink negl %edx 621.1Skleink1: ret 63