문제

I encountered some compilation errors when trying to migrate latest ffmpeg to iOS platform. Those errors came from the GNU assembler (gas), which seems unable to handle some asm instructions in the latest ffmpeg.

For example:

libavcodec/arm/dsputil_armv6.S:109:bad instruction 'ldr_post r4,r1,r2'

However, instruction 'ldr_post' is not found in previous version of ffmpeg (more specific, version 0.7).

My question is, what is the difference between 'ldr_post' and 'ldr'? Can I change 'ldr_post' to the combination of a few simpler instructions, to avoid these compilation errors?

도움이 되었습니까?

해결책

From asm.S:

.macro  ldr_post        rt,  rn,  rm:vararg
A       ldr             \rt, [\rn], \rm
T       ldr             \rt, [\rn]
T       add             \rn, \rn, \rm
.endm

'A' marks instructions emitted in ARM mode, 'T' in Thumb mode. So basically it's equivalent to ldr r4, [r1], r2 but works both in ARM and Thumb modes (Thumb-1 doesn't support the post-increment version so it has to be simulated with two instructions).

다른 팁

ldr_post is not a ARM valid instruction

I assume this is a macro... so try to find the macro définition.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top