Commit Graph

1464 Commits

Author SHA1 Message Date
Takayuki Matsuoka
bd4ded94ee Introduce md5sum style filename escape convention
For details, see issue #695.

If filename contains special character (\n, 0x0a, LF),

- Put '\' (0x5c) at the beginning of the line.
- Escape special character by '\'.
2022-04-04 19:52:50 +09:00
Yann Collet
aa7ac8bd1f minor build doc modification 2022-03-10 11:24:26 -08:00
Yann Collet
4c223a5675 Merge pull request #688 from tipi-deps/dev
tipi.build instructions
2022-03-10 11:21:53 -08:00
Yann Collet
2ae055b84f Merge pull request #690 from t-mat/fix-issue-689
Removed windows-2016 from ci.yml
2022-03-10 09:39:35 -08:00
Takayuki Matsuoka
0c0ea6031d Add missing apt-get update 2022-03-10 20:54:32 +09:00
Takayuki Matsuoka
a0f750fbc5 Removed windows-2016 from ci.yml
Fix #689
2022-03-10 20:44:25 +09:00
Yannic Staudt
7b3bb44701 Fixed up tipi CI build to do less extensive tests 2022-03-10 09:52:24 +01:00
Yannic Staudt
81972bf476 Added tipi.build support and instructions to xxHash (incl. ci build) 2022-03-09 18:01:45 +01:00
Yann Collet
d8aff149b5 Merge pull request #676 from mterron/patch-1
Remove duplicated definition of XXH3_128bits
2022-01-18 17:19:19 -08:00
Terror
ab6699a9e2 Remove duplicated definition of XXH3_128bits 2022-01-19 11:56:02 +13:00
Yann Collet
b1a61dff65 Merge pull request #667 from easyaspi314/sizeopt
Introduce XXH_SIZE_OPT and XXH_NO_STREAM
2022-01-06 15:25:36 -08:00
Yann Collet
83b2235b4d Merge pull request #672 from easyaspi314/vsx_hotfix
Properly fix altivec namespace collisions
2022-01-06 15:10:57 -08:00
easyaspi314 (Devin)
4690bbe094 Minor typo fix 2021-12-30 00:25:09 -05:00
easyaspi314 (Devin)
ec4030d5f5 Properly fix altivec namespace collisions
Uses `#pragma push_macro`/`#pragma pop_macro` instead of assuming that
`__APPLE_ALTIVEC__` can be defined safely.

Safer and less hacky fix for #668.
2021-12-30 00:22:12 -05:00
easyaspi314 (Devin)
fdf28f6817 [sizeopt] Reroll midrange on size opt, disable prefetch
It seems that using the streaming API is not beneficial on GCC so it
isn't worth the complexity.
2021-12-29 15:12:21 -05:00
Yann Collet
d878e1d162 Merge pull request #670 from Cyan4973/fix664
do no longer depend on `<assert.h>` for XXH_STATIC_ASSERT
2021-12-28 16:56:25 -08:00
Yann Collet
6189ecd3d4 do no longer depend on <assert.h> for XXH_STATIC_ASSERT
since some versions are buggy.

Use `_Static_assert` instead, which is part of the C11 language.
2021-12-26 15:15:26 -08:00
easyaspi314 (Devin)
6f97097934 Introduce XXH_SIZE_OPT and XXH_NO_STREAM
- XXH_SIZE_OPT is a value from 0-2 which indicates how much xxHash
   should care about code size, default 1 for -Os/-Oz, default 0
   otherwise
 - XXH_NO_STREAM disables the streaming API.
 - These two interact: if XXH_SIZE_OPT == 2 and XXH_NO_STREAM is not
 defined, XXH32 and XXH64 use the streaming API for single shot
    - TODO: apply this to XXH3 as well
