[Library] Update zlibng (#1255)

* Update zlibng

* Set cmake path more directly in zlibng to hopefully fix an issue with the build on drone

* I'm dumb, missing / in path

* Mackal helps with a dumb gitignore issue

* Adding all the files, not sure what's ignoring them and im tired of looking

* Some tweaks to zlibng build to hopefully get it to build properly. works on msvc now
This commit is contained in:
Alex
2021-02-23 17:00:26 -08:00
committed by GitHub
parent e6dee96266
commit 2957f5084d
184 changed files with 21431 additions and 11703 deletions
+14 -19
View File
@@ -5,21 +5,16 @@
*
*/
#ifdef __ARM_FEATURE_CRC32
# include <arm_acle.h>
# ifdef ZLIB_COMPAT
# include <zconf.h>
# else
# include <zconf-ng.h>
# endif
# ifdef __linux__
# include <stddef.h>
# endif
#ifdef ARM_ACLE_CRC_HASH
#ifndef _MSC_VER
# include <arm_acle.h>
#endif
#include "../../zutil.h"
uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, uint64_t len) {
register uint32_t c;
register const uint16_t *buf2;
register const uint32_t *buf4;
Z_REGISTER uint32_t c;
Z_REGISTER const uint16_t *buf2;
Z_REGISTER const uint32_t *buf4;
c = ~crc;
if (len && ((ptrdiff_t)buf & 1)) {
@@ -36,7 +31,7 @@ uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, uint64_t len) {
buf4 = (const uint32_t *) buf;
}
# if defined(__aarch64__)
#if defined(__aarch64__)
if ((len > sizeof(uint32_t)) && ((ptrdiff_t)buf & sizeof(uint32_t))) {
c = __crc32w(c, *buf4++);
len -= sizeof(uint32_t);
@@ -44,7 +39,7 @@ uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, uint64_t len) {
const uint64_t *buf8 = (const uint64_t *) buf4;
# ifdef UNROLL_MORE
#ifdef UNROLL_MORE
while (len >= 4 * sizeof(uint64_t)) {
c = __crc32d(c, *buf8++);
c = __crc32d(c, *buf8++);
@@ -52,7 +47,7 @@ uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, uint64_t len) {
c = __crc32d(c, *buf8++);
len -= 4 * sizeof(uint64_t);
}
# endif
#endif
while (len >= sizeof(uint64_t)) {
c = __crc32d(c, *buf8++);
@@ -74,7 +69,7 @@ uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, uint64_t len) {
}
buf = (const unsigned char *) buf2;
# else /* __aarch64__ */
#else /* __aarch64__ */
# ifdef UNROLL_MORE
while (len >= 8 * sizeof(uint32_t)) {
@@ -103,7 +98,7 @@ uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, uint64_t len) {
} else {
buf = (const unsigned char *) buf4;
}
# endif /* __aarch64__ */
#endif /* __aarch64__ */
if (len) {
c = __crc32b(c, *buf);
@@ -112,4 +107,4 @@ uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, uint64_t len) {
c = ~c;
return c;
}
#endif /* __ARM_FEATURE_CRC32 */
#endif