DO NOT MERGE Update libpng to 1.6.20
BUG:23265085
Change-Id: I85199805636d771f3597b691b63bc0bf46084833
(cherry picked from commit bbe98b40cda082024b669fa508931042eed18f82)
diff --git a/arm/filter_neon.S b/arm/filter_neon.S
index 40d9777..3b061d6 100644
--- a/arm/filter_neon.S
+++ b/arm/filter_neon.S
@@ -1,18 +1,17 @@
/* filter_neon.S - NEON optimised filter functions
*
- * Copyright (c) 2013 Glenn Randers-Pehrson
+ * Copyright (c) 2014 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
- * Last changed in libpng 1.6.8 [December 19, 2013]
+ * Last changed in libpng 1.6.16 [December 22, 2014]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*/
-/* This is required to get the symbol renames, which are #defines, and also
- * includes the definition (or not) of PNG_ARM_NEON_OPT and
- * PNG_ARM_NEON_IMPLEMENTATION.
+/* This is required to get the symbol renames, which are #defines, and the
+ * definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION.
*/
#define PNG_VERSION_INFO_ONLY
#include "../pngpriv.h"
@@ -21,6 +20,8 @@
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
#endif
+#ifdef PNG_READ_SUPPORTED
+
/* Assembler NEON support - only works for 32-bit ARM (i.e. it does not work for
* ARM64). The code in arm/filter_neon_intrinsics.c supports ARM64, however it
* only works if -mfpu=neon is specified on the GCC command line. See pngpriv.h
@@ -28,7 +29,6 @@
*/
#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */
-#ifdef PNG_READ_SUPPORTED
#if PNG_ARM_NEON_OPT > 0
#ifdef __ELF__
@@ -47,6 +47,13 @@
.purgem endfunc
.endm
.text
+
+ /* Explicitly specifying alignment here because some versions of
+ * GAS don't align code correctly. This is harmless in correctly
+ * written versions of GAS.
+ */
+ .align 2
+
.if \export
.global \name
.endif
@@ -242,5 +249,5 @@
pop {r4,pc}
endfunc
#endif /* PNG_ARM_NEON_OPT > 0 */
-#endif /* PNG_READ_SUPPORTED */
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */
+#endif /* READ */