On Thu 17/08/2023 01:07, Stuart Henderson wrote: > On 2023/08/16 23:55, Christian Weisgerber wrote: > > Stuart Henderson: > > > > > +-# if defined(__GNUC__) && !(defined(__ARM_ARCH) && __ARM_ARCH < 7 && > > > defined(__ARM_FEATURE_UNALIGNED)) > > > ++# if defined(__GNUC__) && !(defined(__ARM_ARCH) && __ARM_ARCH < 7 && > > > defined(__ARM_FEATURE_UNALIGNED)) && !defined(__sparc64__) > > > > This should include <endian.h> and check __STRICT_ALIGNMENT rather than > > hardcoding architectures. > > ...which would look something like the diff below (trying to keep the > added #include so that it's only used in as few cases as possible). > > No idea if this is actually needed on other strict alignment archs > though, it does sound like upstream weren't expecting this to be broken... > from > https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html > it seems like setting to 1 may be mostly intended as a speed optimisation > for armv7, and this ifdef intended to prevent it making things worse for > armv6. But it's been a while, perhaps armv7 compilers are better by now, > so maybe we're better off just disabling the #define XXH_FORCE_MEMORY_ACCESS > 1. > > I don't have any affected hw to test with.
No objections here, OK bket@