2021-12-22 22:40:57 -05:00
Yann Collet
0e163593f8 Merge pull request #662 from easyaspi314/c_attr
XXH_HAS_C_ATTRIBUTE(x)?!
2021-12-21 13:45:31 -08:00
Yann Collet
db9c199e99 Merge pull request #665 from ffontaine/dev
Makefile: add dedicated install targets
2021-12-16 01:05:41 -08:00
Fabrice Fontaine
0e7418bce8 Makefile: add dedicated install targets
Add dedicated install targets to allow the user to install only xxhsum,
the static library, the shared library, etc.

This is especially useful on embedded systems where dynamic library is
not always supported by toolchains

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-12-15 22:21:38 +01:00
easyaspi314 (Devin)
4640547143 Fix XXH_HAS_C_ATTRIBUTE check 2021-12-13 15:08:50 -05:00
Yann Collet
c0d7495b23 Merge pull request #661 from easyaspi314/doxygen_xxh3
Documentation update
2021-12-13 09:19:47 -08:00
easyaspi314 (Devin)
2d11523a84 Add CONSTF/MALLOCF/PUREF to Doxyfile 2021-12-12 22:03:54 -05:00
easyaspi314 (Devin)
82819102da We do a little documentation.
I also added a few code examples, but it all needs to be organized better.
2021-12-12 21:48:16 -05:00
Yann Collet
f3eaf95f20 Merge pull request #659 from Cyan4973/pure_f
added __attribute__((pure))
2021-12-11 22:42:40 -08:00
Yann Collet
08aff8bfd0 added __attribute__((pure)) 2021-12-11 17:09:04 -08:00
Yann Collet
d0f5e13d47 Merge pull request #658 from Cyan4973/malloc_f
added __attribute__((malloc))
2021-12-11 15:11:46 -08:00
Yann Collet
1792d8831b added __attribute__((malloc)) 2021-12-11 14:43:50 -08:00
Yann Collet
30720342fd Merge pull request #657 from Cyan4973/const_f
added __attribute__((const))
2021-12-11 14:35:25 -08:00
Yann Collet
74eafa97ca added __attribute__((const))
doesn't affect much (only `XXH_versionNumbder()`)
but is a good starting point towards more function attributes.
2021-12-11 13:35:01 -08:00
Yann Collet
1f74f88d59 Merge pull request #656 from Cyan4973/nostdlib
improved nostdlib test
2021-12-11 13:18:18 -08:00
Yann Collet
d857cca62e improved nostdlib test 2021-12-11 12:06:59 -08:00
Yann Collet
7b1fc6252d Merge pull request #654 from Cyan4973/nostdlib
new build macro XXH_NO_STDLIB
2021-12-11 11:24:22 -08:00
Yann Collet
8e5afc71b3 fixed minor warnings 2021-12-11 10:28:20 -08:00
Yann Collet
6d78332def new build macro XXH_NO_STDLIB
ensures there is no usage / invocation of <stdlib.h> within libxxhash
at the expense of `XXH*_createState()` functions, which always return `NULL`.
This is not a concern when state is allocated statically,
or when one-short functions (like `XXH64()`) are used.
2021-12-08 14:52:55 -08:00
Yann Collet
a17161efb1 Merge pull request #653 from Cyan4973/noxxh3
removed XXH3 declarations when XXH_NO_XXH3 is defined
2021-12-08 14:35:13 -08:00
Yann Collet
3fa73000e1 Merge pull request #651 from easyaspi314/arm_go_brr
[ARM/AArch64] Fix multiple GCC codegen problems
2021-12-08 13:35:38 -08:00
Yann Collet
12a8d1a9c9 removed XXH3 declarations when XXH_NO_XXH3 is defined
on top of implementations, which was already removed.

