]> git.ipfire.org Git - thirdparty/haproxy.git/commit
IMPORT: slz: use the correct CRC32 instruction when running in 32-bit mode
authorWilly Tarreau <w@1wt.eu>
Fri, 3 Dec 2021 16:38:42 +0000 (17:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Dec 2021 08:14:20 +0000 (09:14 +0100)
commitb154422db10bee52050668d7679c140ed27800cd
treed95ff27b6deaff88b21f2da47e5c85d32104aec4
parent88bc800eae8d0a2118a273afc52ecdc529c9f523
IMPORT: slz: use the correct CRC32 instruction when running in 32-bit mode

Many ARMv8 processors also support Aarch32 and can run armv7 and even
thumb2 code. While armv8 compilers will not emit these instructions,
armv7 compilers that are aware of these processors will do. For
example, using gcc built for an armv7 target and passing it
"-mcpu=cortex-a72" or "-march=armv8-a+crc" will result in the CRC32
instruction to be used.

In this case the current assembly code fails because with the ARM and
Thumb2 instruction sets there is no such "%wX" half-registers. We need
to use "%X" instead as the native 32-bit register when running with a
32-bit instruction set, and use "%wX" when using the 64-bit instruction
set (A64).

This is slz upstream commit fab83248612a1e8ee942963fe916a9cdbf085097
src/slz.c