pcm: dmix: i386: keep the size operand in memory
A message that is not in the archive (sent off-list or not yet received): alsa-project/alsa-lib/pr/[email protected]
alsa-project/alsa-lib pull request #537 was opened from yegorich:
The i386 mix_areas_*() assembly clobbers esi, edi, edx, ecx, eax and ebx. At -Os gcc also uses ebp as frame pointer, so no general purpose register is left.
Since abc9f32cf45c ("pcm: dmix: assembly: give more freedom over the constraints") the size operand is "+&rm". With AVX512BW enabled (-march=skylake-avx512, cannonlake, icelake-client, x86-64-v4, or -mavx512bw) and -Os/-Oz, gcc 15.3 and 16.2 then fail:
``` pcm_dmix_i386.h:52:9: error: 'asm' operand has impossible constraints or there are not enough registers ```
This patch restores the "+m" constraint used before that commit for size, in all five functions.
Found by the Buildroot autobuilders: https://autobuild.buildroot.org/results/ff613c2d94c35a38a5886b70d72aa37b58440b5d
Testing: compiled pcm_dmix_i386.h with gcc 15.3.0 and 16.2.0 (i686), for -O0/-O1/-O2/-O3/-Os/-Oz × 9 -march values × with/without -fPIC. Before: all -Os/-Oz + AVX512BW combinations fail. After: all 108 combinations build. A full i686 Buildroot build of alsa-lib with the failing configuration passes as well.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Request URL : https://github.com/alsa-project/alsa-lib/pull/537
Patch URL : https://github.com/alsa-project/alsa-lib/pull/537.patch
Repository URL: https://github.com/alsa-project/alsa-lib