diff options
author | Mans Rullgard <mans@mansr.com> | 2012-03-20 17:04:54 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-04-25 21:41:39 +0100 |
commit | dac78fd1d73b3710f1c6718f7418bc5325fff494 (patch) | |
tree | 6a66d2ef5b8a9650556f1abf745822a65717c223 | |
parent | 949d942eef70552cfb18b8992fc2fba049269a83 (diff) | |
download | ffmpeg-dac78fd1d73b3710f1c6718f7418bc5325fff494.tar.gz |
ARM: add some compatibility macros
This adds some macros simplifying Thumb and pre-v6T2 compatibility.
Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r-- | libavcodec/arm/asm.S | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libavcodec/arm/asm.S b/libavcodec/arm/asm.S index 3b495a279f..6038a63a27 100644 --- a/libavcodec/arm/asm.S +++ b/libavcodec/arm/asm.S @@ -88,6 +88,13 @@ ELF .size \name, . - \name \name: .endm +#if !HAVE_ARMV6T2 +.macro movw rd, val + mov \rd, \val & 255 + orr \rd, \val & ~255 +.endm +#endif + .macro mov32 rd, val #if HAVE_ARMV6T2 movw \rd, #(\val) & 0xffff @@ -120,6 +127,12 @@ T sub \rn, \rn, \rm T ldr \rt, [\rn] .endm +.macro ldr_nreg rt, rn, rm:vararg +A ldr \rt, [\rn, -\rm] +T sub \rt, \rn, \rm +T ldr \rt, [\rt] +.endm + .macro ldr_post rt, rn, rm:vararg A ldr \rt, [\rn], \rm T ldr \rt, [\rn] @@ -156,6 +169,12 @@ T ldrh \rt, [\rn] T add \rn, \rn, \rm .endm +.macro ldrb_post rt, rn, rm +A ldrb \rt, [\rn], \rm +T ldrb \rt, [\rn] +T add \rn, \rn, \rm +.endm + .macro str_post rt, rn, rm:vararg A str \rt, [\rn], \rm T str \rt, [\rn] |