diff --git a/Hashes.cpp b/Hashes.cpp index 0d1727ad..76f534dd 100644 --- a/Hashes.cpp +++ b/Hashes.cpp @@ -1278,13 +1278,17 @@ void crc32c_pclmul_test(const void *key, int len, uint32_t seed, void *out) #endif #include "hash-garage/nmhash.h" + #define NMHASH32_DESC_STR "NMHASH_LITTLE_ENDIAN:" MACRO_ITOA(NMHASH_LITTLE_ENDIAN) ", " \ "NMH_VECTOR:" MACRO_ITOA(NMH_VECTOR) ", " \ "NMH_ACC_ALIGN:" MACRO_ITOA(NMH_ACC_ALIGN) ", " \ "NMH_RESTRICT:" MACRO_ITOA(NMH_RESTRICT) - -const char * const nmhash32_ver("nmhash32, " NMHASH32_DESC_STR); -const char * const nmhash32x_ver("nmhash32x, " NMHASH32_DESC_STR); +const char * const nmhash32_desc(nmhash32_broken() + ? "nmhash32 (broken), " NMHASH32_DESC_STR + : "nmhash32, " NMHASH32_DESC_STR); +const char * const nmhash32x_desc(nmhash32_broken() + ? "nmhash32x (broken), " NMHASH32_DESC_STR + : "nmhash32x, " NMHASH32_DESC_STR); bool nmhash32_broken( void ) { static bool done = false, result; diff --git a/main.cpp b/main.cpp index 90c88c8f..ab30085f 100644 --- a/main.cpp +++ b/main.cpp @@ -758,8 +758,8 @@ HashInfo g_hashes[] = { rapidhash_test, 64, 0xAF404C4B, "rapidhash", "rapidhash v1", GOOD, {}}, { rapidhash_unrolled_test, 64, 0xAF404C4B, "rapidhash_unrolled", "rapidhash v1 - unrolled", GOOD, {}}, #endif -{ nmhash32_test, 32, nmhash32_broken() ? 0U : 0x12A30553, "nmhash32", nmhash32_ver, GOOD, {}}, -{ nmhash32x_test, 32, nmhash32_broken() ? 0U : 0xA8580227, "nmhash32x", nmhash32x_ver, GOOD, {}}, +{ nmhash32_test, 32, nmhash32_broken() ? 0U : 0x12A30553, "nmhash32", nmhash32_desc, GOOD, {}}, +{ nmhash32x_test, 32, nmhash32_broken() ? 0U : 0xA8580227, "nmhash32x", nmhash32x_desc, GOOD, {}}, #ifdef HAVE_KHASHV // There are certain GCC versions producing 0x9A8F7952 and 0X90A2A4F9 as verification values // for k-hashv32 and k-hashv64. That deserves further investigation.