diff options
| author | Nathan Moinvaziri <nathan@nathanm.com> | 2022-01-09 15:01:23 -0800 |
|---|---|---|
| committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2022-02-10 16:10:48 +0100 |
| commit | 363a95fb9b8c4bef7225164fa1deb5481a35c3c0 (patch) | |
| tree | c8d52c950d9efc1f9c5667bf84336fc6c2e4fe48 /insert_string_tpl.h | |
| parent | 2fb95de5e89e622db8de8fbfabb713edf86c688b (diff) | |
| download | Project-Tick-363a95fb9b8c4bef7225164fa1deb5481a35c3c0.tar.gz Project-Tick-363a95fb9b8c4bef7225164fa1deb5481a35c3c0.zip | |
Introduce zmemcpy to use unaligned access for architectures we know support unaligned access, otherwise use memcpy.
Diffstat (limited to 'insert_string_tpl.h')
| -rw-r--r-- | insert_string_tpl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/insert_string_tpl.h b/insert_string_tpl.h index 7d3e46c897..643a5e0e31 100644 --- a/insert_string_tpl.h +++ b/insert_string_tpl.h @@ -29,9 +29,9 @@ # define HASH_CALC_MASK HASH_MASK #endif #ifndef HASH_CALC_READ -# ifdef UNALIGNED_OK +# if BYTE_ORDER == LITTLE_ENDIAN # define HASH_CALC_READ \ - memcpy(&val, strstart, sizeof(val)); + zmemcpy_4(&val, strstart); # else # define HASH_CALC_READ \ val = ((uint32_t)(strstart[0])); \ |
