ldiv.S revision 85437
1178476Sjb/* 2178476Sjb * Copyright (c) 1993 Winning Strategies, Inc. 3178476Sjb * All rights reserved. 4178476Sjb * 5178476Sjb * Redistribution and use in source and binary forms, with or without 6178476Sjb * modification, are permitted provided that the following conditions 7178476Sjb * are met: 8178476Sjb * 1. Redistributions of source code must retain the above copyright 9178476Sjb * notice, this list of conditions and the following disclaimer. 10178476Sjb * 2. Redistributions in binary form must reproduce the above copyright 11178476Sjb * notice, this list of conditions and the following disclaimer in the 12178476Sjb * documentation and/or other materials provided with the distribution. 13178476Sjb * 3. All advertising materials mentioning features or use of this software 14178476Sjb * must display the following acknowledgement: 15178476Sjb * This product includes software developed by Winning Strategies, Inc. 16178476Sjb * 4. The name of the author may not be used to endorse or promote products 17178476Sjb * derived from this software withough specific prior written permission 18178476Sjb * 19178476Sjb * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20178476Sjb * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21178476Sjb * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22178476Sjb * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23178476Sjb * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24178476Sjb * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25178476Sjb * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26178476Sjb * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27178476Sjb * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28178476Sjb * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29178476Sjb */ 30178476Sjb 31178476Sjb#if defined(LIBC_RCS) && !defined(lint) 32178476Sjb .text 33178476Sjb .asciz "$FreeBSD: head/lib/libc/i386/stdlib/ldiv.S 85437 2001-10-24 20:29:14Z peter $" 34178476Sjb#endif /* LIBC_RCS and not lint */ 35178476Sjb 36178476Sjb#include <machine/asm.h> 37178476Sjb 38178476SjbENTRY(ldiv) 39178476Sjb movl 4(%esp),%eax 40178476Sjb movl 8(%esp),%ecx 41178476Sjb cdq 42178476Sjb idiv %ecx 43178476Sjb movl %eax,4(%esp) 44178476Sjb movl %edx,8(%esp) 45178476Sjb ret 46178476Sjb