mirror of
https://github.com/GerbilSoft/zlib-ng.git
synced 2025-06-18 11:35:35 -04:00
Remove extern keyword from cpu_feature function declarations.
This commit is contained in:
parent
379eda2e80
commit
8c8cca7638
@ -16,38 +16,38 @@ void Z_INTERNAL arm_check_features(struct arm_cpu_features *features);
|
||||
#ifdef CPU_FEATURES_H_
|
||||
|
||||
#ifdef ARM_NEON
|
||||
extern uint32_t adler32_neon(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
extern uint32_t chunksize_neon(void);
|
||||
extern uint8_t* chunkmemset_safe_neon(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
uint32_t adler32_neon(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
uint32_t chunksize_neon(void);
|
||||
uint8_t* chunkmemset_safe_neon(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
|
||||
# ifdef HAVE_BUILTIN_CTZLL
|
||||
extern uint32_t compare256_neon(const uint8_t *src0, const uint8_t *src1);
|
||||
uint32_t compare256_neon(const uint8_t *src0, const uint8_t *src1);
|
||||
# ifdef DEFLATE_H_
|
||||
extern uint32_t longest_match_neon(deflate_state *const s, Pos cur_match);
|
||||
extern uint32_t longest_match_slow_neon(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_neon(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_slow_neon(deflate_state *const s, Pos cur_match);
|
||||
# endif
|
||||
# endif
|
||||
# ifdef DEFLATE_H_
|
||||
extern void slide_hash_neon(deflate_state *s);
|
||||
void slide_hash_neon(deflate_state *s);
|
||||
# endif
|
||||
# ifdef INFLATE_H_
|
||||
extern void inflate_fast_neon(PREFIX3(stream) *strm, uint32_t start);
|
||||
void inflate_fast_neon(PREFIX3(stream) *strm, uint32_t start);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef ARM_ACLE
|
||||
extern uint32_t crc32_acle(uint32_t crc, const uint8_t *buf, size_t len);
|
||||
uint32_t crc32_acle(uint32_t crc, const uint8_t *buf, size_t len);
|
||||
|
||||
# ifdef DEFLATE_H_
|
||||
extern void insert_string_acle(deflate_state *const s, const uint32_t str, uint32_t count);
|
||||
extern Pos quick_insert_string_acle(deflate_state *const s, const uint32_t str);
|
||||
extern uint32_t update_hash_acle(deflate_state *const s, uint32_t h, uint32_t val);
|
||||
void insert_string_acle(deflate_state *const s, const uint32_t str, uint32_t count);
|
||||
Pos quick_insert_string_acle(deflate_state *const s, const uint32_t str);
|
||||
uint32_t update_hash_acle(deflate_state *const s, uint32_t h, uint32_t val);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef ARM_SIMD
|
||||
# ifdef DEFLATE_H_
|
||||
extern void slide_hash_armv6(deflate_state *s);
|
||||
void slide_hash_armv6(deflate_state *s);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -9,51 +9,51 @@ typedef uint32_t (*adler32_func)(uint32_t adler, const uint8_t *buf, size_t len)
|
||||
typedef uint32_t (*compare256_func)(const uint8_t *src0, const uint8_t *src1);
|
||||
typedef uint32_t (*crc32_func)(uint32_t crc32, const uint8_t *buf, size_t len);
|
||||
|
||||
extern uint32_t adler32_c(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
extern uint32_t chunksize_c(void);
|
||||
extern uint8_t* chunkmemset_safe_c(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
uint32_t adler32_c(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
uint32_t chunksize_c(void);
|
||||
uint8_t* chunkmemset_safe_c(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
#ifdef INFLATE_H_
|
||||
extern void inflate_fast_c(PREFIX3(stream) *strm, uint32_t start);
|
||||
void inflate_fast_c(PREFIX3(stream) *strm, uint32_t start);
|
||||
#endif
|
||||
|
||||
extern uint32_t PREFIX(crc32_braid)(uint32_t crc, const uint8_t *buf, size_t len);
|
||||
uint32_t PREFIX(crc32_braid)(uint32_t crc, const uint8_t *buf, size_t len);
|
||||
|
||||
extern uint32_t compare256_c(const uint8_t *src0, const uint8_t *src1);
|
||||
uint32_t compare256_c(const uint8_t *src0, const uint8_t *src1);
|
||||
#if defined(UNALIGNED_OK) && BYTE_ORDER == LITTLE_ENDIAN
|
||||
extern uint32_t compare256_unaligned_16(const uint8_t *src0, const uint8_t *src1);
|
||||
uint32_t compare256_unaligned_16(const uint8_t *src0, const uint8_t *src1);
|
||||
# ifdef HAVE_BUILTIN_CTZ
|
||||
extern uint32_t compare256_unaligned_32(const uint8_t *src0, const uint8_t *src1);
|
||||
uint32_t compare256_unaligned_32(const uint8_t *src0, const uint8_t *src1);
|
||||
# endif
|
||||
# if defined(UNALIGNED64_OK) && defined(HAVE_BUILTIN_CTZLL)
|
||||
extern uint32_t compare256_unaligned_64(const uint8_t *src0, const uint8_t *src1);
|
||||
uint32_t compare256_unaligned_64(const uint8_t *src0, const uint8_t *src1);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef DEFLATE_H_
|
||||
typedef void (*slide_hash_func)(deflate_state *s);
|
||||
|
||||
extern void insert_string_c(deflate_state *const s, const uint32_t str, uint32_t count);
|
||||
extern Pos quick_insert_string_c(deflate_state *const s, const uint32_t str);
|
||||
extern void slide_hash_c(deflate_state *s);
|
||||
extern uint32_t update_hash_c(deflate_state *const s, uint32_t h, uint32_t val);
|
||||
void insert_string_c(deflate_state *const s, const uint32_t str, uint32_t count);
|
||||
Pos quick_insert_string_c(deflate_state *const s, const uint32_t str);
|
||||
void slide_hash_c(deflate_state *s);
|
||||
uint32_t update_hash_c(deflate_state *const s, uint32_t h, uint32_t val);
|
||||
|
||||
extern uint32_t longest_match_c(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_c(deflate_state *const s, Pos cur_match);
|
||||
# if defined(UNALIGNED_OK) && BYTE_ORDER == LITTLE_ENDIAN
|
||||
extern uint32_t longest_match_unaligned_16(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_unaligned_16(deflate_state *const s, Pos cur_match);
|
||||
# ifdef HAVE_BUILTIN_CTZ
|
||||
extern uint32_t longest_match_unaligned_32(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_unaligned_32(deflate_state *const s, Pos cur_match);
|
||||
# endif
|
||||
# if defined(UNALIGNED64_OK) && defined(HAVE_BUILTIN_CTZLL)
|
||||
extern uint32_t longest_match_unaligned_64(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_unaligned_64(deflate_state *const s, Pos cur_match);
|
||||
# endif
|
||||
# endif
|
||||
|
||||
extern uint32_t longest_match_slow_c(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_slow_c(deflate_state *const s, Pos cur_match);
|
||||
# if defined(UNALIGNED_OK) && BYTE_ORDER == LITTLE_ENDIAN
|
||||
extern uint32_t longest_match_slow_unaligned_16(deflate_state *const s, Pos cur_match);
|
||||
extern uint32_t longest_match_slow_unaligned_32(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_slow_unaligned_16(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_slow_unaligned_32(deflate_state *const s, Pos cur_match);
|
||||
# ifdef UNALIGNED64_OK
|
||||
extern uint32_t longest_match_slow_unaligned_64(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_slow_unaligned_64(deflate_state *const s, Pos cur_match);
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
@ -18,30 +18,30 @@ void Z_INTERNAL power_check_features(struct power_cpu_features *features);
|
||||
#ifdef CPU_FEATURES_H_
|
||||
|
||||
#ifdef PPC_VMX
|
||||
extern uint32_t adler32_vmx(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
uint32_t adler32_vmx(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
# ifdef DEFLATE_H_
|
||||
extern void slide_hash_vmx(deflate_state *s);
|
||||
void slide_hash_vmx(deflate_state *s);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef POWER8_VSX
|
||||
extern uint32_t adler32_power8(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
extern uint32_t chunksize_power8(void);
|
||||
extern uint8_t* chunkmemset_safe_power8(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
extern uint32_t crc32_power8(uint32_t crc, const uint8_t *buf, size_t len);
|
||||
uint32_t adler32_power8(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
uint32_t chunksize_power8(void);
|
||||
uint8_t* chunkmemset_safe_power8(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
uint32_t crc32_power8(uint32_t crc, const uint8_t *buf, size_t len);
|
||||
# ifdef DEFLATE_H_
|
||||
extern void slide_hash_power8(deflate_state *s);
|
||||
void slide_hash_power8(deflate_state *s);
|
||||
# endif
|
||||
# ifdef INFLATE_H_
|
||||
extern void inflate_fast_power8(PREFIX3(stream) *strm, uint32_t start);
|
||||
void inflate_fast_power8(PREFIX3(stream) *strm, uint32_t start);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef POWER9
|
||||
extern uint32_t compare256_power9(const uint8_t *src0, const uint8_t *src1);
|
||||
uint32_t compare256_power9(const uint8_t *src0, const uint8_t *src1);
|
||||
# ifdef DEFLATE_H_
|
||||
extern uint32_t longest_match_power9(deflate_state *const s, Pos cur_match);
|
||||
extern uint32_t longest_match_slow_power9(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_power9(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_slow_power9(deflate_state *const s, Pos cur_match);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -18,19 +18,19 @@ void Z_INTERNAL riscv_check_features(struct riscv_cpu_features *features);
|
||||
#ifdef CPU_FEATURES_H_
|
||||
|
||||
#ifdef RISCV_RVV
|
||||
extern uint32_t adler32_rvv(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
extern uint32_t adler32_fold_copy_rvv(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
extern uint32_t chunksize_rvv(void);
|
||||
extern uint8_t* chunkmemset_safe_rvv(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
extern uint32_t compare256_rvv(const uint8_t *src0, const uint8_t *src1);
|
||||
uint32_t adler32_rvv(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
uint32_t adler32_fold_copy_rvv(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
uint32_t chunksize_rvv(void);
|
||||
uint8_t* chunkmemset_safe_rvv(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
uint32_t compare256_rvv(const uint8_t *src0, const uint8_t *src1);
|
||||
|
||||
# ifdef DEFLATE_H_
|
||||
extern uint32_t longest_match_rvv(deflate_state *const s, Pos cur_match);
|
||||
extern uint32_t longest_match_slow_rvv(deflate_state *const s, Pos cur_match);
|
||||
extern void slide_hash_rvv(deflate_state *s);
|
||||
uint32_t longest_match_rvv(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_slow_rvv(deflate_state *const s, Pos cur_match);
|
||||
void slide_hash_rvv(deflate_state *s);
|
||||
# endif
|
||||
# ifdef INFLATE_H_
|
||||
extern void inflate_fast_rvv(PREFIX3(stream) *strm, uint32_t start);
|
||||
void inflate_fast_rvv(PREFIX3(stream) *strm, uint32_t start);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
@ -10,7 +10,7 @@ void Z_INTERNAL s390_check_features(struct s390_cpu_features *features);
|
||||
#ifdef CPU_FEATURES_H_
|
||||
|
||||
#ifdef S390_CRC32_VX
|
||||
extern uint32_t crc32_s390_vx(uint32_t crc, const uint8_t *buf, size_t len);
|
||||
uint32_t crc32_s390_vx(uint32_t crc, const uint8_t *buf, size_t len);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -27,79 +27,79 @@ void Z_INTERNAL x86_check_features(struct x86_cpu_features *features);
|
||||
#include "crc32.h"
|
||||
|
||||
#ifdef X86_SSE2
|
||||
extern uint32_t chunksize_sse2(void);
|
||||
extern uint8_t* chunkmemset_safe_sse2(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
uint32_t chunksize_sse2(void);
|
||||
uint8_t* chunkmemset_safe_sse2(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
|
||||
# ifdef HAVE_BUILTIN_CTZ
|
||||
extern uint32_t compare256_sse2(const uint8_t *src0, const uint8_t *src1);
|
||||
uint32_t compare256_sse2(const uint8_t *src0, const uint8_t *src1);
|
||||
# ifdef DEFLATE_H_
|
||||
extern uint32_t longest_match_sse2(deflate_state *const s, Pos cur_match);
|
||||
extern uint32_t longest_match_slow_sse2(deflate_state *const s, Pos cur_match);
|
||||
extern void slide_hash_sse2(deflate_state *s);
|
||||
uint32_t longest_match_sse2(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_slow_sse2(deflate_state *const s, Pos cur_match);
|
||||
void slide_hash_sse2(deflate_state *s);
|
||||
# endif
|
||||
# endif
|
||||
# ifdef INFLATE_H_
|
||||
extern void inflate_fast_sse2(PREFIX3(stream)* strm, uint32_t start);
|
||||
void inflate_fast_sse2(PREFIX3(stream)* strm, uint32_t start);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef X86_SSSE3
|
||||
extern uint32_t adler32_ssse3(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
extern uint8_t* chunkmemset_safe_ssse3(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
uint32_t adler32_ssse3(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
uint8_t* chunkmemset_safe_ssse3(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
# ifdef INFLATE_H_
|
||||
extern void inflate_fast_ssse3(PREFIX3(stream) *strm, uint32_t start);
|
||||
void inflate_fast_ssse3(PREFIX3(stream) *strm, uint32_t start);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef X86_SSE42
|
||||
extern uint32_t adler32_fold_copy_sse42(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
uint32_t adler32_fold_copy_sse42(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
# ifdef DEFLATE_H_
|
||||
extern void insert_string_sse42(deflate_state *const s, const uint32_t str, uint32_t count);
|
||||
extern Pos quick_insert_string_sse42(deflate_state *const s, const uint32_t str);
|
||||
extern uint32_t update_hash_sse42(deflate_state *const s, uint32_t h, uint32_t val);
|
||||
void insert_string_sse42(deflate_state *const s, const uint32_t str, uint32_t count);
|
||||
Pos quick_insert_string_sse42(deflate_state *const s, const uint32_t str);
|
||||
uint32_t update_hash_sse42(deflate_state *const s, uint32_t h, uint32_t val);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef X86_AVX2
|
||||
extern uint32_t adler32_avx2(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
extern uint32_t adler32_fold_copy_avx2(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
extern uint32_t chunksize_avx2(void);
|
||||
extern uint8_t* chunkmemset_safe_avx2(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
uint32_t adler32_avx2(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
uint32_t adler32_fold_copy_avx2(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
uint32_t chunksize_avx2(void);
|
||||
uint8_t* chunkmemset_safe_avx2(uint8_t *out, unsigned dist, unsigned len, unsigned left);
|
||||
|
||||
# ifdef HAVE_BUILTIN_CTZ
|
||||
extern uint32_t compare256_avx2(const uint8_t *src0, const uint8_t *src1);
|
||||
uint32_t compare256_avx2(const uint8_t *src0, const uint8_t *src1);
|
||||
# ifdef DEFLATE_H_
|
||||
extern uint32_t longest_match_avx2(deflate_state *const s, Pos cur_match);
|
||||
extern uint32_t longest_match_slow_avx2(deflate_state *const s, Pos cur_match);
|
||||
extern void slide_hash_avx2(deflate_state *s);
|
||||
uint32_t longest_match_avx2(deflate_state *const s, Pos cur_match);
|
||||
uint32_t longest_match_slow_avx2(deflate_state *const s, Pos cur_match);
|
||||
void slide_hash_avx2(deflate_state *s);
|
||||
# endif
|
||||
# endif
|
||||
# ifdef INFLATE_H_
|
||||
extern void inflate_fast_avx2(PREFIX3(stream)* strm, uint32_t start);
|
||||
void inflate_fast_avx2(PREFIX3(stream)* strm, uint32_t start);
|
||||
# endif
|
||||
#endif
|
||||
#ifdef X86_AVX512
|
||||
extern uint32_t adler32_avx512(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
extern uint32_t adler32_fold_copy_avx512(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
uint32_t adler32_avx512(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
uint32_t adler32_fold_copy_avx512(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
#endif
|
||||
#ifdef X86_AVX512VNNI
|
||||
extern uint32_t adler32_avx512_vnni(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
extern uint32_t adler32_fold_copy_avx512_vnni(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
uint32_t adler32_avx512_vnni(uint32_t adler, const uint8_t *buf, size_t len);
|
||||
uint32_t adler32_fold_copy_avx512_vnni(uint32_t adler, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
#endif
|
||||
|
||||
#ifdef X86_PCLMULQDQ_CRC
|
||||
extern uint32_t crc32_fold_pclmulqdq_reset(crc32_fold *crc);
|
||||
extern void crc32_fold_pclmulqdq_copy(crc32_fold *crc, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
extern void crc32_fold_pclmulqdq(crc32_fold *crc, const uint8_t *src, size_t len, uint32_t init_crc);
|
||||
extern uint32_t crc32_fold_pclmulqdq_final(crc32_fold *crc);
|
||||
extern uint32_t crc32_pclmulqdq(uint32_t crc32, const uint8_t *buf, size_t len);
|
||||
uint32_t crc32_fold_pclmulqdq_reset(crc32_fold *crc);
|
||||
void crc32_fold_pclmulqdq_copy(crc32_fold *crc, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
void crc32_fold_pclmulqdq(crc32_fold *crc, const uint8_t *src, size_t len, uint32_t init_crc);
|
||||
uint32_t crc32_fold_pclmulqdq_final(crc32_fold *crc);
|
||||
uint32_t crc32_pclmulqdq(uint32_t crc32, const uint8_t *buf, size_t len);
|
||||
#endif
|
||||
#ifdef X86_VPCLMULQDQ_CRC
|
||||
extern uint32_t crc32_fold_vpclmulqdq_reset(crc32_fold *crc);
|
||||
extern void crc32_fold_vpclmulqdq_copy(crc32_fold *crc, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
extern void crc32_fold_vpclmulqdq(crc32_fold *crc, const uint8_t *src, size_t len, uint32_t init_crc);
|
||||
extern uint32_t crc32_fold_vpclmulqdq_final(crc32_fold *crc);
|
||||
extern uint32_t crc32_vpclmulqdq(uint32_t crc32, const uint8_t *buf, size_t len);
|
||||
uint32_t crc32_fold_vpclmulqdq_reset(crc32_fold *crc);
|
||||
void crc32_fold_vpclmulqdq_copy(crc32_fold *crc, uint8_t *dst, const uint8_t *src, size_t len);
|
||||
void crc32_fold_vpclmulqdq(crc32_fold *crc, const uint8_t *src, size_t len, uint32_t init_crc);
|
||||
uint32_t crc32_fold_vpclmulqdq_final(crc32_fold *crc);
|
||||
uint32_t crc32_vpclmulqdq(uint32_t crc32, const uint8_t *buf, size_t len);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -36,6 +36,6 @@ struct cpu_features {
|
||||
#endif
|
||||
};
|
||||
|
||||
extern void cpu_check_features(struct cpu_features *features);
|
||||
void cpu_check_features(struct cpu_features *features);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user