Skip to content

Commit 5ab5e00

Browse files
committed
stagefright aacenc: Fix an inline asm constraint
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
1 parent b4cee0f commit 5ab5e00

File tree

1 file changed

+1
-1
lines changed
  • media/libstagefright/codecs/aacenc/basic_op

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ __inline Word32 L_mpy_wx(Word32 L_var2, Word16 var1)
6363
Word32 result;
6464
asm volatile(
6565
"SMULWB %[result], %[L_var2], %[var1] \n"
66-
:[result]"+r"(result)
66+
:[result]"=r"(result)
6767
:[L_var2]"r"(L_var2), [var1]"r"(var1)
6868
);
6969
return result;

0 commit comments

Comments
 (0)