[libpng16] Allow clang derived from older GCC versions to use ARM intrinsics.

This commit is contained in:
John Bowler 2013-10-24 07:45:27 -05:00 committed by Glenn Randers-Pehrson
parent 393d3c8285
commit bb9adfdad9
3 changed files with 18 additions and 5 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.6.7beta04 - October 19, 2013 Libpng 1.6.7beta04 - October 24, 2013
This is not intended to be a public release. It will be replaced 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. within a few weeks by a public version or by another test version.
@ -80,7 +80,11 @@ Version 1.6.7beta03 [October 19, 2013]
Cleaned up ARM NEON compilation handling. The tests are now in pngpriv.h Cleaned up ARM NEON compilation handling. The tests are now in pngpriv.h
and detect the broken GCC compilers. and detect the broken GCC compilers.
Version 1.6.7beta04 [October 19, 2013] Version 1.6.7beta04 [October 24, 2013]
Allow clang derived from older GCC versions to use ARM intrinsics. This
causes all clang builds that use -mfpu=neon to use the intrinsics code,
not the assembler code. This has only been tested on iOS 7. It may be
necessary to exclude some earlier clang versions but this seems unlikely.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -4694,7 +4694,11 @@ Version 1.6.7beta03 [October 19, 2013]
Cleaned up ARM NEON compilation handling. The tests are now in pngpriv.h Cleaned up ARM NEON compilation handling. The tests are now in pngpriv.h
and detect the broken GCC compilers. and detect the broken GCC compilers.
Version 1.6.7beta04 [October 19, 2013] Version 1.6.7beta04 [October 24, 2013]
Allow clang derived from older GCC versions to use ARM intrinsics. This
causes all clang builds that use -mfpu=neon to use the intrinsics code,
not the assembler code. This has only been tested on iOS 7. It may be
necessary to exclude some earlier clang versions but this seems unlikely.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -142,14 +142,19 @@
/* Put compiler specific checks below: */ /* Put compiler specific checks below: */
#ifndef PNG_USE_ARM_NEON_ASM #ifndef PNG_USE_ARM_NEON_ASM
# ifdef __GNUC__ # if defined(__clang__)
/* At present it is unknown by the libpng developers which versions of
* clang support the intrinsics, however some or perhaps all versions
* do not work with the assembler so this may be irrelevant.
*/
# elif defined(__GNUC__)
/* GCC 4.5.4 NEON support is known to be broken. 4.6.3 is known to work, /* GCC 4.5.4 NEON support is known to be broken. 4.6.3 is known to work,
* so if this *is* GCC, or G++, look for a version >4.5 * so if this *is* GCC, or G++, look for a version >4.5
*/ */
# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) # if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)
# define PNG_USE_ARM_NEON_ASM # define PNG_USE_ARM_NEON_ASM
# endif # endif
# endif # endif /* __GNUC__ */
#endif #endif
/* Is this a build of a DLL where compilation of the object modules requires /* Is this a build of a DLL where compilation of the object modules requires