div.S revision 108176
11849Swollman/* 2108176Skan * Copyright (c) 1993 Winning Strategies, Inc. 3108176Skan * All rights reserved. 4108176Skan * 5108176Skan * Redistribution and use in source and binary forms, with or without 6108176Skan * modification, are permitted provided that the following conditions 7108176Skan * are met: 8108176Skan * 1. Redistributions of source code must retain the above copyright 9108176Skan * notice, this list of conditions and the following disclaimer. 10108176Skan * 2. Redistributions in binary form must reproduce the above copyright 11108176Skan * notice, this list of conditions and the following disclaimer in the 12108176Skan * documentation and/or other materials provided with the distribution. 13108176Skan * 3. All advertising materials mentioning features or use of this software 14108176Skan * must display the following acknowledgement: 15108176Skan * This product includes software developed by Winning Strategies, Inc. 16108176Skan * 4. The name of the author may not be used to endorse or promote products 17108176Skan * derived from this software without specific prior written permission 18108176Skan * 19108176Skan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20108176Skan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21108176Skan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22108176Skan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23108176Skan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24108176Skan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25108176Skan * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26108176Skan * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27108176Skan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28108176Skan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 291849Swollman */ 301849Swollman 3185437Speter#include <machine/asm.h> 3293000Sobrien__FBSDID("$FreeBSD: head/lib/libc/i386/stdlib/div.S 108176 2002-12-22 06:41:09Z kan $"); 331849Swollman 341849SwollmanENTRY(div) 35108176Skan movl 4(%esp),%eax 36108176Skan movl 8(%esp),%ecx 37108176Skan cdq 38108176Skan idiv %ecx 39108176Skan movl %eax,4(%esp) 40108176Skan movl %edx,8(%esp) 41108176Skan ret 42