mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
svolume: Mark channel parameter as earlyclobber
For all our MMX/SSE code, we use a temporary channel variable, assigned to the DI register, which is zero'ed as the very first operation in the inline assembly code, before any other code is run. With GCC 9.1, while using -O2, the DI register is also used for the input operand. This is perfectly legal, but causes our code to become incorrect because the output operand that is assigned to DI is not explicitly marked as being clobbered before inputs are read. This change fixes the problem by adding an earlyclobber annotation (&) to the DI output argument.
This commit is contained in:
parent
e34dd0fb8f
commit
e8fe04b2f6
2 changed files with 4 additions and 4 deletions
|
|
@ -149,7 +149,7 @@ static void pa_volume_s16ne_mmx(int16_t *samples, const int32_t *volumes, unsign
|
|||
"6: \n\t"
|
||||
" emms \n\t"
|
||||
|
||||
: "+r" (samples), "+r" (volumes), "+r" (length), "=D" (channel), "=&r" (temp)
|
||||
: "+r" (samples), "+r" (volumes), "+r" (length), "=&D" (channel), "=&r" (temp)
|
||||
#if defined (__i386__)
|
||||
: "m" (channels)
|
||||
#else
|
||||
|
|
@ -228,7 +228,7 @@ static void pa_volume_s16re_mmx(int16_t *samples, const int32_t *volumes, unsign
|
|||
"6: \n\t"
|
||||
" emms \n\t"
|
||||
|
||||
: "+r" (samples), "+r" (volumes), "+r" (length), "=D" (channel), "=&r" (temp)
|
||||
: "+r" (samples), "+r" (volumes), "+r" (length), "=&D" (channel), "=&r" (temp)
|
||||
#if defined (__i386__)
|
||||
: "m" (channels)
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ static void pa_volume_s16ne_sse2(int16_t *samples, const int32_t *volumes, unsig
|
|||
" jne 7b \n\t"
|
||||
"8: \n\t"
|
||||
|
||||
: "+r" (samples), "+r" (volumes), "+r" (length), "=D" (channel), "=&r" (temp)
|
||||
: "+r" (samples), "+r" (volumes), "+r" (length), "=&D" (channel), "=&r" (temp)
|
||||
#if defined (__i386__)
|
||||
: "m" (channels)
|
||||
#else
|
||||
|
|
@ -239,7 +239,7 @@ static void pa_volume_s16re_sse2(int16_t *samples, const int32_t *volumes, unsig
|
|||
" jne 7b \n\t"
|
||||
"8: \n\t"
|
||||
|
||||
: "+r" (samples), "+r" (volumes), "+r" (length), "=D" (channel), "=&r" (temp)
|
||||
: "+r" (samples), "+r" (volumes), "+r" (length), "=&D" (channel), "=&r" (temp)
|
||||
#if defined (__i386__)
|
||||
: "m" (channels)
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue