This commit was manufactured by cvs2svn to create branch 'captive'.
[reactos.git] / lib / ntdll / rtl / i386 / allmul.s
1 /* $Id$
2  *
3  * COPYRIGHT:         See COPYING in the top level directory
4  * PROJECT:           ReactOS kernel
5  * PURPOSE:           Math support for IA-32
6  * FILE:              lib/ntdll/rtl/i386/allmul.s
7  * PROGRAMER:         Eric Kohl (ekohl@rz-online.de)
8  */
9
10 /*
11  * long long
12  * __allmul(long long Multiplier, long long Multiplicand);
13  *
14  * Parameters:
15  *   [ESP+04h] - long long Multiplier
16  *   [ESP+0Ch] - long long Multiplicand
17  * Registers:
18  *   Unknown
19  * Returns:
20  *   EDX:EAX - long long product (Multiplier*Multiplicand)
21  * Notes:
22  *   Routine removes the arguments from the stack.
23  */
24 .globl __allmul
25 __allmul:
26         pushl   %ebp
27         movl    %esp, %ebp
28         pushl   %edi
29         pushl   %esi
30         pushl   %ebx
31         subl    $12, %esp
32         movl    16(%ebp), %ebx
33         movl    8(%ebp), %eax
34         mull    %ebx
35         movl    20(%ebp), %ecx
36         movl    %eax, -24(%ebp)
37         movl    8(%ebp), %eax
38         movl    %edx, %esi
39         imull   %ecx, %eax
40         addl    %eax, %esi
41         movl    12(%ebp), %eax
42         imull   %eax, %ebx
43         leal    (%ebx,%esi), %eax
44         movl    %eax, -20(%ebp)
45         movl    -24(%ebp), %eax
46         movl    -20(%ebp), %edx
47         addl    $12, %esp
48         popl    %ebx
49         popl    %esi
50         popl    %edi
51         popl    %ebp
52         ret             $0x10
53
54 /* EOF */