lzo_asm.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /* lzo_asm.h -- assembler prototypes for the LZO data compression library
  2. This file is part of the LZO real-time data compression library.
  3. Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer
  4. All Rights Reserved.
  5. The LZO library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of
  8. the License, or (at your option) any later version.
  9. The LZO library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with the LZO library; see the file COPYING.
  15. If not, write to the Free Software Foundation, Inc.,
  16. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. Markus F.X.J. Oberhumer
  18. <markus@oberhumer.com>
  19. http://www.oberhumer.com/opensource/lzo/
  20. */
  21. #ifndef __LZO_ASM_H_INCLUDED
  22. #define __LZO_ASM_H_INCLUDED 1
  23. #ifndef __LZOCONF_H_INCLUDED
  24. #include <lzo/lzoconf.h>
  25. #endif
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. /***********************************************************************
  30. // i386 assembly decompressors
  31. //
  32. // NOTE:
  33. // ====
  34. //
  35. // - For reasons of speed all fast assembler decompressors (having '_fast'
  36. // in their name) can access (write to) up to 3 bytes past the end of
  37. // the decompressed ("dst") block. Data past the end of the compressed
  38. // ("src") block is never accessed (read from).
  39. // [ technical note: because data is transferred in 32-bit units ]
  40. //
  41. // - Please also see asm/i386/00README.TXT and doc/LZO.FAQ for more
  42. // important details about the assembler versions.
  43. //
  44. ************************************************************************/
  45. LZO_EXTERN(int) lzo1c_decompress_asm
  46. (const lzo_bytep src, lzo_uint src_len,
  47. lzo_bytep dst, lzo_uintp dst_len,
  48. lzo_voidp wrkmem);
  49. LZO_EXTERN(int) lzo1c_decompress_asm_safe
  50. (const lzo_bytep src, lzo_uint src_len,
  51. lzo_bytep dst, lzo_uintp dst_len,
  52. lzo_voidp wrkmem);
  53. LZO_EXTERN(int) lzo1f_decompress_asm_fast
  54. (const lzo_bytep src, lzo_uint src_len,
  55. lzo_bytep dst, lzo_uintp dst_len,
  56. lzo_voidp wrkmem);
  57. LZO_EXTERN(int) lzo1f_decompress_asm_fast_safe
  58. (const lzo_bytep src, lzo_uint src_len,
  59. lzo_bytep dst, lzo_uintp dst_len,
  60. lzo_voidp wrkmem);
  61. LZO_EXTERN(int) lzo1x_decompress_asm
  62. (const lzo_bytep src, lzo_uint src_len,
  63. lzo_bytep dst, lzo_uintp dst_len,
  64. lzo_voidp wrkmem);
  65. LZO_EXTERN(int) lzo1x_decompress_asm_safe
  66. (const lzo_bytep src, lzo_uint src_len,
  67. lzo_bytep dst, lzo_uintp dst_len,
  68. lzo_voidp wrkmem);
  69. LZO_EXTERN(int) lzo1x_decompress_asm_fast
  70. (const lzo_bytep src, lzo_uint src_len,
  71. lzo_bytep dst, lzo_uintp dst_len,
  72. lzo_voidp wrkmem);
  73. LZO_EXTERN(int) lzo1x_decompress_asm_fast_safe
  74. (const lzo_bytep src, lzo_uint src_len,
  75. lzo_bytep dst, lzo_uintp dst_len,
  76. lzo_voidp wrkmem);
  77. LZO_EXTERN(int) lzo1y_decompress_asm
  78. (const lzo_bytep src, lzo_uint src_len,
  79. lzo_bytep dst, lzo_uintp dst_len,
  80. lzo_voidp wrkmem);
  81. LZO_EXTERN(int) lzo1y_decompress_asm_safe
  82. (const lzo_bytep src, lzo_uint src_len,
  83. lzo_bytep dst, lzo_uintp dst_len,
  84. lzo_voidp wrkmem);
  85. LZO_EXTERN(int) lzo1y_decompress_asm_fast
  86. (const lzo_bytep src, lzo_uint src_len,
  87. lzo_bytep dst, lzo_uintp dst_len,
  88. lzo_voidp wrkmem);
  89. LZO_EXTERN(int) lzo1y_decompress_asm_fast_safe
  90. (const lzo_bytep src, lzo_uint src_len,
  91. lzo_bytep dst, lzo_uintp dst_len,
  92. lzo_voidp wrkmem);
  93. /***********************************************************************
  94. // checksum and misc functions
  95. ************************************************************************/
  96. #if 0
  97. LZO_EXTERN(lzo_uint32_t)
  98. lzo_crc32_asm(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len,
  99. const lzo_uint32_tp tab);
  100. LZO_EXTERN(lzo_uint32_t)
  101. lzo_crc32_asm_small(lzo_uint32_t c, const lzo_bytep buf, lzo_uint len);
  102. LZO_EXTERN(int)
  103. lzo_cpuid_asm(lzo_uint32_tp /* lzo_uint32_t info[16] */ );
  104. LZO_EXTERN(lzo_uint32_t)
  105. lzo_rdtsc_asm(lzo_uint32_tp /* lzo_uint32_t ticks[2] */ );
  106. #endif
  107. #ifdef __cplusplus
  108. } /* extern "C" */
  109. #endif
  110. #endif /* already included */
  111. /* vim:set ts=4 sw=4 et: */