Originally committed as revision 6049 to svn://svn.ffmpeg.org/ffmpeg/trunk
#define FRAC_ONE (1 << FRAC_BITS)
#ifdef ARCH_X86
-# define MULL(a,b) (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS)
+# define MULL(ra, rb) \
+ ({ int rt, dummy; asm (\
+ "imull %3 \n\t"\
+ "shrdl %4, %%edx, %%eax \n\t"\
+ : "=a"(rt), "=d"(dummy)\
+ : "a" (ra), "rm" (rb), "i"(FRAC_BITS));\
+ rt; })
# define MUL64(ra, rb) \
({ int64_t rt; asm ("imull %2\n\t" : "=A"(rt) : "a" (ra), "g" (rb)); rt; })
# define MULH(ra, rb) \