mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
ARM: change MULH() macro to inline function
Originally committed as revision 15781 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
8f4d0d48b9
commit
73c1c96b83
@ -39,6 +39,7 @@ static inline av_const int MULL(int a, int b)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define MULH MULH
|
||||||
#ifdef HAVE_ARMV6
|
#ifdef HAVE_ARMV6
|
||||||
static inline av_const int MULH(int a, int b)
|
static inline av_const int MULH(int a, int b)
|
||||||
{
|
{
|
||||||
@ -46,12 +47,13 @@ static inline av_const int MULH(int a, int b)
|
|||||||
__asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
|
__asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
#define MULH MULH
|
|
||||||
#else
|
#else
|
||||||
#define MULH(a, b) \
|
static inline av_const int MULH(int a, int b)
|
||||||
({ int lo, hi;\
|
{
|
||||||
__asm__ ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));\
|
int lo, hi;
|
||||||
hi; })
|
__asm__ ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));
|
||||||
|
return hi;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline av_const int64_t MUL64(int a, int b)
|
static inline av_const int64_t MUL64(int a, int b)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user