[svn] / branches / release-1_3-branch / xvidcore / src / nasm.inc Repository:
ViewVC logotype

Annotation of /branches/release-1_3-branch/xvidcore/src/nasm.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1833 - (view) (download)
Original Path: trunk/xvidcore/src/nasm.inc

1 : Isibaar 1795 ;/****************************************************************************
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 : Isibaar 1833 ; * $Id: nasm.inc,v 1.3 2008-12-01 14:45:45 Isibaar Exp $
23 : Isibaar 1795 ; *
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 : Isibaar 1833 %macro PUSH_XMM6_XMM7 0
54 :     movdqa [_ESP+PTR_SIZE], xmm6
55 :     movdqa [_ESP+PTR_SIZE+16], xmm7
56 :     %endmacro
57 :    
58 :     %macro POP_XMM6_XMM7 0
59 :     movdqa xmm6, [_ESP+PTR_SIZE]
60 :     movdqa xmm7, [_ESP+PTR_SIZE+16]
61 :     %endmacro
62 :    
63 : Isibaar 1795 %else ; Linux
64 :    
65 :     %define prm1 rdi
66 :     %define prm2 rsi
67 :     %define prm3 rdx
68 :     %define prm4 rcx
69 :     %define prm5 r8
70 :     %define prm6 r9
71 :     %define prm7 [rsp+8]
72 :     %define prm8 [rsp+16]
73 :    
74 :     %define prm1d edi
75 :     %define prm2d esi
76 :     %define prm3d edx
77 :     %define prm4d ecx
78 :     %define prm5d r8d
79 :     %define prm6d r9d
80 :     %define prm7d dword prm7
81 :     %define prm8d dword prm8
82 :    
83 : Isibaar 1833 %define PUSH_XMM6_XMM7
84 :     %define POP_XMM6_XMM7
85 :    
86 : Isibaar 1795 %endif
87 :    
88 :     %define _EAX rax
89 :     %define _EBX rbx
90 :     %define _ECX rcx
91 :     %define _EDX rdx
92 :     %define _ESI rsi
93 :     %define _EDI rdi
94 :     %define _EBP rbp
95 :     %define _ESP rsp
96 :    
97 :     %define TMP0 r10
98 :     %define TMP1 r11
99 :    
100 :     %define TMP0d r10d
101 :     %define TMP1d r11d
102 :    
103 :     %define PTR_SIZE 8
104 :     %define PTR_TYPE qword
105 :    
106 : Isibaar 1833
107 : Isibaar 1795 %else
108 :    
109 :     %define SECTION_ALIGN 16
110 :    
111 :     BITS 32
112 :    
113 :     %define prm1 [esp + 4]
114 :     %define prm2 [esp + 8]
115 :     %define prm3 [esp + 12]
116 :     %define prm4 [esp + 16]
117 :     %define prm5 [esp + 20]
118 :     %define prm6 [esp + 24]
119 :     %define prm7 [esp + 28]
120 :     %define prm8 [esp + 32]
121 :    
122 :     %define prm1d dword prm1
123 :     %define prm2d dword prm2
124 :     %define prm3d dword prm3
125 :     %define prm4d dword prm4
126 :     %define prm5d dword prm5
127 :     %define prm6d dword prm6
128 :     %define prm7d dword prm7
129 :     %define prm8d dword prm8
130 :    
131 :     %define _EAX eax
132 :     %define _EBX ebx
133 :     %define _ECX ecx
134 :     %define _EDX edx
135 :     %define _ESI esi
136 :     %define _EDI edi
137 :     %define _EBP ebp
138 :     %define _ESP esp
139 :    
140 :     %define TMP0 ecx
141 :     %define TMP1 edx
142 :    
143 :     %define TMP0d ecx
144 :     %define TMP1d edx
145 :    
146 :     %define PTR_SIZE 4
147 :     %define PTR_TYPE dword
148 :    
149 : Isibaar 1833 %define PUSH_XMM6_XMM7
150 :     %define POP_XMM6_XMM7
151 :    
152 : Isibaar 1795 %endif
153 :    
154 :    
155 :     %ifdef WINDOWS
156 :     %define PREFIX
157 :     %endif
158 :    
159 : Isibaar 1827 %ifdef NO_PREFIX
160 :     %undef PREFIX
161 :     %endif
162 :    
163 : Isibaar 1795 %macro DATA 0
164 :     %ifdef FORMAT_COFF
165 :     SECTION .rodata
166 :     %else
167 :     SECTION .rodata align=SECTION_ALIGN
168 :     %endif
169 :     %endmacro
170 :    
171 :     %macro cglobal 1
172 :     %ifdef PREFIX
173 :     %ifdef MARK_FUNCS
174 :     global _%1:function %1.endfunc-%1
175 :     %define %1 _%1:function %1.endfunc-%1
176 :     %define ENDFUNC .endfunc:
177 :     %else
178 :     global _%1
179 :     %define %1 _%1
180 :     %define ENDFUNC
181 :     %endif
182 :     %else
183 :     %ifdef MARK_FUNCS
184 :     global %1:function %1.endfunc-%1
185 :     %define ENDFUNC .endfunc:
186 :     %else
187 :     global %1
188 :     %define ENDFUNC
189 :     %endif
190 :     %endif
191 :     %endmacro

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4