Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 26 | pmbaty | 1 | /* ucl_asm.h -- assembler prototypes for the UCL data compression library |
| 2 | |||
| 3 | This file is part of the UCL data compression library. |
||
| 4 | |||
| 5 | Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer |
||
| 6 | Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer |
||
| 7 | Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer |
||
| 8 | Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer |
||
| 9 | Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer |
||
| 10 | Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer |
||
| 11 | Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer |
||
| 12 | Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer |
||
| 13 | Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer |
||
| 14 | All Rights Reserved. |
||
| 15 | |||
| 16 | The UCL library is free software; you can redistribute it and/or |
||
| 17 | modify it under the terms of the GNU General Public License as |
||
| 18 | published by the Free Software Foundation; either version 2 of |
||
| 19 | the License, or (at your option) any later version. |
||
| 20 | |||
| 21 | The UCL library is distributed in the hope that it will be useful, |
||
| 22 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
| 23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
| 24 | GNU General Public License for more details. |
||
| 25 | |||
| 26 | You should have received a copy of the GNU General Public License |
||
| 27 | along with the UCL library; see the file COPYING. |
||
| 28 | If not, write to the Free Software Foundation, Inc., |
||
| 29 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
||
| 30 | |||
| 31 | Markus F.X.J. Oberhumer |
||
| 32 | <markus@oberhumer.com> |
||
| 33 | http://www.oberhumer.com/opensource/ucl/ |
||
| 34 | */ |
||
| 35 | |||
| 36 | |||
| 37 | #ifndef __UCL_ASM_H_INCLUDED |
||
| 38 | #define __UCL_ASM_H_INCLUDED |
||
| 39 | |||
| 40 | #ifndef __UCLCONF_H_INCLUDED |
||
| 41 | #include <ucl/uclconf.h> |
||
| 42 | #endif |
||
| 43 | |||
| 44 | #ifdef __cplusplus |
||
| 45 | extern "C" { |
||
| 46 | #endif |
||
| 47 | |||
| 48 | |||
| 49 | /*********************************************************************** |
||
| 50 | // NRV2B assembly decompressors |
||
| 51 | ************************************************************************/ |
||
| 52 | |||
| 53 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_8 |
||
| 54 | (const ucl_bytep src, ucl_uint src_len, |
||
| 55 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 56 | ucl_voidp wrkmem); |
||
| 57 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_safe_8 |
||
| 58 | (const ucl_bytep src, ucl_uint src_len, |
||
| 59 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 60 | ucl_voidp wrkmem); |
||
| 61 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_fast_8 |
||
| 62 | (const ucl_bytep src, ucl_uint src_len, |
||
| 63 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 64 | ucl_voidp wrkmem); |
||
| 65 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_fast_safe_8 |
||
| 66 | (const ucl_bytep src, ucl_uint src_len, |
||
| 67 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 68 | ucl_voidp wrkmem); |
||
| 69 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_small_8 |
||
| 70 | (const ucl_bytep src, ucl_uint src_len, |
||
| 71 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 72 | ucl_voidp wrkmem); |
||
| 73 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_small_safe_8 |
||
| 74 | (const ucl_bytep src, ucl_uint src_len, |
||
| 75 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 76 | ucl_voidp wrkmem); |
||
| 77 | |||
| 78 | |||
| 79 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_le16 |
||
| 80 | (const ucl_bytep src, ucl_uint src_len, |
||
| 81 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 82 | ucl_voidp wrkmem); |
||
| 83 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_safe_le16 |
||
| 84 | (const ucl_bytep src, ucl_uint src_len, |
||
| 85 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 86 | ucl_voidp wrkmem); |
||
| 87 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_fast_le16 |
||
| 88 | (const ucl_bytep src, ucl_uint src_len, |
||
| 89 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 90 | ucl_voidp wrkmem); |
||
| 91 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_fast_safe_le16 |
||
| 92 | (const ucl_bytep src, ucl_uint src_len, |
||
| 93 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 94 | ucl_voidp wrkmem); |
||
| 95 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_small_le16 |
||
| 96 | (const ucl_bytep src, ucl_uint src_len, |
||
| 97 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 98 | ucl_voidp wrkmem); |
||
| 99 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_small_safe_le16 |
||
| 100 | (const ucl_bytep src, ucl_uint src_len, |
||
| 101 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 102 | ucl_voidp wrkmem); |
||
| 103 | |||
| 104 | |||
| 105 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_le32 |
||
| 106 | (const ucl_bytep src, ucl_uint src_len, |
||
| 107 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 108 | ucl_voidp wrkmem); |
||
| 109 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_safe_le32 |
||
| 110 | (const ucl_bytep src, ucl_uint src_len, |
||
| 111 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 112 | ucl_voidp wrkmem); |
||
| 113 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_fast_le32 |
||
| 114 | (const ucl_bytep src, ucl_uint src_len, |
||
| 115 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 116 | ucl_voidp wrkmem); |
||
| 117 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_fast_safe_le32 |
||
| 118 | (const ucl_bytep src, ucl_uint src_len, |
||
| 119 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 120 | ucl_voidp wrkmem); |
||
| 121 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_small_le32 |
||
| 122 | (const ucl_bytep src, ucl_uint src_len, |
||
| 123 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 124 | ucl_voidp wrkmem); |
||
| 125 | UCL_EXTERN(int) ucl_nrv2b_decompress_asm_small_safe_le32 |
||
| 126 | (const ucl_bytep src, ucl_uint src_len, |
||
| 127 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 128 | ucl_voidp wrkmem); |
||
| 129 | |||
| 130 | |||
| 131 | /*********************************************************************** |
||
| 132 | // NRV2D assembly decompressors |
||
| 133 | ************************************************************************/ |
||
| 134 | |||
| 135 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_8 |
||
| 136 | (const ucl_bytep src, ucl_uint src_len, |
||
| 137 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 138 | ucl_voidp wrkmem); |
||
| 139 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_safe_8 |
||
| 140 | (const ucl_bytep src, ucl_uint src_len, |
||
| 141 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 142 | ucl_voidp wrkmem); |
||
| 143 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_fast_8 |
||
| 144 | (const ucl_bytep src, ucl_uint src_len, |
||
| 145 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 146 | ucl_voidp wrkmem); |
||
| 147 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_fast_safe_8 |
||
| 148 | (const ucl_bytep src, ucl_uint src_len, |
||
| 149 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 150 | ucl_voidp wrkmem); |
||
| 151 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_small_8 |
||
| 152 | (const ucl_bytep src, ucl_uint src_len, |
||
| 153 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 154 | ucl_voidp wrkmem); |
||
| 155 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_small_safe_8 |
||
| 156 | (const ucl_bytep src, ucl_uint src_len, |
||
| 157 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 158 | ucl_voidp wrkmem); |
||
| 159 | |||
| 160 | |||
| 161 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_le16 |
||
| 162 | (const ucl_bytep src, ucl_uint src_len, |
||
| 163 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 164 | ucl_voidp wrkmem); |
||
| 165 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_safe_le16 |
||
| 166 | (const ucl_bytep src, ucl_uint src_len, |
||
| 167 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 168 | ucl_voidp wrkmem); |
||
| 169 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_fast_le16 |
||
| 170 | (const ucl_bytep src, ucl_uint src_len, |
||
| 171 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 172 | ucl_voidp wrkmem); |
||
| 173 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_fast_safe_le16 |
||
| 174 | (const ucl_bytep src, ucl_uint src_len, |
||
| 175 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 176 | ucl_voidp wrkmem); |
||
| 177 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_small_le16 |
||
| 178 | (const ucl_bytep src, ucl_uint src_len, |
||
| 179 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 180 | ucl_voidp wrkmem); |
||
| 181 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_small_safe_le16 |
||
| 182 | (const ucl_bytep src, ucl_uint src_len, |
||
| 183 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 184 | ucl_voidp wrkmem); |
||
| 185 | |||
| 186 | |||
| 187 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_le32 |
||
| 188 | (const ucl_bytep src, ucl_uint src_len, |
||
| 189 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 190 | ucl_voidp wrkmem); |
||
| 191 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_safe_le32 |
||
| 192 | (const ucl_bytep src, ucl_uint src_len, |
||
| 193 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 194 | ucl_voidp wrkmem); |
||
| 195 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_fast_le32 |
||
| 196 | (const ucl_bytep src, ucl_uint src_len, |
||
| 197 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 198 | ucl_voidp wrkmem); |
||
| 199 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_fast_safe_le32 |
||
| 200 | (const ucl_bytep src, ucl_uint src_len, |
||
| 201 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 202 | ucl_voidp wrkmem); |
||
| 203 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_small_le32 |
||
| 204 | (const ucl_bytep src, ucl_uint src_len, |
||
| 205 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 206 | ucl_voidp wrkmem); |
||
| 207 | UCL_EXTERN(int) ucl_nrv2d_decompress_asm_small_safe_le32 |
||
| 208 | (const ucl_bytep src, ucl_uint src_len, |
||
| 209 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 210 | ucl_voidp wrkmem); |
||
| 211 | |||
| 212 | |||
| 213 | /*********************************************************************** |
||
| 214 | // NRV2E assembly decompressors |
||
| 215 | ************************************************************************/ |
||
| 216 | |||
| 217 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_8 |
||
| 218 | (const ucl_bytep src, ucl_uint src_len, |
||
| 219 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 220 | ucl_voidp wrkmem); |
||
| 221 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_safe_8 |
||
| 222 | (const ucl_bytep src, ucl_uint src_len, |
||
| 223 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 224 | ucl_voidp wrkmem); |
||
| 225 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_fast_8 |
||
| 226 | (const ucl_bytep src, ucl_uint src_len, |
||
| 227 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 228 | ucl_voidp wrkmem); |
||
| 229 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_fast_safe_8 |
||
| 230 | (const ucl_bytep src, ucl_uint src_len, |
||
| 231 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 232 | ucl_voidp wrkmem); |
||
| 233 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_small_8 |
||
| 234 | (const ucl_bytep src, ucl_uint src_len, |
||
| 235 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 236 | ucl_voidp wrkmem); |
||
| 237 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_small_safe_8 |
||
| 238 | (const ucl_bytep src, ucl_uint src_len, |
||
| 239 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 240 | ucl_voidp wrkmem); |
||
| 241 | |||
| 242 | |||
| 243 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_le16 |
||
| 244 | (const ucl_bytep src, ucl_uint src_len, |
||
| 245 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 246 | ucl_voidp wrkmem); |
||
| 247 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_safe_le16 |
||
| 248 | (const ucl_bytep src, ucl_uint src_len, |
||
| 249 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 250 | ucl_voidp wrkmem); |
||
| 251 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_fast_le16 |
||
| 252 | (const ucl_bytep src, ucl_uint src_len, |
||
| 253 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 254 | ucl_voidp wrkmem); |
||
| 255 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_fast_safe_le16 |
||
| 256 | (const ucl_bytep src, ucl_uint src_len, |
||
| 257 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 258 | ucl_voidp wrkmem); |
||
| 259 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_small_le16 |
||
| 260 | (const ucl_bytep src, ucl_uint src_len, |
||
| 261 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 262 | ucl_voidp wrkmem); |
||
| 263 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_small_safe_le16 |
||
| 264 | (const ucl_bytep src, ucl_uint src_len, |
||
| 265 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 266 | ucl_voidp wrkmem); |
||
| 267 | |||
| 268 | |||
| 269 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_le32 |
||
| 270 | (const ucl_bytep src, ucl_uint src_len, |
||
| 271 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 272 | ucl_voidp wrkmem); |
||
| 273 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_safe_le32 |
||
| 274 | (const ucl_bytep src, ucl_uint src_len, |
||
| 275 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 276 | ucl_voidp wrkmem); |
||
| 277 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_fast_le32 |
||
| 278 | (const ucl_bytep src, ucl_uint src_len, |
||
| 279 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 280 | ucl_voidp wrkmem); |
||
| 281 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_fast_safe_le32 |
||
| 282 | (const ucl_bytep src, ucl_uint src_len, |
||
| 283 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 284 | ucl_voidp wrkmem); |
||
| 285 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_small_le32 |
||
| 286 | (const ucl_bytep src, ucl_uint src_len, |
||
| 287 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 288 | ucl_voidp wrkmem); |
||
| 289 | UCL_EXTERN(int) ucl_nrv2e_decompress_asm_small_safe_le32 |
||
| 290 | (const ucl_bytep src, ucl_uint src_len, |
||
| 291 | ucl_bytep dst, ucl_uintp dst_len, |
||
| 292 | ucl_voidp wrkmem); |
||
| 293 | |||
| 294 | |||
| 295 | /*********************************************************************** |
||
| 296 | // checksum and misc functions |
||
| 297 | ************************************************************************/ |
||
| 298 | |||
| 299 | UCL_EXTERN(ucl_uint32) |
||
| 300 | ucl_crc32_asm(ucl_uint32 _c, const ucl_bytep _buf, ucl_uint _len, |
||
| 301 | const ucl_uint32p _crc_table); |
||
| 302 | |||
| 303 | UCL_EXTERN(ucl_uint32) |
||
| 304 | ucl_crc32_asm_small(ucl_uint32 _c, const ucl_bytep _buf, ucl_uint _len); |
||
| 305 | |||
| 306 | UCL_EXTERN(int) |
||
| 307 | ucl_cpuid_asm(ucl_uint32p /* ucl_uint32 info[16] */ ); |
||
| 308 | |||
| 309 | UCL_EXTERN(unsigned) |
||
| 310 | ucl_rdtsc_asm(ucl_uint32p /* ucl_uint32 ticks[2] */ ); |
||
| 311 | UCL_EXTERN(unsigned) |
||
| 312 | ucl_rdtsc_add_asm(ucl_uint32p /* ucl_uint32 ticks[2] */ ); |
||
| 313 | |||
| 314 | |||
| 315 | #ifdef __cplusplus |
||
| 316 | } /* extern "C" */ |
||
| 317 | #endif |
||
| 318 | |||
| 319 | #endif /* already included */ |
||
| 320 |