1/*- 2 * Copyright (c) 2008 3 * Thorsten Glaser <tg@mirbsd.org> 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Provided that these terms and disclaimer and all copyright notices 9 * are retained or reproduced in an accompanying document, permission 10 * is granted to deal in this work without restriction, including un- 11 * limited rights to use, publicly perform, distribute, sell, modify, 12 * merge, give away, or sublicence. 13 * 14 * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to 15 * the utmost extent permitted by applicable law, neither express nor 16 * implied; without malicious intent or gross negligence. In no event 17 * may a licensor, author or contributor be held liable for indirect, 18 * direct, other damage, loss, or other issues arising in any way out 19 * of dealing in the work, even if advised of the possibility of such 20 * damage or existence of a defect, except proven that it results out 21 * of said person's immediate fault when using the work as intended. 22 */ 23 24#include <machine/asm.h> 25 26RCSID("$MirOS: src/kern/c/i386/divsi3.S,v 1.1 2008/08/01 16:45:04 tg Exp $") 27 28 .intel_syntax noprefix 29 .text 30 31ENTRY(__divsi3) 32 mov eax,[esp+4] 33 cdq 34 idiv dword ptr [esp+8] 35 ret 36