fix: breakpad use miniz
Some checks failed
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Successful in 1m34s
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Successful in 2m46s
sm-rpc / build (Debug, host.gcc) (push) Failing after 1m28s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Successful in 2m14s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Successful in 2m8s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Successful in 5m35s
sm-rpc / build (Release, host.gcc) (push) Failing after 1m55s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Successful in 7m21s
Some checks failed
sm-rpc / build (Debug, arm-linux-gnueabihf) (push) Successful in 1m34s
sm-rpc / build (Debug, aarch64-linux-gnu) (push) Successful in 2m46s
sm-rpc / build (Debug, host.gcc) (push) Failing after 1m28s
sm-rpc / build (Release, aarch64-linux-gnu) (push) Successful in 2m14s
sm-rpc / build (Release, arm-linux-gnueabihf) (push) Successful in 2m8s
sm-rpc / build (Debug, mipsel-linux-gnu) (push) Successful in 5m35s
sm-rpc / build (Release, host.gcc) (push) Failing after 1m55s
sm-rpc / build (Release, mipsel-linux-gnu) (push) Successful in 7m21s
This commit is contained in:
52
third_party/zlib-ng/arch/generic/slide_hash_c.c
vendored
Normal file
52
third_party/zlib-ng/arch/generic/slide_hash_c.c
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/* slide_hash.c -- slide hash table C implementation
|
||||
*
|
||||
* Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#include "zbuild.h"
|
||||
#include "deflate.h"
|
||||
|
||||
/* ===========================================================================
|
||||
* Slide the hash table when sliding the window down (could be avoided with 32
|
||||
* bit values at the expense of memory usage). We slide even when level == 0 to
|
||||
* keep the hash table consistent if we switch back to level > 0 later.
|
||||
*/
|
||||
static inline void slide_hash_c_chain(Pos *table, uint32_t entries, uint16_t wsize) {
|
||||
#ifdef NOT_TWEAK_COMPILER
|
||||
table += entries;
|
||||
do {
|
||||
unsigned m;
|
||||
m = *--table;
|
||||
*table = (Pos)(m >= wsize ? m-wsize : 0);
|
||||
/* If entries is not on any hash chain, prev[entries] is garbage but
|
||||
* its value will never be used.
|
||||
*/
|
||||
} while (--entries);
|
||||
#else
|
||||
{
|
||||
/* As of I make this change, gcc (4.8.*) isn't able to vectorize
|
||||
* this hot loop using saturated-subtraction on x86-64 architecture.
|
||||
* To avoid this defect, we can change the loop such that
|
||||
* o. the pointer advance forward, and
|
||||
* o. demote the variable 'm' to be local to the loop, and
|
||||
* choose type "Pos" (instead of 'unsigned int') for the
|
||||
* variable to avoid unnecessary zero-extension.
|
||||
*/
|
||||
unsigned int i;
|
||||
Pos *q = table;
|
||||
for (i = 0; i < entries; i++) {
|
||||
Pos m = *q;
|
||||
Pos t = (Pos)wsize;
|
||||
*q++ = (Pos)(m >= t ? m-t: 0);
|
||||
}
|
||||
}
|
||||
#endif /* NOT_TWEAK_COMPILER */
|
||||
}
|
||||
|
||||
Z_INTERNAL void slide_hash_c(deflate_state *s) {
|
||||
uint16_t wsize = (uint16_t)s->w_size;
|
||||
|
||||
slide_hash_c_chain(s->head, HASH_SIZE, wsize);
|
||||
slide_hash_c_chain(s->prev, wsize, wsize);
|
||||
}
|
Reference in New Issue
Block a user