mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
MIPS: 100L: fix AV_[RW]N64 on MIPS64
Originally committed as revision 19660 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
4a051891f6
commit
9dc6bb7b9f
@ -52,19 +52,19 @@ static inline void AV_WN32(void *p, uint32_t v)
|
|||||||
static inline uint64_t AV_RN64(const void *p)
|
static inline uint64_t AV_RN64(const void *p)
|
||||||
{
|
{
|
||||||
uint64_t v;
|
uint64_t v;
|
||||||
__asm__ ("lwl %0, %1 \n\t"
|
__asm__ ("ldl %0, %1 \n\t"
|
||||||
"lwr %0, %2 \n\t"
|
"ldr %0, %2 \n\t"
|
||||||
: "=&r"(v)
|
: "=&r"(v)
|
||||||
: "m"(*(const uint64_t *)((const uint8_t *)p+3*!HAVE_BIGENDIAN)),
|
: "m"(*(const uint64_t *)((const uint8_t *)p+7*!HAVE_BIGENDIAN)),
|
||||||
"m"(*(const uint64_t *)((const uint8_t *)p+3*HAVE_BIGENDIAN)));
|
"m"(*(const uint64_t *)((const uint8_t *)p+7*HAVE_BIGENDIAN)));
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define AV_WN64 AV_WN64
|
#define AV_WN64 AV_WN64
|
||||||
static inline void AV_WN64(void *p, uint64_t v)
|
static inline void AV_WN64(void *p, uint64_t v)
|
||||||
{
|
{
|
||||||
__asm__ ("swl %2, %0 \n\t"
|
__asm__ ("sdl %2, %0 \n\t"
|
||||||
"swr %2, %1 \n\t"
|
"sdr %2, %1 \n\t"
|
||||||
: "=m"(*(uint64_t *)((uint8_t *)p+7*!HAVE_BIGENDIAN)),
|
: "=m"(*(uint64_t *)((uint8_t *)p+7*!HAVE_BIGENDIAN)),
|
||||||
"=m"(*(uint64_t *)((uint8_t *)p+7*HAVE_BIGENDIAN))
|
"=m"(*(uint64_t *)((uint8_t *)p+7*HAVE_BIGENDIAN))
|
||||||
: "r"(v));
|
: "r"(v));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user