lzo: update to 2.09
[tomato.git] / release / src / router / lzo / include / lzo / lzo_asm.h
blob5a654bf7c0bdbdfef6908235d0f51ab00d81df3e
1 /* lzo_asm.h -- assembler prototypes for the LZO data compression library
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/
29 #ifndef __LZO_ASM_H_INCLUDED
30 #define __LZO_ASM_H_INCLUDED 1
32 #ifndef __LZOCONF_H_INCLUDED
33 #include <lzo/lzoconf.h>
34 #endif
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
41 /***********************************************************************
42 // i386 assembly decompressors
44 // NOTE:
45 // ====
47 // - For reasons of speed all fast assembler decompressors (having '_fast'
48 // in their name) can access (write to) up to 3 bytes past the end of
49 // the decompressed ("dst") block. Data past the end of the compressed
50 // ("src") block is never accessed (read from).
51 // [ technical note: because data is transferred in 32-bit units ]
53 // - Please also see asm/i386/00README.TXT and doc/LZO.FAQ for more
54 // important details about the assembler versions.
56 ************************************************************************/
58 LZO_EXTERN(int) lzo1c_decompress_asm
59 (const lzo_bytep src, lzo_uint src_len,
60 lzo_bytep dst, lzo_uintp dst_len,
61 lzo_voidp wrkmem);
62 LZO_EXTERN(int) lzo1c_decompress_asm_safe
63 (const lzo_bytep src, lzo_uint src_len,
64 lzo_bytep dst, lzo_uintp dst_len,
65 lzo_voidp wrkmem);
67 LZO_EXTERN(int) lzo1f_decompress_asm_fast
68 (const lzo_bytep src, lzo_uint src_len,
69 lzo_bytep dst, lzo_uintp dst_len,
70 lzo_voidp wrkmem);
71 LZO_EXTERN(int) lzo1f_decompress_asm_fast_safe
72 (const lzo_bytep src, lzo_uint src_len,
73 lzo_bytep dst, lzo_uintp dst_len,
74 lzo_voidp wrkmem);
76 LZO_EXTERN(int) lzo1x_decompress_asm
77 (const lzo_bytep src, lzo_uint src_len,
78 lzo_bytep dst, lzo_uintp dst_len,
79 lzo_voidp wrkmem);
80 LZO_EXTERN(int) lzo1x_decompress_asm_safe
81 (const lzo_bytep src, lzo_uint src_len,
82 lzo_bytep dst, lzo_uintp dst_len,
83 lzo_voidp wrkmem);
84 LZO_EXTERN(int) lzo1x_decompress_asm_fast
85 (const lzo_bytep src, lzo_uint src_len,
86 lzo_bytep dst, lzo_uintp dst_len,
87 lzo_voidp wrkmem);
88 LZO_EXTERN(int) lzo1x_decompress_asm_fast_safe
89 (const lzo_bytep src, lzo_uint src_len,
90 lzo_bytep dst, lzo_uintp dst_len,
91 lzo_voidp wrkmem);
93 LZO_EXTERN(int) lzo1y_decompress_asm
94 (const lzo_bytep src, lzo_uint src_len,
95 lzo_bytep dst, lzo_uintp dst_len,
96 lzo_voidp wrkmem);
97 LZO_EXTERN(int) lzo1y_decompress_asm_safe
98 (const lzo_bytep src, lzo_uint src_len,
99 lzo_bytep dst, lzo_uintp dst_len,
100 lzo_voidp wrkmem);
101 LZO_EXTERN(int) lzo1y_decompress_asm_fast
102 (const lzo_bytep src, lzo_uint src_len,
103 lzo_bytep dst, lzo_uintp dst_len,
104 lzo_voidp wrkmem);
105 LZO_EXTERN(int) lzo1y_decompress_asm_fast_safe
106 (const lzo_bytep src, lzo_uint src_len,
107 lzo_bytep dst, lzo_uintp dst_len,
108 lzo_voidp wrkmem);
111 /***********************************************************************
112 // checksum and misc functions
113 ************************************************************************/
115 #if 0
117 LZO_EXTERN(lzo_uint32_t)
118 lzo_crc32_asm(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len,
119 const lzo_uint32_tp tab);
121 LZO_EXTERN(lzo_uint32_t)
122 lzo_crc32_asm_small(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len);
124 LZO_EXTERN(int)
125 lzo_cpuid_asm(lzo_uint32_tp /* lzo_uint32_t info[16] */ );
127 LZO_EXTERN(lzo_uint32_t)
128 lzo_rdtsc_asm(lzo_uint32_tp /* lzo_uint32_t ticks[2] */ );
130 #endif
133 #ifdef __cplusplus
134 } /* extern "C" */
135 #endif
137 #endif /* already included */
140 /* vim:set ts=4 sw=4 et: */