ldiv.S revision 1849
13071Sache/*
23071Sache * Copyright (c) 1993 Winning Strategies, Inc.
33071Sache * All rights reserved.
43071Sache *
53071Sache * Redistribution and use in source and binary forms, with or without
63071Sache * modification, are permitted provided that the following conditions
73071Sache * are met:
83071Sache * 1. Redistributions of source code must retain the above copyright
93071Sache *    notice, this list of conditions and the following disclaimer.
103071Sache * 2. Redistributions in binary form must reproduce the above copyright
113071Sache *    notice, this list of conditions and the following disclaimer in the
123071Sache *    documentation and/or other materials provided with the distribution.
133071Sache * 3. All advertising materials mentioning features or use of this software
143071Sache *    must display the following acknowledgement:
153071Sache *      This product includes software developed by Winning Strategies, Inc.
163071Sache * 4. The name of the author may not be used to endorse or promote products
173071Sache *    derived from this software withough specific prior written permission
183071Sache *
193071Sache * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
203071Sache * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
213071Sache * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
223071Sache * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
233071Sache * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
243071Sache * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
253071Sache * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
263071Sache * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
273071Sache * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
283071Sache * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
293071Sache *
303071Sache *	$Id: ldiv.S,v 1.1 1993/12/04 21:46:17 ats Exp $
313071Sache */
323071Sache
333071Sache#if defined(LIBC_RCS) && !defined(lint)
343071Sache	.text
353071Sache        .asciz "$Id: ldiv.S,v 1.1 1993/12/04 21:46:17 ats Exp $"
363071Sache#endif /* LIBC_RCS and not lint */
373071Sache
383071Sache#include "DEFS.h"
393071Sache
403071SacheENTRY(ldiv)
413071Sache        movl    4(%esp),%eax
423071Sache        movl    8(%esp),%ecx
433071Sache        cdq
443071Sache        idiv    %ecx
453071Sache        movl    %eax,4(%esp)
463071Sache        movl    %edx,8(%esp)
473071Sache        ret
483071Sache