Pelles C forum

Pelles C => Bug reports => Topic started by: TimoVJL on May 01, 2025, 03:56:53 PM

Title: 7Zip problems
Post by: TimoVJL on May 01, 2025, 03:56:53 PM
These errors came:
7Zip\C\7zArcIn.c(965): warning #3001: Register pressure too high; try to rearrange the code (around line 965).
7Zip\C\7zArcIn.c(965): fatal error #3001: Register pressure too high; try to rearrange the code (around line 965).

7Zip\C\Bcj2.c(64): warning #2018: Undeclared function '_byteswap_ulong' (did you mean: ?); assuming 'extern' returning 'int'.
7Zip\C\Bcj2.c(251): warning #2018: Undeclared function '_byteswap_ulong' (did you mean: ?); assuming 'extern' returning 'int'.

7Zip\C\Bra.c(420): error #3114: [asm] Invalid instruction operand.
7Zip\C\Bra.c(420): error #3114: [asm] Invalid instruction operand.

7Zip\C\CpuArch.c(181): error #3152: [asm] Expected ')'.
7Zip\C\CpuArch.c(181): error #3151: [asm] Syntax error.
...
I will edit this later for possible findings.
Title: Re: 7Zip problems
Post by: Pelle on May 03, 2025, 05:19:42 PM
I will fix the "Invalid instruction operand" error in Bra.c (line 420). This affects both X86 and X64.
I will not fix the "Register pressure too high ..." error; This can be worked around either by switching from X86 to X64 mode, or by rewriting (splitting up) the expression in 7zArcIn.c (line 965).

There are other warnings (and errors) because the 7-Zip source code is somewhat messy, but I can't do much about that...
Title: Re: 7Zip problems
Post by: TimoVJL on May 03, 2025, 06:02:34 PM
Thanks.
Those prebuild SFXs are available already.
Just a test compile case.

Hint for testing with Clang compiler with Pelles C headers, add to winnt.h line 13888 && !defined(__clang__) to avoid useless errors
#if defined(_M_AMD64) && !defined(_M_ARM64EC) && !defined(__midl) && !defined(__clang__)