From 721f2bb7b28891c0811a5bea31fa62644131befc Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Thu, 12 Jan 2012 14:25:29 +0200 Subject: [PATCH] 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 --- media/libstagefright/codecs/aacenc/basic_op/oper_32b.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.h b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.h index 9ebd1c29d7..6e5844faad 100644 --- a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.h +++ b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.h @@ -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; -- 2.11.0