ARM tweaks

This commit is contained in:
Adam Ierymenko 2017-03-17 22:26:08 +00:00
parent cdc0eaec3a
commit c467c3b7e4
2 changed files with 15 additions and 0 deletions

View file

@ -520,6 +520,7 @@ union LZ4_streamDecode_u {
* See https://fastcompression.blogspot.fr/2015/08/accessing-unaligned-memory.html for details.
* Prefer these methods in priority order (0 > 1 > 2)
*/
#if 0
#ifndef LZ4_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */
# if defined(__GNUC__) && ( defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) )
# define LZ4_FORCE_MEMORY_ACCESS 2
@ -528,6 +529,13 @@ union LZ4_streamDecode_u {
# define LZ4_FORCE_MEMORY_ACCESS 1
# endif
#endif
#endif
#ifdef ZT_NO_TYPE_PUNNING
#define LZ4_FORCE_MEMORY_ACCESS 0
#else
#define LZ4_FORCE_MEMORY_ACCESS 2
#endif
/*
* LZ4_FORCE_SW_BITCOUNT