Parent Directory | Revision Log
Revision 1.1 - (view) (download)
1 : | Isibaar | 1.1 | ;/**************************************************************************** |
2 : | ; * | ||
3 : | ; * XVID MPEG-4 VIDEO CODEC | ||
4 : | ; * - NASM common header - | ||
5 : | ; * | ||
6 : | ; * Copyright (C) 2008 Michael Militzer | ||
7 : | ; * | ||
8 : | ; * This program is free software ; you can redistribute it and/or modify | ||
9 : | ; * it under the terms of the GNU General Public License as published by | ||
10 : | ; * the Free Software Foundation ; either version 2 of the License, or | ||
11 : | ; * (at your option) any later version. | ||
12 : | ; * | ||
13 : | ; * This program is distributed in the hope that it will be useful, | ||
14 : | ; * but WITHOUT ANY WARRANTY ; without even the implied warranty of | ||
15 : | ; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 : | ; * GNU General Public License for more details. | ||
17 : | ; * | ||
18 : | ; * You should have received a copy of the GNU General Public License | ||
19 : | ; * along with this program ; if not, write to the Free Software | ||
20 : | ; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 : | ; * | ||
22 : | ; * $Id: cbp_3dne.asm,v 1.7 2008/11/11 20:46:24 Isibaar Exp $ | ||
23 : | ; * | ||
24 : | ; ***************************************************************************/ | ||
25 : | |||
26 : | %ifdef ARCH_IS_X86_64 | ||
27 : | |||
28 : | BITS 64 | ||
29 : | DEFAULT REL | ||
30 : | |||
31 : | %define SECTION_ALIGN 32 | ||
32 : | |||
33 : | %ifdef WINDOWS | ||
34 : | |||
35 : | %define prm1 rcx | ||
36 : | %define prm2 rdx | ||
37 : | %define prm3 r8 | ||
38 : | %define prm4 r9 | ||
39 : | %define prm5 [rsp+40] | ||
40 : | %define prm6 [rsp+48] | ||
41 : | %define prm7 [rsp+56] | ||
42 : | %define prm8 [rsp+64] | ||
43 : | |||
44 : | %define prm1d ecx | ||
45 : | %define prm2d edx | ||
46 : | %define prm3d r8d | ||
47 : | %define prm4d r9d | ||
48 : | %define prm5d dword prm5 | ||
49 : | %define prm6d dword prm6 | ||
50 : | %define prm7d dword prm7 | ||
51 : | %define prm8d dword prm8 | ||
52 : | |||
53 : | %else ; Linux | ||
54 : | |||
55 : | %define prm1 rdi | ||
56 : | %define prm2 rsi | ||
57 : | %define prm3 rdx | ||
58 : | %define prm4 rcx | ||
59 : | %define prm5 r8 | ||
60 : | %define prm6 r9 | ||
61 : | %define prm7 [rsp+8] | ||
62 : | %define prm8 [rsp+16] | ||
63 : | |||
64 : | %define prm1d edi | ||
65 : | %define prm2d esi | ||
66 : | %define prm3d edx | ||
67 : | %define prm4d ecx | ||
68 : | %define prm5d r8d | ||
69 : | %define prm6d r9d | ||
70 : | %define prm7d dword prm7 | ||
71 : | %define prm8d dword prm8 | ||
72 : | |||
73 : | %endif | ||
74 : | |||
75 : | %define _EAX rax | ||
76 : | %define _EBX rbx | ||
77 : | %define _ECX rcx | ||
78 : | %define _EDX rdx | ||
79 : | %define _ESI rsi | ||
80 : | %define _EDI rdi | ||
81 : | %define _EBP rbp | ||
82 : | %define _ESP rsp | ||
83 : | |||
84 : | %define TMP0 r10 | ||
85 : | %define TMP1 r11 | ||
86 : | |||
87 : | %define TMP0d r10d | ||
88 : | %define TMP1d r11d | ||
89 : | |||
90 : | %define PTR_SIZE 8 | ||
91 : | %define PTR_TYPE qword | ||
92 : | |||
93 : | %else | ||
94 : | |||
95 : | %define SECTION_ALIGN 16 | ||
96 : | |||
97 : | BITS 32 | ||
98 : | |||
99 : | %define prm1 [esp + 4] | ||
100 : | %define prm2 [esp + 8] | ||
101 : | %define prm3 [esp + 12] | ||
102 : | %define prm4 [esp + 16] | ||
103 : | %define prm5 [esp + 20] | ||
104 : | %define prm6 [esp + 24] | ||
105 : | %define prm7 [esp + 28] | ||
106 : | %define prm8 [esp + 32] | ||
107 : | |||
108 : | %define prm1d dword prm1 | ||
109 : | %define prm2d dword prm2 | ||
110 : | %define prm3d dword prm3 | ||
111 : | %define prm4d dword prm4 | ||
112 : | %define prm5d dword prm5 | ||
113 : | %define prm6d dword prm6 | ||
114 : | %define prm7d dword prm7 | ||
115 : | %define prm8d dword prm8 | ||
116 : | |||
117 : | %define _EAX eax | ||
118 : | %define _EBX ebx | ||
119 : | %define _ECX ecx | ||
120 : | %define _EDX edx | ||
121 : | %define _ESI esi | ||
122 : | %define _EDI edi | ||
123 : | %define _EBP ebp | ||
124 : | %define _ESP esp | ||
125 : | |||
126 : | %define TMP0 ecx | ||
127 : | %define TMP1 edx | ||
128 : | |||
129 : | %define TMP0d ecx | ||
130 : | %define TMP1d edx | ||
131 : | |||
132 : | %define PTR_SIZE 4 | ||
133 : | %define PTR_TYPE dword | ||
134 : | |||
135 : | %endif | ||
136 : | |||
137 : | |||
138 : | %ifdef WINDOWS | ||
139 : | %define PREFIX | ||
140 : | %endif | ||
141 : | |||
142 : | %macro DATA 0 | ||
143 : | %ifdef FORMAT_COFF | ||
144 : | SECTION .rodata | ||
145 : | %else | ||
146 : | SECTION .rodata align=SECTION_ALIGN | ||
147 : | %endif | ||
148 : | %endmacro | ||
149 : | |||
150 : | %macro cglobal 1 | ||
151 : | %ifdef PREFIX | ||
152 : | %ifdef MARK_FUNCS | ||
153 : | global _%1:function %1.endfunc-%1 | ||
154 : | %define %1 _%1:function %1.endfunc-%1 | ||
155 : | %define ENDFUNC .endfunc: | ||
156 : | %else | ||
157 : | global _%1 | ||
158 : | %define %1 _%1 | ||
159 : | %define ENDFUNC | ||
160 : | %endif | ||
161 : | %else | ||
162 : | %ifdef MARK_FUNCS | ||
163 : | global %1:function %1.endfunc-%1 | ||
164 : | %define ENDFUNC .endfunc: | ||
165 : | %else | ||
166 : | global %1 | ||
167 : | %define ENDFUNC | ||
168 : | %endif | ||
169 : | %endif | ||
170 : | %endmacro |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |