modified to compile with BeOS R5 GCC

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5692 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper
2003-12-18 00:08:52 +00:00
parent 7e6998a8f0
commit a08013c09a
@@ -730,25 +730,35 @@ static inline int msmpeg4_pred_dc(MpegEncContext * s, int n,
necessitate to modify mpegvideo.c. The problem comes from the necessitate to modify mpegvideo.c. The problem comes from the
fact they decided to store the quantized DC (which would lead fact they decided to store the quantized DC (which would lead
to problems if Q could vary !) */ to problems if Q could vary !) */
#if defined ARCH_X86 && !defined PIC #if defined ARCH_X86
asm volatile( /* removed usage of ebx, still this gets optimized by GCC pretty well */
"movl %3, %%eax \n\t" asm (
"shrl $1, %%eax \n\t" "movl %0, %%eax \n\t"
"addl %%eax, %2 \n\t" "addl %1, %%eax \n\t"
"addl %%eax, %1 \n\t" "mull %2 \n\t"
"addl %0, %%eax \n\t" "movl %%eax, %0 \n\t"
"mull %4 \n\t" : "+g" (a)
"movl %%edx, %0 \n\t" : "g" (scale >> 1), "g" (inverse[scale])
"movl %1, %%eax \n\t"
"mull %4 \n\t"
"movl %%edx, %1 \n\t"
"movl %2, %%eax \n\t"
"mull %4 \n\t"
"movl %%edx, %2 \n\t"
: "+b" (a), "+c" (b), "+D" (c)
: "g" (scale), "S" (inverse[scale])
: "%eax", "%edx" : "%eax", "%edx"
); );
asm (
"movl %0, %%eax \n\t"
"addl %1, %%eax \n\t"
"mull %2 \n\t"
"movl %%eax, %0 \n\t"
: "+g" (b)
: "g" (scale >> 1), "g" (inverse[scale])
: "%eax", "%edx"
);
asm (
"movl %0, %%eax \n\t"
"addl %1, %%eax \n\t"
"mull %2 \n\t"
"movl %%eax, %0 \n\t"
: "+g" (c)
: "g" (scale >> 1), "g" (inverse[scale])
: "%eax", "%edx"
);
#else #else
/* #elif defined (ARCH_ALPHA) */ /* #elif defined (ARCH_ALPHA) */
/* Divisions are extremely costly on Alpha; optimize the most /* Divisions are extremely costly on Alpha; optimize the most