lzo: update to 2.09
[tomato.git] / release / src / router / lzo / asm / i386 / src_nasm / asminit.def
blob773cf997ca0f0395f31cb5c7bf85010c445a7e62
1 ; asminit.def --
3 ; This file is part of the LZO real-time data compression library.
5 ; Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer
6 ; All Rights Reserved.
8 ; The LZO library is free software; you can redistribute it and/or
9 ; modify it under the terms of the GNU General Public License as
10 ; published by the Free Software Foundation; either version 2 of
11 ; the License, or (at your option) any later version.
13 ; The LZO library 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.
18 ; You should have received a copy of the GNU General Public License
19 ; along with the LZO library; see the file COPYING.
20 ; If not, write to the Free Software Foundation, Inc.,
21 ; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 ; Markus F.X.J. Oberhumer
24 ; <markus@oberhumer.com>
25 ; http://www.oberhumer.com/opensource/lzo/
28 bits 32
29 %ifndef __OUTPUT_FORMAT__
30 %error "__OUTPUT_FORMAT__ is not defined"
31 %endif
32 %ifidni __OUTPUT_FORMAT__,elf
33 %undef __OUTPUT_FORMAT__
34 %define __OUTPUT_FORMAT__ elf32
35 %endif
36 %ifidni __OUTPUT_FORMAT__,macho
37 %undef __OUTPUT_FORMAT__
38 %define __OUTPUT_FORMAT__ macho32
39 %endif
40 %ifidni __OUTPUT_FORMAT__,win
41 %undef __OUTPUT_FORMAT__
42 %define __OUTPUT_FORMAT__ win32
43 %endif
44 %ifdef __YASM_MAJOR__
45 %ifidni __OUTPUT_FORMAT__,x64
46 %undef __OUTPUT_FORMAT__
47 %define __OUTPUT_FORMAT__ win64
48 %endif
49 %endif
51 %ifndef NAME1
52 %ifidni __OUTPUT_FORMAT__,macho32
53 %define NAME1(a) _ %+ a
54 %elifidni __OUTPUT_FORMAT__,macho64
55 %define NAME1(a) _ %+ a
56 %else
57 %define NAME1(a) _ %+ a
58 %define NAME2(a) a
59 %endif
60 %endif
62 %ifidni __OUTPUT_FORMAT__,elf32
63 %define globalf(a) global a:function (a %+ _end - a)
64 ;define globalfh(a) global a:function hidden
65 %define globalfh(a) global a:function hidden (a %+ _end - a)
66 %define globalf_end(a) a %+ _end:
67 %elifidni __OUTPUT_FORMAT__,elf64
68 %define globalf(a) global a:function (a %+ _end - a)
69 ;define globalfh(a) global a:function hidden
70 %define globalfh(a) global a:function hidden (a %+ _end - a)
71 %define globalf_end(a) a %+ _end:
72 %else
73 %define globalf(a) global a
74 %define globalfh(a) global a
75 %define globalf_end(a)
76 %endif
78 %ifndef LZO_SEH_EXCEPTIONS
79 %ifidni __OUTPUT_FORMAT__,win64
80 %define LZO_SEH_EXCEPTIONS 1
81 %endif
82 %endif
83 %ifndef LZO_SEH_EXCEPTIONS
84 %define LZO_SEH_EXCEPTIONS 0
85 %endif
87 %ifidni __OUTPUT_FORMAT__,elf32
88 section .note.GNU-stack noalloc noexec nowrite progbits
89 %elifidni __OUTPUT_FORMAT__,elf64
90 section .note.GNU-stack noalloc noexec nowrite progbits
91 %endif
92 %ifidni __OUTPUT_FORMAT__,obj
93 %if __BITS__==16
94 segment _TEXT class=CODE public use16
95 %else
96 segment _TEXT class=CODE public use32 flat
97 %endif
98 %else
99 section .text
100 %endif
101 %ifidni __OUTPUT_FORMAT__,elf32
102 align 64
103 %elifidni __OUTPUT_FORMAT__,elf64
104 align 64
105 %elifidni __OUTPUT_FORMAT__,macho32
106 align 64
107 %elifidni __OUTPUT_FORMAT__,macho64
108 align 64
109 %elifidni __OUTPUT_FORMAT__,win32
110 align 64
111 %elifidni __OUTPUT_FORMAT__,win64
112 align 64
113 %else
114 align 16
115 %endif