summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-11-29 16:27:27 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-11-29 16:27:27 -0600
commitee16fc4a6f573a5339ddd7474da5aedb4f7c2d87 (patch)
treeb419687b3eb9bc97a607ecb17f6e09de3f403fd9
parent2d24cbdd988d325ba5548ebfdd1ac8760efa317d (diff)
downloadlibpng-ee16fc4a6f573a5339ddd7474da5aedb4f7c2d87.tar.gz
[libpng16] Added ".align 2" to arm/filter_neon.S to support old GAS assemblers
that don't do alignment correctly.
-rw-r--r--ANNOUNCE7
-rw-r--r--CHANGES5
-rw-r--r--arm/arm_init.c2
-rw-r--r--arm/filter_neon.S21
-rw-r--r--arm/filter_neon_intrinsics.c2
5 files changed, 23 insertions, 14 deletions
diff --git a/ANNOUNCE b/ANNOUNCE
index ab3d44910..5396b1921 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,4 +1,4 @@
-Libpng 1.6.16beta01 - November 21, 2014
+Libpng 1.6.16beta01 - November 29, 2014
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@@ -25,8 +25,9 @@ Other information:
Changes since the last public release (1.6.15):
-Version 1.6.16beta01 [November 21, 2014]
- No changes.
+Version 1.6.16beta01 [November 29, 2014]
+ Added ".align 2" to arm/filter_neon.S to support old GAS assemblers that
+ don't do alignment correctly.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/CHANGES b/CHANGES
index cf1856f31..7cea4fe61 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5099,8 +5099,9 @@ Version 1.6.15rc03 [November 16, 2014]
Version 1.6.15 [November 20, 2014]
No changes.
-Version 1.6.16beta01 [November 21, 2014]
- No changes.
+Version 1.6.16beta01 [November 29, 2014]
+ Added ".align 2" to arm/filter_neon.S to support old GAS assemblers that
+ don't do alignment correctly.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/arm/arm_init.c b/arm/arm_init.c
index b0e929bc1..9a23e1040 100644
--- a/arm/arm_init.c
+++ b/arm/arm_init.c
@@ -130,4 +130,4 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
}
}
#endif /* PNG_ARM_NEON_OPT > 0 */
-#endif /* PNG_READ_SUPPORTED */
+#endif /* READ */
diff --git a/arm/filter_neon.S b/arm/filter_neon.S
index 40d97775d..b7c0a90b4 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 [(PENDING RELEASE)]
*
* 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 @@ ELF .size \name, . - \name
.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 @@ func png_read_filter_row_paeth3_neon, export=1
pop {r4,pc}
endfunc
#endif /* PNG_ARM_NEON_OPT > 0 */
-#endif /* PNG_READ_SUPPORTED */
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */
+#endif /* READ */
diff --git a/arm/filter_neon_intrinsics.c b/arm/filter_neon_intrinsics.c
index e7a09f436..a88674755 100644
--- a/arm/filter_neon_intrinsics.c
+++ b/arm/filter_neon_intrinsics.c
@@ -368,5 +368,5 @@ png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row,
}
#endif /* PNG_ARM_NEON_OPT > 0 */
-#endif /* PNG_READ_SUPPORTED */
+#endif /* READ */
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 1 (intrinsics) */