2 * Hyper-super-meta-alt-control-shift extra fast str_len() and str_hash()
5 * (c) 2002, Robert Spalek <robert@ucw.cz>
10 /* An equivalent of the Intel's rol instruction. */
11 #define ROL(x, bits) (((x) << (bits)) | ((x) >> (sizeof(uns)*8 - (bits))))
13 /* The following functions need str to be aligned to uns. */
14 uns str_len_aligned(const char *str) __attribute__((const));
15 uns str_hash_aligned(const char *str) __attribute__((const));
17 #ifdef CPU_ALLOW_UNALIGNED
18 #define str_len(str) str_len_aligned(str)
19 #define str_hash(str) str_hash_aligned(str)
21 uns str_len(const char *str) __attribute__((const));
22 uns str_hash(const char *str) __attribute__((const));