"Ronald S. Bultje" <[email protected]> writes: > Hi, > > On Mon, Jun 20, 2011 at 5:55 AM, Mans Rullgard <[email protected]> wrote: >> Signed-off-by: Mans Rullgard <[email protected]> >> --- >> libavcodec/x86/h264_i386.h | 65 >> +++++++++++++++++++++++--------------------- >> 1 files changed, 34 insertions(+), 31 deletions(-) >> >> diff --git a/libavcodec/x86/h264_i386.h b/libavcodec/x86/h264_i386.h >> index b303347..d38b18e 100644 >> --- a/libavcodec/x86/h264_i386.h >> +++ b/libavcodec/x86/h264_i386.h >> @@ -45,25 +45,26 @@ static int decode_significance_x86(CABACContext *c, int >> max_coeff, >> int bit; >> x86_reg coeff_count; >> int low; >> + int range; >> __asm__ volatile( >> - "movl %a10(%5), %%esi \n\t" >> - "movl %a11(%5), %3 \n\t" >> + "movl %a11(%6), %5 \n\t" >> + "movl %a12(%6), %3 \n\t" > [..] >> + "movl %5, %a11(%6) \n\t" >> + "movl %3, %a12(%6) \n\t" >> + :"=&r"(coeff_count),"+m"(last), "+m"(index), "=&r"(low), "=&r"(bit), >> + "=&r"(range) > > Patch OK. > > Having said that, the above code very much smells like stuff that gcc > might just get right, so why not change it to a r/w register instead > of w-only, and do the assignments outside the inline assembly? The > code may actually become readable then.
It's worth a try. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
