Line | Count | Source |
1 | | /* zmemory.h -- Private inline functions used internally in zlib-ng |
2 | | * For conditions of distribution and use, see copyright notice in zlib.h |
3 | | */ |
4 | | |
5 | | #ifndef _ZMEMORY_H |
6 | | #define _ZMEMORY_H |
7 | | |
8 | | #if defined(__GNUC__) && (__GNUC__ >= 4) |
9 | | # define HAVE_MAY_ALIAS |
10 | | #endif |
11 | | |
12 | 3.70M | static inline uint16_t zng_memread_2(const void *ptr) { |
13 | 3.70M | #if defined(HAVE_MAY_ALIAS) |
14 | 3.70M | typedef struct { uint16_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint16_t; |
15 | 3.70M | return ((const unaligned_uint16_t *)ptr)->val; |
16 | | #else |
17 | | uint16_t val; |
18 | | memcpy(&val, ptr, sizeof(val)); |
19 | | return val; |
20 | | #endif |
21 | 3.70M | } Unexecuted instantiation: deflate.c:zng_memread_2 Unexecuted instantiation: deflate_fast.c:zng_memread_2 Unexecuted instantiation: deflate_huff.c:zng_memread_2 Unexecuted instantiation: deflate_medium.c:zng_memread_2 Unexecuted instantiation: deflate_quick.c:zng_memread_2 deflate_rle.c:zng_memread_2 Line | Count | Source | 12 | 3.59M | static inline uint16_t zng_memread_2(const void *ptr) { | 13 | 3.59M | #if defined(HAVE_MAY_ALIAS) | 14 | 3.59M | typedef struct { uint16_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint16_t; | 15 | 3.59M | return ((const unaligned_uint16_t *)ptr)->val; | 16 | | #else | 17 | | uint16_t val; | 18 | | memcpy(&val, ptr, sizeof(val)); | 19 | | return val; | 20 | | #endif | 21 | 3.59M | } |
Unexecuted instantiation: deflate_slow.c:zng_memread_2 Unexecuted instantiation: deflate_stored.c:zng_memread_2 Unexecuted instantiation: functable.c:zng_memread_2 Unexecuted instantiation: inflate.c:zng_memread_2 Unexecuted instantiation: inftrees.c:zng_memread_2 Unexecuted instantiation: insert_string.c:zng_memread_2 Unexecuted instantiation: trees.c:zng_memread_2 Unexecuted instantiation: chunkset_sse2.c:zng_memread_2 Unexecuted instantiation: compare256_sse2.c:zng_memread_2 Unexecuted instantiation: crc32_chorba_sse2.c:zng_memread_2 Unexecuted instantiation: slide_hash_sse2.c:zng_memread_2 Unexecuted instantiation: chunkset_ssse3.c:zng_memread_2 Unexecuted instantiation: crc32_chorba_sse41.c:zng_memread_2 Unexecuted instantiation: slide_hash_avx2.c:zng_memread_2 chunkset_avx2.c:zng_memread_2 Line | Count | Source | 12 | 110k | static inline uint16_t zng_memread_2(const void *ptr) { | 13 | 110k | #if defined(HAVE_MAY_ALIAS) | 14 | 110k | typedef struct { uint16_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint16_t; | 15 | 110k | return ((const unaligned_uint16_t *)ptr)->val; | 16 | | #else | 17 | | uint16_t val; | 18 | | memcpy(&val, ptr, sizeof(val)); | 19 | | return val; | 20 | | #endif | 21 | 110k | } |
Unexecuted instantiation: compare256_avx2.c:zng_memread_2 Unexecuted instantiation: adler32_avx2_vnni.c:zng_memread_2 Unexecuted instantiation: adler32_avx512.c:zng_memread_2 Unexecuted instantiation: chunkset_avx512.c:zng_memread_2 Unexecuted instantiation: compare256_avx512.c:zng_memread_2 Unexecuted instantiation: adler32_avx512_vnni.c:zng_memread_2 Unexecuted instantiation: adler32_c.c:zng_memread_2 Unexecuted instantiation: crc32_braid_c.c:zng_memread_2 Unexecuted instantiation: crc32_chorba_c.c:zng_memread_2 Unexecuted instantiation: crc32.c:zng_memread_2 |
22 | | |
23 | 286M | static inline uint32_t zng_memread_4(const void *ptr) { |
24 | 286M | #if defined(HAVE_MAY_ALIAS) |
25 | 286M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; |
26 | 286M | return ((const unaligned_uint32_t *)ptr)->val; |
27 | | #else |
28 | | uint32_t val; |
29 | | memcpy(&val, ptr, sizeof(val)); |
30 | | return val; |
31 | | #endif |
32 | 286M | } Line | Count | Source | 23 | 8.61k | static inline uint32_t zng_memread_4(const void *ptr) { | 24 | 8.61k | #if defined(HAVE_MAY_ALIAS) | 25 | 8.61k | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 26 | 8.61k | return ((const unaligned_uint32_t *)ptr)->val; | 27 | | #else | 28 | | uint32_t val; | 29 | | memcpy(&val, ptr, sizeof(val)); | 30 | | return val; | 31 | | #endif | 32 | 8.61k | } |
deflate_fast.c:zng_memread_4 Line | Count | Source | 23 | 21.4M | static inline uint32_t zng_memread_4(const void *ptr) { | 24 | 21.4M | #if defined(HAVE_MAY_ALIAS) | 25 | 21.4M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 26 | 21.4M | return ((const unaligned_uint32_t *)ptr)->val; | 27 | | #else | 28 | | uint32_t val; | 29 | | memcpy(&val, ptr, sizeof(val)); | 30 | | return val; | 31 | | #endif | 32 | 21.4M | } |
Unexecuted instantiation: deflate_huff.c:zng_memread_4 deflate_medium.c:zng_memread_4 Line | Count | Source | 23 | 41.6M | static inline uint32_t zng_memread_4(const void *ptr) { | 24 | 41.6M | #if defined(HAVE_MAY_ALIAS) | 25 | 41.6M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 26 | 41.6M | return ((const unaligned_uint32_t *)ptr)->val; | 27 | | #else | 28 | | uint32_t val; | 29 | | memcpy(&val, ptr, sizeof(val)); | 30 | | return val; | 31 | | #endif | 32 | 41.6M | } |
deflate_quick.c:zng_memread_4 Line | Count | Source | 23 | 110M | static inline uint32_t zng_memread_4(const void *ptr) { | 24 | 110M | #if defined(HAVE_MAY_ALIAS) | 25 | 110M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 26 | 110M | return ((const unaligned_uint32_t *)ptr)->val; | 27 | | #else | 28 | | uint32_t val; | 29 | | memcpy(&val, ptr, sizeof(val)); | 30 | | return val; | 31 | | #endif | 32 | 110M | } |
Unexecuted instantiation: deflate_rle.c:zng_memread_4 deflate_slow.c:zng_memread_4 Line | Count | Source | 23 | 14.6M | static inline uint32_t zng_memread_4(const void *ptr) { | 24 | 14.6M | #if defined(HAVE_MAY_ALIAS) | 25 | 14.6M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 26 | 14.6M | return ((const unaligned_uint32_t *)ptr)->val; | 27 | | #else | 28 | | uint32_t val; | 29 | | memcpy(&val, ptr, sizeof(val)); | 30 | | return val; | 31 | | #endif | 32 | 14.6M | } |
Unexecuted instantiation: deflate_stored.c:zng_memread_4 Unexecuted instantiation: functable.c:zng_memread_4 Unexecuted instantiation: inflate.c:zng_memread_4 Line | Count | Source | 23 | 2.49M | static inline uint32_t zng_memread_4(const void *ptr) { | 24 | 2.49M | #if defined(HAVE_MAY_ALIAS) | 25 | 2.49M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 26 | 2.49M | return ((const unaligned_uint32_t *)ptr)->val; | 27 | | #else | 28 | | uint32_t val; | 29 | | memcpy(&val, ptr, sizeof(val)); | 30 | | return val; | 31 | | #endif | 32 | 2.49M | } |
insert_string.c:zng_memread_4 Line | Count | Source | 23 | 29.6M | static inline uint32_t zng_memread_4(const void *ptr) { | 24 | 29.6M | #if defined(HAVE_MAY_ALIAS) | 25 | 29.6M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 26 | 29.6M | return ((const unaligned_uint32_t *)ptr)->val; | 27 | | #else | 28 | | uint32_t val; | 29 | | memcpy(&val, ptr, sizeof(val)); | 30 | | return val; | 31 | | #endif | 32 | 29.6M | } |
Line | Count | Source | 23 | 66.0M | static inline uint32_t zng_memread_4(const void *ptr) { | 24 | 66.0M | #if defined(HAVE_MAY_ALIAS) | 25 | 66.0M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 26 | 66.0M | return ((const unaligned_uint32_t *)ptr)->val; | 27 | | #else | 28 | | uint32_t val; | 29 | | memcpy(&val, ptr, sizeof(val)); | 30 | | return val; | 31 | | #endif | 32 | 66.0M | } |
Unexecuted instantiation: chunkset_sse2.c:zng_memread_4 Unexecuted instantiation: compare256_sse2.c:zng_memread_4 Unexecuted instantiation: crc32_chorba_sse2.c:zng_memread_4 Unexecuted instantiation: slide_hash_sse2.c:zng_memread_4 Unexecuted instantiation: chunkset_ssse3.c:zng_memread_4 Unexecuted instantiation: crc32_chorba_sse41.c:zng_memread_4 Unexecuted instantiation: slide_hash_avx2.c:zng_memread_4 chunkset_avx2.c:zng_memread_4 Line | Count | Source | 23 | 60.5k | static inline uint32_t zng_memread_4(const void *ptr) { | 24 | 60.5k | #if defined(HAVE_MAY_ALIAS) | 25 | 60.5k | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 26 | 60.5k | return ((const unaligned_uint32_t *)ptr)->val; | 27 | | #else | 28 | | uint32_t val; | 29 | | memcpy(&val, ptr, sizeof(val)); | 30 | | return val; | 31 | | #endif | 32 | 60.5k | } |
Unexecuted instantiation: compare256_avx2.c:zng_memread_4 Unexecuted instantiation: adler32_avx2_vnni.c:zng_memread_4 Unexecuted instantiation: adler32_avx512.c:zng_memread_4 Unexecuted instantiation: chunkset_avx512.c:zng_memread_4 Unexecuted instantiation: compare256_avx512.c:zng_memread_4 Unexecuted instantiation: adler32_avx512_vnni.c:zng_memread_4 Unexecuted instantiation: adler32_c.c:zng_memread_4 Unexecuted instantiation: crc32_braid_c.c:zng_memread_4 Unexecuted instantiation: crc32_chorba_c.c:zng_memread_4 Unexecuted instantiation: crc32.c:zng_memread_4 |
33 | | |
34 | 678M | static inline uint64_t zng_memread_8(const void *ptr) { |
35 | 678M | #if defined(HAVE_MAY_ALIAS) |
36 | 678M | typedef struct { uint64_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint64_t; |
37 | 678M | return ((const unaligned_uint64_t *)ptr)->val; |
38 | | #else |
39 | | uint64_t val; |
40 | | memcpy(&val, ptr, sizeof(val)); |
41 | | return val; |
42 | | #endif |
43 | 678M | } Unexecuted instantiation: deflate.c:zng_memread_8 Unexecuted instantiation: deflate_fast.c:zng_memread_8 Unexecuted instantiation: deflate_huff.c:zng_memread_8 Unexecuted instantiation: deflate_medium.c:zng_memread_8 Unexecuted instantiation: deflate_quick.c:zng_memread_8 deflate_rle.c:zng_memread_8 Line | Count | Source | 34 | 5.91M | static inline uint64_t zng_memread_8(const void *ptr) { | 35 | 5.91M | #if defined(HAVE_MAY_ALIAS) | 36 | 5.91M | typedef struct { uint64_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint64_t; | 37 | 5.91M | return ((const unaligned_uint64_t *)ptr)->val; | 38 | | #else | 39 | | uint64_t val; | 40 | | memcpy(&val, ptr, sizeof(val)); | 41 | | return val; | 42 | | #endif | 43 | 5.91M | } |
Unexecuted instantiation: deflate_slow.c:zng_memread_8 Unexecuted instantiation: deflate_stored.c:zng_memread_8 Unexecuted instantiation: functable.c:zng_memread_8 Unexecuted instantiation: inflate.c:zng_memread_8 Unexecuted instantiation: inftrees.c:zng_memread_8 Unexecuted instantiation: insert_string.c:zng_memread_8 Line | Count | Source | 34 | 52.6M | static inline uint64_t zng_memread_8(const void *ptr) { | 35 | 52.6M | #if defined(HAVE_MAY_ALIAS) | 36 | 52.6M | typedef struct { uint64_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint64_t; | 37 | 52.6M | return ((const unaligned_uint64_t *)ptr)->val; | 38 | | #else | 39 | | uint64_t val; | 40 | | memcpy(&val, ptr, sizeof(val)); | 41 | | return val; | 42 | | #endif | 43 | 52.6M | } |
Unexecuted instantiation: chunkset_sse2.c:zng_memread_8 Unexecuted instantiation: compare256_sse2.c:zng_memread_8 Unexecuted instantiation: crc32_chorba_sse2.c:zng_memread_8 Unexecuted instantiation: slide_hash_sse2.c:zng_memread_8 Unexecuted instantiation: chunkset_ssse3.c:zng_memread_8 Unexecuted instantiation: crc32_chorba_sse41.c:zng_memread_8 Unexecuted instantiation: slide_hash_avx2.c:zng_memread_8 chunkset_avx2.c:zng_memread_8 Line | Count | Source | 34 | 99.3M | static inline uint64_t zng_memread_8(const void *ptr) { | 35 | 99.3M | #if defined(HAVE_MAY_ALIAS) | 36 | 99.3M | typedef struct { uint64_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint64_t; | 37 | 99.3M | return ((const unaligned_uint64_t *)ptr)->val; | 38 | | #else | 39 | | uint64_t val; | 40 | | memcpy(&val, ptr, sizeof(val)); | 41 | | return val; | 42 | | #endif | 43 | 99.3M | } |
compare256_avx2.c:zng_memread_8 Line | Count | Source | 34 | 520M | static inline uint64_t zng_memread_8(const void *ptr) { | 35 | 520M | #if defined(HAVE_MAY_ALIAS) | 36 | 520M | typedef struct { uint64_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint64_t; | 37 | 520M | return ((const unaligned_uint64_t *)ptr)->val; | 38 | | #else | 39 | | uint64_t val; | 40 | | memcpy(&val, ptr, sizeof(val)); | 41 | | return val; | 42 | | #endif | 43 | 520M | } |
Unexecuted instantiation: adler32_avx2_vnni.c:zng_memread_8 Unexecuted instantiation: adler32_avx512.c:zng_memread_8 Unexecuted instantiation: chunkset_avx512.c:zng_memread_8 Unexecuted instantiation: compare256_avx512.c:zng_memread_8 Unexecuted instantiation: adler32_avx512_vnni.c:zng_memread_8 Unexecuted instantiation: adler32_c.c:zng_memread_8 Unexecuted instantiation: crc32_braid_c.c:zng_memread_8 Unexecuted instantiation: crc32_chorba_c.c:zng_memread_8 Unexecuted instantiation: crc32.c:zng_memread_8 |
44 | | |
45 | 23.1k | static inline void zng_memwrite_2(void *ptr, uint16_t val) { |
46 | 23.1k | #if defined(HAVE_MAY_ALIAS) |
47 | 23.1k | typedef struct { uint16_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint16_t; |
48 | 23.1k | ((unaligned_uint16_t *)ptr)->val = val; |
49 | | #else |
50 | | memcpy(ptr, &val, sizeof(val)); |
51 | | #endif |
52 | 23.1k | } Unexecuted instantiation: deflate.c:zng_memwrite_2 Unexecuted instantiation: deflate_fast.c:zng_memwrite_2 Unexecuted instantiation: deflate_huff.c:zng_memwrite_2 Unexecuted instantiation: deflate_medium.c:zng_memwrite_2 deflate_quick.c:zng_memwrite_2 Line | Count | Source | 45 | 532 | static inline void zng_memwrite_2(void *ptr, uint16_t val) { | 46 | 532 | #if defined(HAVE_MAY_ALIAS) | 47 | 532 | typedef struct { uint16_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint16_t; | 48 | 532 | ((unaligned_uint16_t *)ptr)->val = val; | 49 | | #else | 50 | | memcpy(ptr, &val, sizeof(val)); | 51 | | #endif | 52 | 532 | } |
Unexecuted instantiation: deflate_rle.c:zng_memwrite_2 Unexecuted instantiation: deflate_slow.c:zng_memwrite_2 deflate_stored.c:zng_memwrite_2 Line | Count | Source | 45 | 1.50k | static inline void zng_memwrite_2(void *ptr, uint16_t val) { | 46 | 1.50k | #if defined(HAVE_MAY_ALIAS) | 47 | 1.50k | typedef struct { uint16_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint16_t; | 48 | 1.50k | ((unaligned_uint16_t *)ptr)->val = val; | 49 | | #else | 50 | | memcpy(ptr, &val, sizeof(val)); | 51 | | #endif | 52 | 1.50k | } |
Unexecuted instantiation: functable.c:zng_memwrite_2 Unexecuted instantiation: inflate.c:zng_memwrite_2 Unexecuted instantiation: inftrees.c:zng_memwrite_2 Unexecuted instantiation: insert_string.c:zng_memwrite_2 Line | Count | Source | 45 | 21.1k | static inline void zng_memwrite_2(void *ptr, uint16_t val) { | 46 | 21.1k | #if defined(HAVE_MAY_ALIAS) | 47 | 21.1k | typedef struct { uint16_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint16_t; | 48 | 21.1k | ((unaligned_uint16_t *)ptr)->val = val; | 49 | | #else | 50 | | memcpy(ptr, &val, sizeof(val)); | 51 | | #endif | 52 | 21.1k | } |
Unexecuted instantiation: chunkset_sse2.c:zng_memwrite_2 Unexecuted instantiation: compare256_sse2.c:zng_memwrite_2 Unexecuted instantiation: crc32_chorba_sse2.c:zng_memwrite_2 Unexecuted instantiation: slide_hash_sse2.c:zng_memwrite_2 Unexecuted instantiation: chunkset_ssse3.c:zng_memwrite_2 Unexecuted instantiation: crc32_chorba_sse41.c:zng_memwrite_2 Unexecuted instantiation: slide_hash_avx2.c:zng_memwrite_2 Unexecuted instantiation: chunkset_avx2.c:zng_memwrite_2 Unexecuted instantiation: compare256_avx2.c:zng_memwrite_2 Unexecuted instantiation: adler32_avx2_vnni.c:zng_memwrite_2 Unexecuted instantiation: adler32_avx512.c:zng_memwrite_2 Unexecuted instantiation: chunkset_avx512.c:zng_memwrite_2 Unexecuted instantiation: compare256_avx512.c:zng_memwrite_2 Unexecuted instantiation: adler32_avx512_vnni.c:zng_memwrite_2 Unexecuted instantiation: adler32_c.c:zng_memwrite_2 Unexecuted instantiation: crc32_braid_c.c:zng_memwrite_2 Unexecuted instantiation: crc32_chorba_c.c:zng_memwrite_2 Unexecuted instantiation: crc32.c:zng_memwrite_2 |
53 | | |
54 | 283M | static inline void zng_memwrite_4(void *ptr, uint32_t val) { |
55 | 283M | #if defined(HAVE_MAY_ALIAS) |
56 | 283M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; |
57 | 283M | ((unaligned_uint32_t *)ptr)->val = val; |
58 | | #else |
59 | | memcpy(ptr, &val, sizeof(val)); |
60 | | #endif |
61 | 283M | } Line | Count | Source | 54 | 30.5k | static inline void zng_memwrite_4(void *ptr, uint32_t val) { | 55 | 30.5k | #if defined(HAVE_MAY_ALIAS) | 56 | 30.5k | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 57 | 30.5k | ((unaligned_uint32_t *)ptr)->val = val; | 58 | | #else | 59 | | memcpy(ptr, &val, sizeof(val)); | 60 | | #endif | 61 | 30.5k | } |
deflate_fast.c:zng_memwrite_4 Line | Count | Source | 54 | 19.0M | static inline void zng_memwrite_4(void *ptr, uint32_t val) { | 55 | 19.0M | #if defined(HAVE_MAY_ALIAS) | 56 | 19.0M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 57 | 19.0M | ((unaligned_uint32_t *)ptr)->val = val; | 58 | | #else | 59 | | memcpy(ptr, &val, sizeof(val)); | 60 | | #endif | 61 | 19.0M | } |
deflate_huff.c:zng_memwrite_4 Line | Count | Source | 54 | 94.9M | static inline void zng_memwrite_4(void *ptr, uint32_t val) { | 55 | 94.9M | #if defined(HAVE_MAY_ALIAS) | 56 | 94.9M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 57 | 94.9M | ((unaligned_uint32_t *)ptr)->val = val; | 58 | | #else | 59 | | memcpy(ptr, &val, sizeof(val)); | 60 | | #endif | 61 | 94.9M | } |
deflate_medium.c:zng_memwrite_4 Line | Count | Source | 54 | 41.6M | static inline void zng_memwrite_4(void *ptr, uint32_t val) { | 55 | 41.6M | #if defined(HAVE_MAY_ALIAS) | 56 | 41.6M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 57 | 41.6M | ((unaligned_uint32_t *)ptr)->val = val; | 58 | | #else | 59 | | memcpy(ptr, &val, sizeof(val)); | 60 | | #endif | 61 | 41.6M | } |
deflate_quick.c:zng_memwrite_4 Line | Count | Source | 54 | 580 | static inline void zng_memwrite_4(void *ptr, uint32_t val) { | 55 | 580 | #if defined(HAVE_MAY_ALIAS) | 56 | 580 | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 57 | 580 | ((unaligned_uint32_t *)ptr)->val = val; | 58 | | #else | 59 | | memcpy(ptr, &val, sizeof(val)); | 60 | | #endif | 61 | 580 | } |
deflate_rle.c:zng_memwrite_4 Line | Count | Source | 54 | 51.6M | static inline void zng_memwrite_4(void *ptr, uint32_t val) { | 55 | 51.6M | #if defined(HAVE_MAY_ALIAS) | 56 | 51.6M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 57 | 51.6M | ((unaligned_uint32_t *)ptr)->val = val; | 58 | | #else | 59 | | memcpy(ptr, &val, sizeof(val)); | 60 | | #endif | 61 | 51.6M | } |
deflate_slow.c:zng_memwrite_4 Line | Count | Source | 54 | 63.3M | static inline void zng_memwrite_4(void *ptr, uint32_t val) { | 55 | 63.3M | #if defined(HAVE_MAY_ALIAS) | 56 | 63.3M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 57 | 63.3M | ((unaligned_uint32_t *)ptr)->val = val; | 58 | | #else | 59 | | memcpy(ptr, &val, sizeof(val)); | 60 | | #endif | 61 | 63.3M | } |
Unexecuted instantiation: deflate_stored.c:zng_memwrite_4 Unexecuted instantiation: functable.c:zng_memwrite_4 Unexecuted instantiation: inflate.c:zng_memwrite_4 inftrees.c:zng_memwrite_4 Line | Count | Source | 54 | 12.9M | static inline void zng_memwrite_4(void *ptr, uint32_t val) { | 55 | 12.9M | #if defined(HAVE_MAY_ALIAS) | 56 | 12.9M | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 57 | 12.9M | ((unaligned_uint32_t *)ptr)->val = val; | 58 | | #else | 59 | | memcpy(ptr, &val, sizeof(val)); | 60 | | #endif | 61 | 12.9M | } |
Unexecuted instantiation: insert_string.c:zng_memwrite_4 Line | Count | Source | 54 | 10.5k | static inline void zng_memwrite_4(void *ptr, uint32_t val) { | 55 | 10.5k | #if defined(HAVE_MAY_ALIAS) | 56 | 10.5k | typedef struct { uint32_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint32_t; | 57 | 10.5k | ((unaligned_uint32_t *)ptr)->val = val; | 58 | | #else | 59 | | memcpy(ptr, &val, sizeof(val)); | 60 | | #endif | 61 | 10.5k | } |
Unexecuted instantiation: chunkset_sse2.c:zng_memwrite_4 Unexecuted instantiation: compare256_sse2.c:zng_memwrite_4 Unexecuted instantiation: crc32_chorba_sse2.c:zng_memwrite_4 Unexecuted instantiation: slide_hash_sse2.c:zng_memwrite_4 Unexecuted instantiation: chunkset_ssse3.c:zng_memwrite_4 Unexecuted instantiation: crc32_chorba_sse41.c:zng_memwrite_4 Unexecuted instantiation: slide_hash_avx2.c:zng_memwrite_4 Unexecuted instantiation: chunkset_avx2.c:zng_memwrite_4 Unexecuted instantiation: compare256_avx2.c:zng_memwrite_4 Unexecuted instantiation: adler32_avx2_vnni.c:zng_memwrite_4 Unexecuted instantiation: adler32_avx512.c:zng_memwrite_4 Unexecuted instantiation: chunkset_avx512.c:zng_memwrite_4 Unexecuted instantiation: compare256_avx512.c:zng_memwrite_4 Unexecuted instantiation: adler32_avx512_vnni.c:zng_memwrite_4 Unexecuted instantiation: adler32_c.c:zng_memwrite_4 Unexecuted instantiation: crc32_braid_c.c:zng_memwrite_4 Unexecuted instantiation: crc32_chorba_c.c:zng_memwrite_4 Unexecuted instantiation: crc32.c:zng_memwrite_4 |
62 | | |
63 | 30.1M | static inline void zng_memwrite_8(void *ptr, uint64_t val) { |
64 | 30.1M | #if defined(HAVE_MAY_ALIAS) |
65 | 30.1M | typedef struct { uint64_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint64_t; |
66 | 30.1M | ((unaligned_uint64_t *)ptr)->val = val; |
67 | | #else |
68 | | memcpy(ptr, &val, sizeof(val)); |
69 | | #endif |
70 | 30.1M | } Unexecuted instantiation: deflate.c:zng_memwrite_8 Unexecuted instantiation: deflate_fast.c:zng_memwrite_8 Unexecuted instantiation: deflate_huff.c:zng_memwrite_8 Unexecuted instantiation: deflate_medium.c:zng_memwrite_8 deflate_quick.c:zng_memwrite_8 Line | Count | Source | 63 | 9.94M | static inline void zng_memwrite_8(void *ptr, uint64_t val) { | 64 | 9.94M | #if defined(HAVE_MAY_ALIAS) | 65 | 9.94M | typedef struct { uint64_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint64_t; | 66 | 9.94M | ((unaligned_uint64_t *)ptr)->val = val; | 67 | | #else | 68 | | memcpy(ptr, &val, sizeof(val)); | 69 | | #endif | 70 | 9.94M | } |
Unexecuted instantiation: deflate_rle.c:zng_memwrite_8 Unexecuted instantiation: deflate_slow.c:zng_memwrite_8 Unexecuted instantiation: deflate_stored.c:zng_memwrite_8 Unexecuted instantiation: functable.c:zng_memwrite_8 Unexecuted instantiation: inflate.c:zng_memwrite_8 Unexecuted instantiation: inftrees.c:zng_memwrite_8 Unexecuted instantiation: insert_string.c:zng_memwrite_8 Line | Count | Source | 63 | 20.2M | static inline void zng_memwrite_8(void *ptr, uint64_t val) { | 64 | 20.2M | #if defined(HAVE_MAY_ALIAS) | 65 | 20.2M | typedef struct { uint64_t val; } __attribute__ ((__packed__, __may_alias__)) unaligned_uint64_t; | 66 | 20.2M | ((unaligned_uint64_t *)ptr)->val = val; | 67 | | #else | 68 | | memcpy(ptr, &val, sizeof(val)); | 69 | | #endif | 70 | 20.2M | } |
Unexecuted instantiation: chunkset_sse2.c:zng_memwrite_8 Unexecuted instantiation: compare256_sse2.c:zng_memwrite_8 Unexecuted instantiation: crc32_chorba_sse2.c:zng_memwrite_8 Unexecuted instantiation: slide_hash_sse2.c:zng_memwrite_8 Unexecuted instantiation: chunkset_ssse3.c:zng_memwrite_8 Unexecuted instantiation: crc32_chorba_sse41.c:zng_memwrite_8 Unexecuted instantiation: slide_hash_avx2.c:zng_memwrite_8 Unexecuted instantiation: chunkset_avx2.c:zng_memwrite_8 Unexecuted instantiation: compare256_avx2.c:zng_memwrite_8 Unexecuted instantiation: adler32_avx2_vnni.c:zng_memwrite_8 Unexecuted instantiation: adler32_avx512.c:zng_memwrite_8 Unexecuted instantiation: chunkset_avx512.c:zng_memwrite_8 Unexecuted instantiation: compare256_avx512.c:zng_memwrite_8 Unexecuted instantiation: adler32_avx512_vnni.c:zng_memwrite_8 Unexecuted instantiation: adler32_c.c:zng_memwrite_8 Unexecuted instantiation: crc32_braid_c.c:zng_memwrite_8 Unexecuted instantiation: crc32_chorba_c.c:zng_memwrite_8 Unexecuted instantiation: crc32.c:zng_memwrite_8 |
71 | | |
72 | | /* Use zng_memread_* instead of memcmp to avoid older compilers not converting memcmp |
73 | | calls to unaligned comparisons when unaligned access is supported. Use memcmp only when |
74 | | unaligned support is not available to avoid an extra call to memcpy. */ |
75 | 0 | static inline int32_t zng_memcmp_2(const void * Z_RESTRICT src0, const void * Z_RESTRICT src1) { |
76 | 0 | #if defined(HAVE_MAY_ALIAS) || defined(_MSC_VER) |
77 | 0 | return zng_memread_2(src0) != zng_memread_2(src1); |
78 | 0 | #else |
79 | 0 | return memcmp(src0, src1, 2); |
80 | 0 | #endif |
81 | 0 | } Unexecuted instantiation: deflate.c:zng_memcmp_2 Unexecuted instantiation: deflate_fast.c:zng_memcmp_2 Unexecuted instantiation: deflate_huff.c:zng_memcmp_2 Unexecuted instantiation: deflate_medium.c:zng_memcmp_2 Unexecuted instantiation: deflate_quick.c:zng_memcmp_2 Unexecuted instantiation: deflate_rle.c:zng_memcmp_2 Unexecuted instantiation: deflate_slow.c:zng_memcmp_2 Unexecuted instantiation: deflate_stored.c:zng_memcmp_2 Unexecuted instantiation: functable.c:zng_memcmp_2 Unexecuted instantiation: inflate.c:zng_memcmp_2 Unexecuted instantiation: inftrees.c:zng_memcmp_2 Unexecuted instantiation: insert_string.c:zng_memcmp_2 Unexecuted instantiation: trees.c:zng_memcmp_2 Unexecuted instantiation: chunkset_sse2.c:zng_memcmp_2 Unexecuted instantiation: compare256_sse2.c:zng_memcmp_2 Unexecuted instantiation: crc32_chorba_sse2.c:zng_memcmp_2 Unexecuted instantiation: slide_hash_sse2.c:zng_memcmp_2 Unexecuted instantiation: chunkset_ssse3.c:zng_memcmp_2 Unexecuted instantiation: crc32_chorba_sse41.c:zng_memcmp_2 Unexecuted instantiation: slide_hash_avx2.c:zng_memcmp_2 Unexecuted instantiation: chunkset_avx2.c:zng_memcmp_2 Unexecuted instantiation: compare256_avx2.c:zng_memcmp_2 Unexecuted instantiation: adler32_avx2_vnni.c:zng_memcmp_2 Unexecuted instantiation: adler32_avx512.c:zng_memcmp_2 Unexecuted instantiation: chunkset_avx512.c:zng_memcmp_2 Unexecuted instantiation: compare256_avx512.c:zng_memcmp_2 Unexecuted instantiation: adler32_avx512_vnni.c:zng_memcmp_2 Unexecuted instantiation: adler32_c.c:zng_memcmp_2 Unexecuted instantiation: crc32_braid_c.c:zng_memcmp_2 Unexecuted instantiation: crc32_chorba_c.c:zng_memcmp_2 Unexecuted instantiation: crc32.c:zng_memcmp_2 |
82 | | |
83 | 0 | static inline int32_t zng_memcmp_4(const void * Z_RESTRICT src0, const void * Z_RESTRICT src1) { |
84 | 0 | #if defined(HAVE_MAY_ALIAS) || defined(_MSC_VER) |
85 | 0 | return zng_memread_4(src0) != zng_memread_4(src1); |
86 | 0 | #else |
87 | 0 | return memcmp(src0, src1, 4); |
88 | 0 | #endif |
89 | 0 | } Unexecuted instantiation: deflate.c:zng_memcmp_4 Unexecuted instantiation: deflate_fast.c:zng_memcmp_4 Unexecuted instantiation: deflate_huff.c:zng_memcmp_4 Unexecuted instantiation: deflate_medium.c:zng_memcmp_4 Unexecuted instantiation: deflate_quick.c:zng_memcmp_4 Unexecuted instantiation: deflate_rle.c:zng_memcmp_4 Unexecuted instantiation: deflate_slow.c:zng_memcmp_4 Unexecuted instantiation: deflate_stored.c:zng_memcmp_4 Unexecuted instantiation: functable.c:zng_memcmp_4 Unexecuted instantiation: inflate.c:zng_memcmp_4 Unexecuted instantiation: inftrees.c:zng_memcmp_4 Unexecuted instantiation: insert_string.c:zng_memcmp_4 Unexecuted instantiation: trees.c:zng_memcmp_4 Unexecuted instantiation: chunkset_sse2.c:zng_memcmp_4 Unexecuted instantiation: compare256_sse2.c:zng_memcmp_4 Unexecuted instantiation: crc32_chorba_sse2.c:zng_memcmp_4 Unexecuted instantiation: slide_hash_sse2.c:zng_memcmp_4 Unexecuted instantiation: chunkset_ssse3.c:zng_memcmp_4 Unexecuted instantiation: crc32_chorba_sse41.c:zng_memcmp_4 Unexecuted instantiation: slide_hash_avx2.c:zng_memcmp_4 Unexecuted instantiation: chunkset_avx2.c:zng_memcmp_4 Unexecuted instantiation: compare256_avx2.c:zng_memcmp_4 Unexecuted instantiation: adler32_avx2_vnni.c:zng_memcmp_4 Unexecuted instantiation: adler32_avx512.c:zng_memcmp_4 Unexecuted instantiation: chunkset_avx512.c:zng_memcmp_4 Unexecuted instantiation: compare256_avx512.c:zng_memcmp_4 Unexecuted instantiation: adler32_avx512_vnni.c:zng_memcmp_4 Unexecuted instantiation: adler32_c.c:zng_memcmp_4 Unexecuted instantiation: crc32_braid_c.c:zng_memcmp_4 Unexecuted instantiation: crc32_chorba_c.c:zng_memcmp_4 Unexecuted instantiation: crc32.c:zng_memcmp_4 |
90 | | |
91 | 75.0M | static inline int32_t zng_memcmp_8(const void * Z_RESTRICT src0, const void * Z_RESTRICT src1) { |
92 | 75.0M | #if defined(HAVE_MAY_ALIAS) || defined(_MSC_VER) |
93 | 75.0M | return zng_memread_8(src0) != zng_memread_8(src1); |
94 | | #else |
95 | | return memcmp(src0, src1, 8); |
96 | | #endif |
97 | 75.0M | } Unexecuted instantiation: deflate.c:zng_memcmp_8 Unexecuted instantiation: deflate_fast.c:zng_memcmp_8 Unexecuted instantiation: deflate_huff.c:zng_memcmp_8 Unexecuted instantiation: deflate_medium.c:zng_memcmp_8 Unexecuted instantiation: deflate_quick.c:zng_memcmp_8 Unexecuted instantiation: deflate_rle.c:zng_memcmp_8 Unexecuted instantiation: deflate_slow.c:zng_memcmp_8 Unexecuted instantiation: deflate_stored.c:zng_memcmp_8 Unexecuted instantiation: functable.c:zng_memcmp_8 Unexecuted instantiation: inflate.c:zng_memcmp_8 Unexecuted instantiation: inftrees.c:zng_memcmp_8 Unexecuted instantiation: insert_string.c:zng_memcmp_8 Unexecuted instantiation: trees.c:zng_memcmp_8 Unexecuted instantiation: chunkset_sse2.c:zng_memcmp_8 Unexecuted instantiation: compare256_sse2.c:zng_memcmp_8 Unexecuted instantiation: crc32_chorba_sse2.c:zng_memcmp_8 Unexecuted instantiation: slide_hash_sse2.c:zng_memcmp_8 Unexecuted instantiation: chunkset_ssse3.c:zng_memcmp_8 Unexecuted instantiation: crc32_chorba_sse41.c:zng_memcmp_8 Unexecuted instantiation: slide_hash_avx2.c:zng_memcmp_8 Unexecuted instantiation: chunkset_avx2.c:zng_memcmp_8 compare256_avx2.c:zng_memcmp_8 Line | Count | Source | 91 | 75.0M | static inline int32_t zng_memcmp_8(const void * Z_RESTRICT src0, const void * Z_RESTRICT src1) { | 92 | 75.0M | #if defined(HAVE_MAY_ALIAS) || defined(_MSC_VER) | 93 | 75.0M | return zng_memread_8(src0) != zng_memread_8(src1); | 94 | | #else | 95 | | return memcmp(src0, src1, 8); | 96 | | #endif | 97 | 75.0M | } |
Unexecuted instantiation: adler32_avx2_vnni.c:zng_memcmp_8 Unexecuted instantiation: adler32_avx512.c:zng_memcmp_8 Unexecuted instantiation: chunkset_avx512.c:zng_memcmp_8 Unexecuted instantiation: compare256_avx512.c:zng_memcmp_8 Unexecuted instantiation: adler32_avx512_vnni.c:zng_memcmp_8 Unexecuted instantiation: adler32_c.c:zng_memcmp_8 Unexecuted instantiation: crc32_braid_c.c:zng_memcmp_8 Unexecuted instantiation: crc32_chorba_c.c:zng_memcmp_8 Unexecuted instantiation: crc32.c:zng_memcmp_8 |
98 | | |
99 | | #endif |