summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Martin Storsjo <martin@martin.st> 2012-01-12 14:25:29 +0200
committer Martin Storsjo <martin@martin.st> 2012-01-13 21:20:03 +0200
commit5ab5e003b736d925b3400afffaaefccb27030e09 (patch)
treea76c08e8b1512deac0937fddbe5be9a0393274fc
parentb4cee0f871e0f5a2abd6c6f05b65710b69423f2c (diff)
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
-rw-r--r--media/libstagefright/codecs/aacenc/basic_op/oper_32b.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libstagefright/codecs/aacenc/basic_op/oper_32b.h b/media/libstagefright/codecs/aacenc/basic_op/oper_32b.h
index 9ebd1c29d774..6e5844faad34 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;