mirror of https://git.ffmpeg.org/ffmpeg.git
ARM: add some compatibility macros
This adds some macros simplifying Thumb and pre-v6T2 compatibility. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
949d942eef
commit
dac78fd1d7
|
@ -88,6 +88,13 @@ ELF .size \name, . - \name
|
||||||
\name:
|
\name:
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
#if !HAVE_ARMV6T2
|
||||||
|
.macro movw rd, val
|
||||||
|
mov \rd, \val & 255
|
||||||
|
orr \rd, \val & ~255
|
||||||
|
.endm
|
||||||
|
#endif
|
||||||
|
|
||||||
.macro mov32 rd, val
|
.macro mov32 rd, val
|
||||||
#if HAVE_ARMV6T2
|
#if HAVE_ARMV6T2
|
||||||
movw \rd, #(\val) & 0xffff
|
movw \rd, #(\val) & 0xffff
|
||||||
|
@ -120,6 +127,12 @@ T sub \rn, \rn, \rm
|
||||||
T ldr \rt, [\rn]
|
T ldr \rt, [\rn]
|
||||||
.endm
|
.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
|
.macro ldr_post rt, rn, rm:vararg
|
||||||
A ldr \rt, [\rn], \rm
|
A ldr \rt, [\rn], \rm
|
||||||
T ldr \rt, [\rn]
|
T ldr \rt, [\rn]
|
||||||
|
@ -156,6 +169,12 @@ T ldrh \rt, [\rn]
|
||||||
T add \rn, \rn, \rm
|
T add \rn, \rn, \rm
|
||||||
.endm
|
.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
|
.macro str_post rt, rn, rm:vararg
|
||||||
A str \rt, [\rn], \rm
|
A str \rt, [\rn], \rm
|
||||||
T str \rt, [\rn]
|
T str \rt, [\rn]
|
||||||
|
|
Loading…
Reference in New Issue