]>
Commit | Line | Data |
---|---|---|
97f98500 HT |
1 | #------------------------------------------------------------------------------\r |
2 | #\r | |
3 | # Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r | |
4 | # This program and the accompanying materials\r | |
5 | # are licensed and made available under the terms and conditions of the BSD License\r | |
6 | # which accompanies this distribution. The full text of the license may be found at\r | |
7 | # http://opensource.org/licenses/bsd-license.php.\r | |
8 | #\r | |
9 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | #\r | |
12 | # Module Name:\r | |
13 | #\r | |
14 | # MathMultS64x64.S\r | |
15 | #\r | |
16 | # Abstract:\r | |
17 | #\r | |
18 | # 64-bit Math Worker Function.\r | |
19 | # Multiplies a 64-bit signed or unsigned value by a 64-bit signed or unsigned value\r | |
20 | # and returns a 64-bit result\r | |
21 | #\r | |
22 | #------------------------------------------------------------------------------\r | |
23 | \r | |
24 | .686:\r | |
25 | .code:\r | |
26 | \r | |
27 | ASM_GLOBAL ASM_PFX(_mulll), ASM_PFX(MultS64x64)\r | |
28 | \r | |
29 | #------------------------------------------------------------------------------\r | |
30 | #\r | |
31 | # void __cdecl __mulll (void)\r | |
32 | #\r | |
33 | #------------------------------------------------------------------------------\r | |
34 | ASM_PFX(__mulll):\r | |
35 | # Original local stack when calling __mulll\r | |
36 | # -----------------\r | |
37 | # | |\r | |
38 | # |---------------|\r | |
39 | # | |\r | |
40 | # |--Multiplier --|\r | |
41 | # | |\r | |
42 | # |---------------|\r | |
43 | # | |\r | |
44 | # |--Multiplicand-|\r | |
45 | # | |\r | |
46 | # |---------------|\r | |
47 | # | ReturnAddr** |\r | |
48 | # ESP---->|---------------|\r | |
49 | #\r | |
50 | \r | |
51 | #\r | |
52 | # Set up the local stack for Multiplicand parameter\r | |
53 | #\r | |
54 | movl 16(%esp), %eax\r | |
55 | push %eax\r | |
56 | movl 16(%esp), %eax\r | |
57 | push %eax\r | |
58 | \r | |
59 | #\r | |
60 | # Set up the local stack for Multiplier parameter\r | |
61 | #\r | |
62 | movl 16(%esp), %eax\r | |
63 | push %eax\r | |
64 | movl 16(%esp), %eax\r | |
65 | push %eax\r | |
66 | \r | |
67 | #\r | |
68 | # Call native MulS64x64 of BaseLib\r | |
69 | #\r | |
70 | jmp ASM_PFX(MultS64x64)\r | |
71 | \r | |
72 | #\r | |
73 | # Adjust stack\r | |
74 | #\r | |
75 | add $16, %esp\r | |
76 | \r | |
77 | ret $16\r |