From e9053c907250c70d98b319d95fa54cb94fc76869 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 16 Feb 2024 21:50:15 +0100 Subject: [PATCH] liblzma/rangecoder: Exclude x32 from the x86-64 optimisation. The x32 port has a x86-64 ABI in term of all registers but uses only 32bit pointer like x86-32. The assembly optimisation fails to compile on x32. Given the state of x32 I suggest to exclude it from the optimisation rather than trying to fix it. Signed-off-by: Sebastian Andrzej Siewior --- src/liblzma/rangecoder/range_decoder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liblzma/rangecoder/range_decoder.h b/src/liblzma/rangecoder/range_decoder.h index eec721ac..a8ad5f02 100644 --- a/src/liblzma/rangecoder/range_decoder.h +++ b/src/liblzma/rangecoder/range_decoder.h @@ -37,7 +37,7 @@ // The default can be overridden at build time by defining // LZMA_RANGE_DECODER_CONFIG to the desired mask. #ifndef LZMA_RANGE_DECODER_CONFIG -# if defined(__x86_64__) && (defined(__GNUC__) || defined(__clang__)) +# if defined(__x86_64__) && !defined(__ILP32__) && (defined(__GNUC__) || defined(__clang__)) # define LZMA_RANGE_DECODER_CONFIG 0x1F0 # else # define LZMA_RANGE_DECODER_CONFIG 0x03