ldiv.S revision 81586
1221698Sed/*
2221698Sed * Copyright (c) 1993 Winning Strategies, Inc.
3221698Sed * All rights reserved.
4221698Sed *
5221698Sed * Redistribution and use in source and binary forms, with or without
6221698Sed * modification, are permitted provided that the following conditions
7221698Sed * are met:
8221698Sed * 1. Redistributions of source code must retain the above copyright
9221698Sed *    notice, this list of conditions and the following disclaimer.
10221698Sed * 2. Redistributions in binary form must reproduce the above copyright
11221698Sed *    notice, this list of conditions and the following disclaimer in the
12221698Sed *    documentation and/or other materials provided with the distribution.
13221698Sed * 3. All advertising materials mentioning features or use of this software
14221698Sed *    must display the following acknowledgement:
15221698Sed *      This product includes software developed by Winning Strategies, Inc.
16221698Sed * 4. The name of the author may not be used to endorse or promote products
17221698Sed *    derived from this software withough specific prior written permission
18221698Sed *
19221698Sed * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20221698Sed * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21221698Sed * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22221698Sed * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23221698Sed * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24221698Sed * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25221698Sed * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26221698Sed * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27221698Sed * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28221698Sed * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29221698Sed */
30221698Sed
31221698Sed#if defined(LIBC_RCS) && !defined(lint)
32221698Sed	.text
33221698Sed        .asciz "$FreeBSD: head/lib/libc/i386/stdlib/ldiv.S 81586 2001-08-13 14:06:34Z ru $"
34221698Sed#endif /* LIBC_RCS and not lint */
35221698Sed
36221698Sed#include "DEFS.h"
37221698Sed
38221698SedENTRY(ldiv)
39221698Sed        movl    4(%esp),%eax
40        movl    8(%esp),%ecx
41        cdq
42        idiv    %ecx
43        movl    %eax,4(%esp)
44        movl    %edx,8(%esp)
45        ret
46