[Ffmpeg-devel] [PATCH] Upate of Zaurus IWMMXT patch
Måns Rullgård
mans
Tue Apr 10 14:51:11 CEST 2007
Vadim Lebedev <vadim at mbdsys.com> writes:
> David Bateman wrote:
>
>> +static void clear_blocks_iwmmxt(DCTELEM *blocks)
>>+{
>>+ __asm __volatile(
>>+ "wzero wr0 \n\t"
>>+ "mov r1, #(128 * 6 / 32) \n\t"
>>+ "1: \n\t"
>>+ "wstrd wr0, [%0] \n\t"
>>+ "wstrd wr0, [%0, #8] \n\t"
>>+ "wstrd wr0, [%0, #16] \n\t"
>>+ "wstrd wr0, [%0, #24] \n\t"
>>+ "subs r1, r1, #1 \n\t"
>>+ "add %0, %0, #32 \n\t"
>>+ "bne 1b \n\t"
>>+ : "+r"(blocks)
>>+ :
>>+ : "r1"
>>+ );
>>+}
>>+
>>
>>
> I'm affraid my ARM asm skills are a little rusty but
> shouldn't the order of these 2 lines be inverted, becase ADD
> instruction clears Z flag?
No. The flags are only set by instructions with the 's' modifier,
i.e. add does not alter the flags, but adds does. That's the beauty
of ARM assembler.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list