Also : `noxxh3test` is now part of `make test`
2021-12-08 13:08:25 -08:00
Yann Collet
f035303b8a updated copyright years 2021-12-08 11:04:22 -08:00
easyaspi314 (Devin)
c0dd448b57 [ARM] Unaligned access fixes
- Use memcpy on ARMv6 and lower when unaligned access is supported
  - GCC has an internal conflict on whether unaligned access is available
    on ARMv6 so some parts do byteshift, some parts do not
  - aligned(1) is better on everything else
  - All this seems to be safe on even GCC 4.9.
 - Leave out the alignment check if unaligned access is supported on ARM.
2021-12-07 21:36:13 -05:00
easyaspi314 (Devin)
6991122545 Merge branch 'dev' of https://github.com/Cyan4973/xxHash into arm_go_brr 2021-12-07 20:26:27 -05:00
Yann Collet
1a71d0aa64 Merge pull request #650 from Hello71/attribute-aligned
Use __attribute__((aligned)) instead of packed
2021-12-07 17:07:46 -08:00
easyaspi314 (Devin)
1007890f26 Merge branch 'dev' of https://github.com/Cyan4973/xxHash into arm_go_brr 2021-12-07 00:22:43 -05:00
Alex Xu (Hello71)
fd7deb8431 Use __attribute__((aligned)) instead of packed
It improves gcc code generation on armv6 and armv7:
https://gcc.godbolt.org/z/nfnEKsjzc. It has some minor effect on
aarch64: +4 instructions with -O2, -156 instructions with -O3. Overall
it is clear that while gcc emits proper instructions in isolation with
packed structures, it often gets confused after inlining, and using
explicit alignment value with integer mode fixes this issue.
2021-12-06 23:51:09 -05:00
easyaspi314 (Devin)
abf8f03887 [ARM/AARCH64] Fix GCC
32-bit ARM changes:
 - Force GCC to unroll XXH3_accumulate_512 on scalar ARM -> 20% faster on
   ARMv6
 - Use `XXH_FORCE_MEMORY_ACCESS=1` when in ARM strict alignment mode, avoids
   calls to memcpy(?!???!)

XXH3_64bits on a Raspberry Pi 4B (Cortex-A72), GCC 10.2.1:
 - Raspbian armhf (-march=armv6 -mfpu=vfp -mfloat-abi=hard -munaligned-access)
   0.85 GB/s->1.2 GB/s. Note that there is still room; clang 11 gets 1.4 GB/s.
 - ARMv6, no unaligned access (-march=armv6 -mno-unaligned-access)
   0.3 GB/s -> 0.85 GB/s (no longer calls memcpy())

AArch64 changes
 - Moved the scalar loop above the NEON loop which allows GCC to interleave
 - AArch64 GCC now uses raw casting instead of `vld1q` which was treated as an
   intrinsic instead of a load.
   - Also hides the vreinterprets
   - Clang and v7a still use the safer vld1q_u8
 - Slight reordering of the NEON instructions

Pixel 4a (Cortex-A76), GCC 11.1.0: 9.8 GB/s -> 11.1 GB/s
Raspberry Pi 4B (Cortex-A72), GCC 10.2.1: 4.2 GB/s -> 4.3 GB/s

*GCC is now faster than Clang for aarch64.*
2021-12-06 23:47:46 -05:00
Yann Collet
3a1b27bd93 Merge pull request #649 from Cyan4973/cmake_install
fix cmake --install
2021-12-04 11:29:06 -08:00
Yann Collet
636f966ecc fix cmake --install
fix #646, reported by @kloczek .

Used this opportunity to add a `cmake --install` test in CI.
2021-12-04 11:03:32 -08:00
Yann Collet
d11fd1ea8d Merge pull request #648 from Cyan4973/install_man
fix man page installation
2021-12-04 10:47:29 -08:00
Yann Collet
836f4e735c fix man page installation
for variant redirectors (`xxh32sum`, `xxh64sum` and `xxh128sum`).
fix #647, reported by @jpalus.

Also : slightly updated man page text, for clarity and accuracy.
2021-12-04 10:29:49 -08:00