Mercurial > libavcodec.hg
changeset 7698:370c30bfd3a1 libavcodec
Add explicit (int) cast to i386 optimized MUL* macros.
Wrong result is returned when 16-bit value is passed as value.
Also fixes "Warning: using `%edx' instead of `%dx' due to `l' suffix".
author | voroshil |
---|---|
date | Tue, 26 Aug 2008 19:38:17 +0000 |
parents | 30d7b2e3a381 |
children | 4b286498a3bd |
files | i386/mathops.h |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/i386/mathops.h Tue Aug 26 18:06:07 2008 +0000 +++ b/i386/mathops.h Tue Aug 26 19:38:17 2008 +0000 @@ -28,18 +28,18 @@ "imull %3 \n\t"\ "shrdl %4, %%edx, %%eax \n\t"\ : "=a"(rt), "=d"(dummy)\ - : "a" (ra), "rm" (rb), "i"(FRAC_BITS));\ + : "a" ((int)ra), "rm" ((int)rb), "i"(FRAC_BITS));\ rt; }) #endif #define MULH(ra, rb) \ ({ int rt, dummy;\ - asm ("imull %3\n\t" : "=d"(rt), "=a"(dummy): "a" (ra), "rm" (rb));\ + asm ("imull %3\n\t" : "=d"(rt), "=a"(dummy): "a" ((int)ra), "rm" ((int)rb));\ rt; }) #define MUL64(ra, rb) \ ({ int64_t rt;\ - asm ("imull %2\n\t" : "=A"(rt) : "a" (ra), "g" (rb));\ + asm ("imull %2\n\t" : "=A"(rt) : "a" ((int)ra), "g" ((int)rb));\ rt; }) #endif /* FFMPEG_I386_MATHOPS_H */