Merge pull request #9847 from vnen/patch-zstd
zstd: Apply upstream patch to fix UWP ARM build
This commit is contained in:
commit
a12fa5b879
2 changed files with 13 additions and 8 deletions
12
thirdparty/zstd/common/zstd_internal.h
vendored
12
thirdparty/zstd/common/zstd_internal.h
vendored
|
@ -331,4 +331,16 @@ size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs,
|
||||||
ZSTD_parameters ZSTD_getParamsFromCDict(const ZSTD_CDict* cdict);
|
ZSTD_parameters ZSTD_getParamsFromCDict(const ZSTD_CDict* cdict);
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
blockType_e blockType;
|
||||||
|
U32 lastBlock;
|
||||||
|
U32 origSize;
|
||||||
|
} blockProperties_t;
|
||||||
|
|
||||||
|
/*! ZSTD_getcBlockSize() :
|
||||||
|
* Provides the size of compressed block from block header `src` */
|
||||||
|
size_t ZSTD_getcBlockSize(const void* src, size_t srcSize,
|
||||||
|
blockProperties_t* bpPtr);
|
||||||
|
|
||||||
|
|
||||||
#endif /* ZSTD_CCOMMON_H_MODULE */
|
#endif /* ZSTD_CCOMMON_H_MODULE */
|
||||||
|
|
9
thirdparty/zstd/decompress/zstd_decompress.c
vendored
9
thirdparty/zstd/decompress/zstd_decompress.c
vendored
|
@ -53,7 +53,7 @@
|
||||||
# include "zstd_legacy.h"
|
# include "zstd_legacy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && !defined(_M_IA64) /* _mm_prefetch() is not defined for ia64 */
|
#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_I86)) /* _mm_prefetch() is not defined outside of x86/x64 */
|
||||||
# include <mmintrin.h> /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */
|
# include <mmintrin.h> /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */
|
||||||
# define ZSTD_PREFETCH(ptr) _mm_prefetch((const char*)ptr, _MM_HINT_T0)
|
# define ZSTD_PREFETCH(ptr) _mm_prefetch((const char*)ptr, _MM_HINT_T0)
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
|
@ -466,13 +466,6 @@ static size_t ZSTD_decodeFrameHeader(ZSTD_DCtx* dctx, const void* src, size_t he
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
blockType_e blockType;
|
|
||||||
U32 lastBlock;
|
|
||||||
U32 origSize;
|
|
||||||
} blockProperties_t;
|
|
||||||
|
|
||||||
/*! ZSTD_getcBlockSize() :
|
/*! ZSTD_getcBlockSize() :
|
||||||
* Provides the size of compressed block from block header `src` */
|
* Provides the size of compressed block from block header `src` */
|
||||||
size_t ZSTD_getcBlockSize(const void* src, size_t srcSize,
|
size_t ZSTD_getcBlockSize(const void* src, size_t srcSize,
|
||||||
|
|
Loading…
Reference in a new issue