Pergunta

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?

Foi útil?

Solução

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).

Outras dicas

ldr_post is not a ARM valid instruction

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top