[FFmpeg-devel] [PATCH]replace movw instruction in ac3dsp_armv6.S
pin xue
pinxue at gmail.com
Sat Apr 9 10:05:11 CEST 2011
AS libavcodec/arm/ac3dsp_armv6.o
ffmpeg-src/libavcodec/arm/ac3dsp_armv6.S: Assembler messages:
ffmpeg-src/libavcodec/arm/ac3dsp_armv6.S:40: Error: selected processor
does not support `movw r8,#0x1fe0'
make[1]: *** [libavcodec/arm/ac3dsp_armv6.o] Error 1
MOVW is ARMv7 way to load constant:
* movw, or move wide, will move a 16-bit constant into a register,
implicitly zeroing the top 16 bits of the target register.
* movt, or move top, will move a 16-bit constant into the top half
of a given register without altering the bottom 16 bits
To load 32 bit constant, movw lower16; movt upper16; is better than
ldr if available, because:
While this approach takes two instructions, it does not require any
extra space to store the constant so both the movw/movt method and the
ldr method will end up using the same amount of memory. Memory
bandwidth is precious in and the movw/movt approach avoids an extra
read on the data side, not to mention the read could have missed the
cache.
But here it is armv6 optimization, so that we have to use ldr.
--
Best Regards!
Yang Wu
--------------------------------------------------------
Location: Pudong, Shanghai, China.
EMail : pinxue at gmail.com
RockPlayer Website: http://rockplayer.com
Twitter/t.sina : @pinxue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ac3dsp_armv6_load_const.patch
Type: application/octet-stream
Size: 622 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110409/6be66c13/attachment.obj>
More information about the ffmpeg-devel
mailing list