diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index ba017676c..8f54b1db8 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -163,11 +163,17 @@ static int usage_hf14_hardnested(void) { PrintAndLogEx(NORMAL, " f read/write instead of default name"); PrintAndLogEx(NORMAL, " t tests?"); PrintAndLogEx(NORMAL, " i set type of SIMD instructions. Without this flag programs autodetect it."); +#if defined (__i386__) || defined (__x86_64__) +#if !defined(__APPLE__) || (defined(__APPLE__) && (__clang_major__ > 8 || __clang_major__ == 8 && __clang_minor__ >= 1)) +#if (__GNUC__ >= 5) && (__GNUC__ > 5 || __GNUC_MINOR__ > 2) PrintAndLogEx(NORMAL, " i 5 = AVX512"); +#endif PrintAndLogEx(NORMAL, " i 2 = AVX2"); PrintAndLogEx(NORMAL, " i a = AVX"); PrintAndLogEx(NORMAL, " i s = SSE2"); PrintAndLogEx(NORMAL, " i m = MMX"); +#endif +#endif PrintAndLogEx(NORMAL, " i n = none (use CPU regular instruction set)"); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "Examples:"); @@ -1805,9 +1811,13 @@ static int CmdHF14AMfNestedHard(const char *Cmd) { SetSIMDInstr(SIMD_AUTO); ctmp = tolower(param_getchar(Cmd, cmdp + 1)); switch (ctmp) { +#if defined (__i386__) || defined (__x86_64__) +#if !defined(__APPLE__) || (defined(__APPLE__) && (__clang_major__ > 8 || __clang_major__ == 8 && __clang_minor__ >= 1)) +#if (__GNUC__ >= 5) && (__GNUC__ > 5 || __GNUC_MINOR__ > 2) case '5': SetSIMDInstr(SIMD_AVX512); break; +#endif case '2': SetSIMDInstr(SIMD_AVX2); break; @@ -1820,6 +1830,8 @@ static int CmdHF14AMfNestedHard(const char *Cmd) { case 'm': SetSIMDInstr(SIMD_MMX); break; +#endif +#endif case 'n': SetSIMDInstr(SIMD_NONE); break;