]> git.ipfire.org Git - thirdparty/zstd.git/commit
[asm] Share portability macros and restrict ASM further 2893/head
authorNick Terrell <terrelln@fb.com>
Wed, 1 Dec 2021 20:52:23 +0000 (12:52 -0800)
committerNick Terrell <terrelln@fb.com>
Fri, 3 Dec 2021 00:58:04 +0000 (16:58 -0800)
commitc284569457febd659f6afecdc74c0e26ea700fd4
tree35e95494d70eba76d3ff85c5f78b18ddf226da29
parent647c1b6615f1be174d6d8bf1c13ac3172fbd70d1
[asm] Share portability macros and restrict ASM further

Move portability macros to `lib/common/portability_macros.h`. This file
only contains platform/feature detection (e.g. 0/1 macros). This file is
shared between C and ASM code, so it cannot include any C code.

Rename `HUF_` ASM macros to be `ZSTD_` prefixed, and move to the new
header.

Restrict `ZSTD_ASM_SUPPORTED` to `__GNUC__`, because we need the GAS
assembler.

Finally, only include the ASM code if we are actually going to use it.
This disables it on all Windows platforms, which should resolve the
problem brought up in Issue #2789.
build/single_file_libs/zstd-in.c
build/single_file_libs/zstddeclib-in.c
contrib/linux-kernel/decompress_sources.h
lib/common/compiler.h
lib/common/portability_macros.h [new file with mode: 0644]
lib/decompress/huf_decompress.c
lib/decompress/huf_decompress_amd64.S
lib/libzstd.mk