# HG changeset patch # User michael # Date 1156248422 0 # Node ID dad0296d4522364f2be3d77f23c72586be10e14a # Parent 42b6cefc6c1a41058802e5d2f2e4326fa2c2e441 replace MULL with asm too, no significnat speedup but its probably better to not take any chances, some versions of gcc will almost certainly mess it up too if they can diff -r 42b6cefc6c1a -r dad0296d4522 mpegaudiodec.c --- a/mpegaudiodec.c Tue Aug 22 11:51:09 2006 +0000 +++ b/mpegaudiodec.c Tue Aug 22 12:07:02 2006 +0000 @@ -44,7 +44,13 @@ #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) \