You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

192 lines
7.0 KiB

  1. // Code generated by command: go run gen.go -out ../encodeblock_amd64.s -stubs ../encodeblock_amd64.go -pkg=s2. DO NOT EDIT.
  2. //go:build !appengine && !noasm && gc && !noasm
  3. // +build !appengine,!noasm,gc,!noasm
  4. package s2
  5. func _dummy_()
  6. // encodeBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
  7. // Maximum input 4294967295 bytes.
  8. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  9. //
  10. //go:noescape
  11. func encodeBlockAsm(dst []byte, src []byte) int
  12. // encodeBlockAsm4MB encodes a non-empty src to a guaranteed-large-enough dst.
  13. // Maximum input 4194304 bytes.
  14. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  15. //
  16. //go:noescape
  17. func encodeBlockAsm4MB(dst []byte, src []byte) int
  18. // encodeBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
  19. // Maximum input 16383 bytes.
  20. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  21. //
  22. //go:noescape
  23. func encodeBlockAsm12B(dst []byte, src []byte) int
  24. // encodeBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
  25. // Maximum input 4095 bytes.
  26. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  27. //
  28. //go:noescape
  29. func encodeBlockAsm10B(dst []byte, src []byte) int
  30. // encodeBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
  31. // Maximum input 511 bytes.
  32. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  33. //
  34. //go:noescape
  35. func encodeBlockAsm8B(dst []byte, src []byte) int
  36. // encodeBetterBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
  37. // Maximum input 4294967295 bytes.
  38. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  39. //
  40. //go:noescape
  41. func encodeBetterBlockAsm(dst []byte, src []byte) int
  42. // encodeBetterBlockAsm4MB encodes a non-empty src to a guaranteed-large-enough dst.
  43. // Maximum input 4194304 bytes.
  44. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  45. //
  46. //go:noescape
  47. func encodeBetterBlockAsm4MB(dst []byte, src []byte) int
  48. // encodeBetterBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
  49. // Maximum input 16383 bytes.
  50. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  51. //
  52. //go:noescape
  53. func encodeBetterBlockAsm12B(dst []byte, src []byte) int
  54. // encodeBetterBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
  55. // Maximum input 4095 bytes.
  56. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  57. //
  58. //go:noescape
  59. func encodeBetterBlockAsm10B(dst []byte, src []byte) int
  60. // encodeBetterBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
  61. // Maximum input 511 bytes.
  62. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  63. //
  64. //go:noescape
  65. func encodeBetterBlockAsm8B(dst []byte, src []byte) int
  66. // encodeSnappyBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
  67. // Maximum input 4294967295 bytes.
  68. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  69. //
  70. //go:noescape
  71. func encodeSnappyBlockAsm(dst []byte, src []byte) int
  72. // encodeSnappyBlockAsm64K encodes a non-empty src to a guaranteed-large-enough dst.
  73. // Maximum input 65535 bytes.
  74. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  75. //
  76. //go:noescape
  77. func encodeSnappyBlockAsm64K(dst []byte, src []byte) int
  78. // encodeSnappyBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
  79. // Maximum input 16383 bytes.
  80. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  81. //
  82. //go:noescape
  83. func encodeSnappyBlockAsm12B(dst []byte, src []byte) int
  84. // encodeSnappyBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
  85. // Maximum input 4095 bytes.
  86. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  87. //
  88. //go:noescape
  89. func encodeSnappyBlockAsm10B(dst []byte, src []byte) int
  90. // encodeSnappyBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
  91. // Maximum input 511 bytes.
  92. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  93. //
  94. //go:noescape
  95. func encodeSnappyBlockAsm8B(dst []byte, src []byte) int
  96. // encodeSnappyBetterBlockAsm encodes a non-empty src to a guaranteed-large-enough dst.
  97. // Maximum input 4294967295 bytes.
  98. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  99. //
  100. //go:noescape
  101. func encodeSnappyBetterBlockAsm(dst []byte, src []byte) int
  102. // encodeSnappyBetterBlockAsm64K encodes a non-empty src to a guaranteed-large-enough dst.
  103. // Maximum input 65535 bytes.
  104. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  105. //
  106. //go:noescape
  107. func encodeSnappyBetterBlockAsm64K(dst []byte, src []byte) int
  108. // encodeSnappyBetterBlockAsm12B encodes a non-empty src to a guaranteed-large-enough dst.
  109. // Maximum input 16383 bytes.
  110. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  111. //
  112. //go:noescape
  113. func encodeSnappyBetterBlockAsm12B(dst []byte, src []byte) int
  114. // encodeSnappyBetterBlockAsm10B encodes a non-empty src to a guaranteed-large-enough dst.
  115. // Maximum input 4095 bytes.
  116. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  117. //
  118. //go:noescape
  119. func encodeSnappyBetterBlockAsm10B(dst []byte, src []byte) int
  120. // encodeSnappyBetterBlockAsm8B encodes a non-empty src to a guaranteed-large-enough dst.
  121. // Maximum input 511 bytes.
  122. // It assumes that the varint-encoded length of the decompressed bytes has already been written.
  123. //
  124. //go:noescape
  125. func encodeSnappyBetterBlockAsm8B(dst []byte, src []byte) int
  126. // emitLiteral writes a literal chunk and returns the number of bytes written.
  127. //
  128. // It assumes that:
  129. // dst is long enough to hold the encoded bytes with margin of 0 bytes
  130. // 0 <= len(lit) && len(lit) <= math.MaxUint32
  131. //
  132. //go:noescape
  133. func emitLiteral(dst []byte, lit []byte) int
  134. // emitRepeat writes a repeat chunk and returns the number of bytes written.
  135. // Length must be at least 4 and < 1<<32
  136. //
  137. //go:noescape
  138. func emitRepeat(dst []byte, offset int, length int) int
  139. // emitCopy writes a copy chunk and returns the number of bytes written.
  140. //
  141. // It assumes that:
  142. // dst is long enough to hold the encoded bytes
  143. // 1 <= offset && offset <= math.MaxUint32
  144. // 4 <= length && length <= 1 << 24
  145. //
  146. //go:noescape
  147. func emitCopy(dst []byte, offset int, length int) int
  148. // emitCopyNoRepeat writes a copy chunk and returns the number of bytes written.
  149. //
  150. // It assumes that:
  151. // dst is long enough to hold the encoded bytes
  152. // 1 <= offset && offset <= math.MaxUint32
  153. // 4 <= length && length <= 1 << 24
  154. //
  155. //go:noescape
  156. func emitCopyNoRepeat(dst []byte, offset int, length int) int
  157. // matchLen returns how many bytes match in a and b
  158. //
  159. // It assumes that:
  160. // len(a) <= len(b)
  161. //
  162. //go:noescape
  163. func matchLen(a []byte, b []byte) int