#if HAVE_FAST_UNALIGNED && HAVE_INLINE_ASM
#define AV_RN16 AV_RN16
-static inline uint16_t AV_RN16(const void *p)
+static av_always_inline uint16_t AV_RN16(const void *p)
{
uint16_t v;
__asm__ ("ldrh %0, %1" : "=r"(v) : "m"(*(const uint16_t *)p));
}
#define AV_WN16 AV_WN16
-static inline void AV_WN16(void *p, uint16_t v)
+static av_always_inline void AV_WN16(void *p, uint16_t v)
{
__asm__ ("strh %1, %0" : "=m"(*(uint16_t *)p) : "r"(v));
}
#define AV_RN32 AV_RN32
-static inline uint32_t AV_RN32(const void *p)
+static av_always_inline uint32_t AV_RN32(const void *p)
{
uint32_t v;
__asm__ ("ldr %0, %1" : "=r"(v) : "m"(*(const uint32_t *)p));
}
#define AV_WN32 AV_WN32
-static inline void AV_WN32(void *p, uint32_t v)
+static av_always_inline void AV_WN32(void *p, uint32_t v)
{
__asm__ ("str %1, %0" : "=m"(*(uint32_t *)p) : "r"(v));
}
#define AV_RN64 AV_RN64
-static inline uint64_t AV_RN64(const void *p)
+static av_always_inline uint64_t AV_RN64(const void *p)
{
union { uint64_t v; uint32_t hl[2]; } v;
__asm__ ("ldr %0, %2 \n\t"
}
#define AV_WN64 AV_WN64
-static inline void AV_WN64(void *p, uint64_t v)
+static av_always_inline void AV_WN64(void *p, uint64_t v)
{
union { uint64_t v; uint32_t hl[2]; } vv = { v };
__asm__ ("str %2, %0 \n\t"
*/
#define AV_RL16 AV_RL16
-static inline uint16_t AV_RL16(const void *p)
+static av_always_inline uint16_t AV_RL16(const void *p)
{
uint16_t v;
__asm__ ("ld.ub %0, %1 \n\t"
}
#define AV_RB16 AV_RB16
-static inline uint16_t AV_RB16(const void *p)
+static av_always_inline uint16_t AV_RB16(const void *p)
{
uint16_t v;
__asm__ ("ld.ub %0, %2 \n\t"
}
#define AV_RB24 AV_RB24
-static inline uint32_t AV_RB24(const void *p)
+static av_always_inline uint32_t AV_RB24(const void *p)
{
uint32_t v;
__asm__ ("ld.ub %0, %3 \n\t"
}
#define AV_RL24 AV_RL24
-static inline uint32_t AV_RL24(const void *p)
+static av_always_inline uint32_t AV_RL24(const void *p)
{
uint32_t v;
__asm__ ("ld.ub %0, %1 \n\t"
#if ARCH_AVR32_AP
#define AV_RB32 AV_RB32
-static inline uint32_t AV_RB32(const void *p)
+static av_always_inline uint32_t AV_RB32(const void *p)
{
uint32_t v;
__asm__ ("ld.w %0, %1" : "=r"(v) : "m"(*(const uint32_t*)p));
}
#define AV_WB32 AV_WB32
-static inline void AV_WB32(void *p, uint32_t v)
+static av_always_inline void AV_WB32(void *p, uint32_t v)
{
__asm__ ("st.w %0, %1" : "=m"(*(uint32_t*)p) : "r"(v));
}
#define AV_WL32(p, v) AV_WB32(p, bswap_32(v))
#define AV_WB64 AV_WB64
-static inline void AV_WB64(void *p, uint64_t v)
+static av_always_inline void AV_WB64(void *p, uint64_t v)
{
union { uint64_t v; uint32_t hl[2]; } vv = { v };
AV_WB32(p, vv.hl[0]);
}
#define AV_WL64 AV_WL64
-static inline void AV_WL64(void *p, uint64_t v)
+static av_always_inline void AV_WL64(void *p, uint64_t v)
{
union { uint64_t v; uint32_t hl[2]; } vv = { v };
AV_WL32(p, vv.hl[1]);
#else /* ARCH_AVR32_AP */
#define AV_RB32 AV_RB32
-static inline uint32_t AV_RB32(const void *p)
+static av_always_inline uint32_t AV_RB32(const void *p)
{
uint32_t v;
__asm__ ("ld.ub %0, %4 \n\t"
}
#define AV_RL32 AV_RL32
-static inline uint32_t AV_RL32(const void *p)
+static av_always_inline uint32_t AV_RL32(const void *p)
{
uint32_t v;
__asm__ ("ld.ub %0, %1 \n\t"
#endif /* ARCH_AVR32_AP */
#define AV_RB64 AV_RB64
-static inline uint64_t AV_RB64(const void *p)
+static av_always_inline uint64_t AV_RB64(const void *p)
{
union { uint64_t v; uint32_t hl[2]; } v;
v.hl[0] = AV_RB32(p);
}
#define AV_RL64 AV_RL64
-static inline uint64_t AV_RL64(const void *p)
+static av_always_inline uint64_t AV_RL64(const void *p)
{
union { uint64_t v; uint32_t hl[2]; } v;
v.hl[1] = AV_RL32(p);
#include "config.h"
#define AV_RN32 AV_RN32
-static inline uint32_t AV_RN32(const void *p)
+static av_always_inline uint32_t AV_RN32(const void *p)
{
uint32_t v;
__asm__ ("lwl %0, %1 \n\t"
}
#define AV_WN32 AV_WN32
-static inline void AV_WN32(void *p, uint32_t v)
+static av_always_inline void AV_WN32(void *p, uint32_t v)
{
__asm__ ("swl %2, %0 \n\t"
"swr %2, %1 \n\t"
#if ARCH_MIPS64
#define AV_RN64 AV_RN64
-static inline uint64_t AV_RN64(const void *p)
+static av_always_inline uint64_t AV_RN64(const void *p)
{
uint64_t v;
__asm__ ("ldl %0, %1 \n\t"
}
#define AV_WN64 AV_WN64
-static inline void AV_WN64(void *p, uint64_t v)
+static av_always_inline void AV_WN64(void *p, uint64_t v)
{
__asm__ ("sdl %2, %0 \n\t"
"sdr %2, %1 \n\t"
#else
#define AV_RN64 AV_RN64
-static inline uint64_t AV_RN64(const void *p)
+static av_always_inline uint64_t AV_RN64(const void *p)
{
union { uint64_t v; uint32_t hl[2]; } v;
v.hl[0] = AV_RN32(p);
}
#define AV_WN64 AV_WN64
-static inline void AV_WN64(void *p, uint64_t v)
+static av_always_inline void AV_WN64(void *p, uint64_t v)
{
union { uint64_t v; uint32_t hl[2]; } vv = { v };
AV_WN32(p, vv.hl[0]);
#if HAVE_XFORM_ASM
#define AV_RL16 AV_RL16
-static inline uint16_t AV_RL16(const void *p)
+static av_always_inline uint16_t AV_RL16(const void *p)
{
uint16_t v;
__asm__ ("lhbrx %0, %y1" : "=r"(v) : "Z"(*(const uint16_t*)p));
}
#define AV_WL16 AV_WL16
-static inline void AV_WL16(void *p, uint16_t v)
+static av_always_inline void AV_WL16(void *p, uint16_t v)
{
__asm__ ("sthbrx %1, %y0" : "=Z"(*(uint16_t*)p) : "r"(v));
}
#define AV_RL32 AV_RL32
-static inline uint32_t AV_RL32(const void *p)
+static av_always_inline uint32_t AV_RL32(const void *p)
{
uint32_t v;
__asm__ ("lwbrx %0, %y1" : "=r"(v) : "Z"(*(const uint32_t*)p));
}
#define AV_WL32 AV_WL32
-static inline void AV_WL32(void *p, uint32_t v)
+static av_always_inline void AV_WL32(void *p, uint32_t v)
{
__asm__ ("stwbrx %1, %y0" : "=Z"(*(uint32_t*)p) : "r"(v));
}
#if HAVE_LDBRX
#define AV_RL64 AV_RL64
-static inline uint64_t AV_RL64(const void *p)
+static av_always_inline uint64_t AV_RL64(const void *p)
{
uint64_t v;
__asm__ ("ldbrx %0, %y1" : "=r"(v) : "Z"(*(const uint64_t*)p));
}
#define AV_WL64 AV_WL64
-static inline void AV_WL64(void *p, uint64_t v)
+static av_always_inline void AV_WL64(void *p, uint64_t v)
{
__asm__ ("stdbrx %1, %y0" : "=Z"(*(uint64_t*)p) : "r"(v));
}
#else
#define AV_RL64 AV_RL64
-static inline uint64_t AV_RL64(const void *p)
+static av_always_inline uint64_t AV_RL64(const void *p)
{
union { uint64_t v; uint32_t hl[2]; } v;
__asm__ ("lwbrx %0, %y2 \n\t"
}
#define AV_WL64 AV_WL64
-static inline void AV_WL64(void *p, uint64_t v)
+static av_always_inline void AV_WL64(void *p, uint64_t v)
{
union { uint64_t v; uint32_t hl[2]; } vv = { v };
__asm__ ("stwbrx %2, %y0 \n\t"