OSDN Git Service

stagefright aacenc: Fix an inline asm constraint
authorMartin Storsjo <martin@martin.st>
Thu, 12 Jan 2012 12:25:29 +0000 (14:25 +0200)
committerMartin Storsjo <martin@martin.st>
Fri, 13 Jan 2012 19:20:03 +0000 (21:20 +0200)
Output-only parameters should use =r or =&r constrains, never +r.

This avoids a warning about the variable 'result' being used
uninitialized.

This avoids loading the uninitialized value into the register,
before it is overwritten by the multiplication.

Change-Id: I0ef6179e133c35d290feb8e12bea180ecae11a05

media/libstagefright/codecs/aacenc/basic_op/oper_32b.h

index 9ebd1c2..6e5844f 100644 (file)
@@ -63,7 +63,7 @@ __inline Word32 L_mpy_wx(Word32 L_var2, Word16 var1)
        Word32 result;
        asm volatile(
                "SMULWB  %[result], %[L_var2], %[var1] \n"
-               :[result]"+r"(result)
+               :[result]"=r"(result)
                :[L_var2]"r"(L_var2), [var1]"r"(var1)
                );
        return result;