--- should fix the problem reported on irc on ppc64le, tomorrow hopefully will be tested.
libavutil/ppc/intreadwrite.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/libavutil/ppc/intreadwrite.h b/libavutil/ppc/intreadwrite.h index fec54e6..f5c3022 100644 --- a/libavutil/ppc/intreadwrite.h +++ b/libavutil/ppc/intreadwrite.h @@ -26,7 +26,22 @@ #if HAVE_XFORM_ASM +#if HAVE_BIGENDIAN #define AV_RL16 AV_RL16 +#define AV_WL16 AV_WL16 +#define AV_RL32 AV_RL32 +#define AV_WL32 AV_WL32 +#define AV_RL64 AV_RL64 +#define AV_WL64 AV_WL64 +#else +#define AV_RL16 AV_RB16 +#define AV_WL16 AV_WB16 +#define AV_RL32 AV_RB32 +#define AV_WL32 AV_WB32 +#define AV_RL64 AV_RB64 +#define AV_RL64 AV_RB64 +#endif + static av_always_inline uint16_t AV_RL16(const void *p) { uint16_t v; @@ -34,13 +49,11 @@ static av_always_inline uint16_t AV_RL16(const void *p) return v; } -#define AV_WL16 AV_WL16 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 av_always_inline uint32_t AV_RL32(const void *p) { uint32_t v; @@ -48,7 +61,6 @@ static av_always_inline uint32_t AV_RL32(const void *p) return v; } -#define AV_WL32 AV_WL32 static av_always_inline void AV_WL32(void *p, uint32_t v) { __asm__ ("stwbrx %1, %y0" : "=Z"(*(uint32_t*)p) : "r"(v)); @@ -56,7 +68,6 @@ static av_always_inline void AV_WL32(void *p, uint32_t v) #if HAVE_LDBRX -#define AV_RL64 AV_RL64 static av_always_inline uint64_t AV_RL64(const void *p) { uint64_t v; @@ -64,7 +75,6 @@ static av_always_inline uint64_t AV_RL64(const void *p) return v; } -#define AV_WL64 AV_WL64 static av_always_inline void AV_WL64(void *p, uint64_t v) { __asm__ ("stdbrx %1, %y0" : "=Z"(*(uint64_t*)p) : "r"(v)); @@ -72,7 +82,6 @@ static av_always_inline void AV_WL64(void *p, uint64_t v) #else -#define AV_RL64 AV_RL64 static av_always_inline uint64_t AV_RL64(const void *p) { union { uint64_t v; uint32_t hl[2]; } v; @@ -83,7 +92,6 @@ static av_always_inline uint64_t AV_RL64(const void *p) return v.v; } -#define AV_WL64 AV_WL64 static av_always_inline void AV_WL64(void *p, uint64_t v) { union { uint64_t v; uint32_t hl[2]; } vv = { v }; -- 1.9.0 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel