diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2015-09-01 14:59:24 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2015-09-01 14:59:24 (GMT) |
commit | fb6fece7704c7747d008c0afbc79d61671dcb1d6 (patch) | |
tree | 4d28c845226443ca5a63db4b0c188fe27023e44d /lib/lz4.c | |
parent | 13f12aa0276748e24a7fc8b01e227c68b4d4f56e (diff) | |
download | lz4-fb6fece7704c7747d008c0afbc79d61671dcb1d6.zip lz4-fb6fece7704c7747d008c0afbc79d61671dcb1d6.tar.gz lz4-fb6fece7704c7747d008c0afbc79d61671dcb1d6.tar.bz2 |
Updated Makefile and .travis
Diffstat (limited to 'lib/lz4.c')
-rw-r--r-- | lib/lz4.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -206,7 +206,7 @@ static void LZ4_write16(void* memPtr, U16 value) memcpy(memPtr, &value, sizeof(value)); } -#endif // LZ4_FORCE_DIRECT_MEMORY_ACCESS +#endif // LZ4_FORCE_MEMORY_ACCESS static U16 LZ4_readLE16(const void* memPtr) @@ -247,6 +247,13 @@ static void LZ4_wildCopy(void* dstPtr, const void* srcPtr, void* dstEnd) BYTE* d = (BYTE*)dstPtr; const BYTE* s = (const BYTE*)srcPtr; BYTE* const e = (BYTE*)dstEnd; + +#if 1 + const size_t l2 = 8 - (((size_t)d) & (sizeof(void*)-1)); + LZ4_copy8(d,s); if (d>e-9) return; + d+=l2; s+=l2; +#endif // join to align + do { LZ4_copy8(d,s); d+=8; s+=8; } while (d<e); } |