Commit dad6afb4 authored by Alexis Ballier's avatar Alexis Ballier Committed by Guillaume Poirier

stricter constraints of asm() blocks

All these variables are used as left operands of a movd instruction,
which does accept only memory or register operands while the "g"
constraint also allows immediates. Use "rm" instead.
Patch by Alexis Ballier %alexis P ballier A gmail P com%

Originally committed as revision 14941 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent cbcbf439
...@@ -99,7 +99,7 @@ asm volatile( ...@@ -99,7 +99,7 @@ asm volatile(
"add $16, %3 \n\t" "add $16, %3 \n\t"
"jng 1b \n\t" "jng 1b \n\t"
::"r" (block+nCoeffs), "g"(qmul), "g" (qadd), "r" (2*(-nCoeffs)) ::"r" (block+nCoeffs), "rm"(qmul), "rm" (qadd), "r" (2*(-nCoeffs))
: "memory" : "memory"
); );
block[0]= level; block[0]= level;
...@@ -162,7 +162,7 @@ asm volatile( ...@@ -162,7 +162,7 @@ asm volatile(
"add $16, %3 \n\t" "add $16, %3 \n\t"
"jng 1b \n\t" "jng 1b \n\t"
::"r" (block+nCoeffs), "g"(qmul), "g" (qadd), "r" (2*(-nCoeffs)) ::"r" (block+nCoeffs), "rm"(qmul), "rm" (qadd), "r" (2*(-nCoeffs))
: "memory" : "memory"
); );
} }
...@@ -260,7 +260,7 @@ asm volatile( ...@@ -260,7 +260,7 @@ asm volatile(
"add $16, %%"REG_a" \n\t" "add $16, %%"REG_a" \n\t"
"js 1b \n\t" "js 1b \n\t"
::"r" (block+nCoeffs), "r"(quant_matrix+nCoeffs), "g" (qscale), "g" (-2*nCoeffs) ::"r" (block+nCoeffs), "r"(quant_matrix+nCoeffs), "rm" (qscale), "g" (-2*nCoeffs)
: "%"REG_a, "memory" : "%"REG_a, "memory"
); );
block[0]= block0; block[0]= block0;
...@@ -327,7 +327,7 @@ asm volatile( ...@@ -327,7 +327,7 @@ asm volatile(
"add $16, %%"REG_a" \n\t" "add $16, %%"REG_a" \n\t"
"js 1b \n\t" "js 1b \n\t"
::"r" (block+nCoeffs), "r"(quant_matrix+nCoeffs), "g" (qscale), "g" (-2*nCoeffs) ::"r" (block+nCoeffs), "r"(quant_matrix+nCoeffs), "rm" (qscale), "g" (-2*nCoeffs)
: "%"REG_a, "memory" : "%"REG_a, "memory"
); );
} }
...@@ -391,7 +391,7 @@ asm volatile( ...@@ -391,7 +391,7 @@ asm volatile(
"add $16, %%"REG_a" \n\t" "add $16, %%"REG_a" \n\t"
"jng 1b \n\t" "jng 1b \n\t"
::"r" (block+nCoeffs), "r"(quant_matrix+nCoeffs), "g" (qscale), "g" (-2*nCoeffs) ::"r" (block+nCoeffs), "r"(quant_matrix+nCoeffs), "rm" (qscale), "g" (-2*nCoeffs)
: "%"REG_a, "memory" : "%"REG_a, "memory"
); );
block[0]= block0; block[0]= block0;
...@@ -470,7 +470,7 @@ asm volatile( ...@@ -470,7 +470,7 @@ asm volatile(
"pxor %%mm7, %%mm0 \n\t" "pxor %%mm7, %%mm0 \n\t"
"movd %%mm0, 124(%0, %3) \n\t" "movd %%mm0, 124(%0, %3) \n\t"
::"r" (block+nCoeffs), "r"(quant_matrix+nCoeffs), "g" (qscale), "r" (-2*nCoeffs) ::"r" (block+nCoeffs), "r"(quant_matrix+nCoeffs), "rm" (qscale), "r" (-2*nCoeffs)
: "%"REG_a, "memory" : "%"REG_a, "memory"
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment