Debian Codegraph @

debian/patches/x32-ftbfs.patch

raw symbols SCIP
1 Description: fix build on x32 https://wiki.debian.org/X32Port
2 Author: Sébastien Noel <[email protected]>
3 Forwarded: TODO
4 Last-Update: 2026-05-13
5
6 --- a/include/dr_libs/dr_flac.h
7 +++ b/include/dr_libs/dr_flac.h
8 @@ -2716,17 +2716,9 @@ static DRFLAC_INLINE drflac_uint32 drfla
9 #if defined(__GNUC__) || defined(__clang__)
10 #if defined(DRFLAC_X64)
11 {
12 - /*
13 - A note on lzcnt.
14 -
15 - We check for the presence of the lzcnt instruction at runtime before calling this function, but we still generate this code. I have had
16 - a report where the assembler does not recognize the lzcnt instruction. To work around this we are going to use `rep; bsr` instead which
17 - has an identical byte encoding as lzcnt, and should hopefully improve compatibility with older assemblers.
18 - */
19 - drflac_uint64 r;
20 + drflac_cache_t r;
21 __asm__ __volatile__ (
22 - "rep; bsr{q %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc"
23 - /*"lzcnt{ %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc"*/
24 + "lzcnt{ %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc"
25 );
26
27 return (drflac_uint32)r;
28 @@ -2735,8 +2727,7 @@ static DRFLAC_INLINE drflac_uint32 drfla
29 {
30 drflac_uint32 r;
31 __asm__ __volatile__ (
32 - "rep; bsr{l %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc"
33 - /*"lzcnt{l %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc"*/
34 + "lzcnt{l %1, %0| %0, %1}" : "=r"(r) : "r"(x) : "cc"
35 );
36
37 return r;