ldiv.S revision 184548
1280031Sdim/* 2198090Srdivacky * Copyright (c) 1993 Winning Strategies, Inc. 3353358Sdim * All rights reserved. 4353358Sdim * 5353358Sdim * Redistribution and use in source and binary forms, with or without 6198090Srdivacky * modification, are permitted provided that the following conditions 7198090Srdivacky * are met: 8198090Srdivacky * 1. Redistributions of source code must retain the above copyright 9198090Srdivacky * notice, this list of conditions and the following disclaimer. 10198090Srdivacky * 2. Redistributions in binary form must reproduce the above copyright 11198090Srdivacky * notice, this list of conditions and the following disclaimer in the 12249423Sdim * documentation and/or other materials provided with the distribution. 13314564Sdim * 3. All advertising materials mentioning features or use of this software 14249423Sdim * must display the following acknowledgement: 15198090Srdivacky * This product includes software developed by Winning Strategies, Inc. 16314564Sdim * 4. The name of the author may not be used to endorse or promote products 17321369Sdim * derived from this software without specific prior written permission 18198090Srdivacky * 19360784Sdim * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20234353Sdim * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21234353Sdim * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22288943Sdim * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23321369Sdim * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24203954Srdivacky * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25198090Srdivacky * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26288943Sdim * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27288943Sdim * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28288943Sdim * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29254790Semaste */ 30314564Sdim 31288943Sdim#include <machine/asm.h> 32288943Sdim__FBSDID("$FreeBSD: head/lib/libc/i386/stdlib/ldiv.S 184548 2008-11-02 01:28:47Z peter $"); 33288943Sdim 34288943SdimENTRY(ldiv) 35254790Semaste movl 4(%esp),%eax 36314564Sdim movl 8(%esp),%ecx 37314564Sdim cdq 38360784Sdim idiv %ecx 39360784Sdim movl %eax,4(%esp) 40341825Sdim movl %edx,8(%esp) 41288943Sdim ret 42198090SrdivackyEND(ldiv) 43198090Srdivacky