ARM: ARMv6 optimised MULH

Originally committed as revision 14243 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Måns Rullgård 17 years ago
parent 6651ce17b8
commit 7995962d4b
  1. 10
      libavcodec/armv4l/mathops.h

@ -33,10 +33,20 @@
hi; }) hi; })
#endif #endif
#ifdef HAVE_ARMV6
static inline av_const int MULH(int a, int b)
{
int r;
asm ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
return r;
}
#define MULH MULH
#else
#define MULH(a, b) \ #define MULH(a, b) \
({ int lo, hi;\ ({ int lo, hi;\
asm ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));\ asm ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));\
hi; }) hi; })
#endif
#if defined(HAVE_ARMV5TE) #if defined(HAVE_ARMV5TE)

Loading…
Cancel
Save