mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-22 06:13:51 -07:00
ore hardnested switch to handle
This commit is contained in:
parent
a3aa38e624
commit
8dcf670f72
2 changed files with 18 additions and 0 deletions
|
@ -228,10 +228,16 @@ static int usage_hf14_autopwn(void) {
|
||||||
PrintAndLogEx(NORMAL, " * 2 = 2k");
|
PrintAndLogEx(NORMAL, " * 2 = 2k");
|
||||||
PrintAndLogEx(NORMAL, " * 4 = 4k");
|
PrintAndLogEx(NORMAL, " * 4 = 4k");
|
||||||
PrintAndLogEx(NORMAL, " i <simd type> set type of SIMD instructions for hardnested. Default: autodetection.");
|
PrintAndLogEx(NORMAL, " i <simd type> set type of SIMD instructions for hardnested. Default: autodetection.");
|
||||||
|
#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");
|
PrintAndLogEx(NORMAL, " i 5 = AVX512");
|
||||||
|
#endif
|
||||||
PrintAndLogEx(NORMAL, " i 2 = AVX2");
|
PrintAndLogEx(NORMAL, " i 2 = AVX2");
|
||||||
PrintAndLogEx(NORMAL, " i a = AVX");
|
PrintAndLogEx(NORMAL, " i a = AVX");
|
||||||
PrintAndLogEx(NORMAL, " i s = SSE2");
|
PrintAndLogEx(NORMAL, " i s = SSE2");
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
PrintAndLogEx(NORMAL, " i m = MMX");
|
PrintAndLogEx(NORMAL, " i m = MMX");
|
||||||
PrintAndLogEx(NORMAL, " i n = none (use CPU regular instruction set)");
|
PrintAndLogEx(NORMAL, " i n = none (use CPU regular instruction set)");
|
||||||
PrintAndLogEx(NORMAL, "");
|
PrintAndLogEx(NORMAL, "");
|
||||||
|
@ -1998,9 +2004,13 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
|
||||||
SetSIMDInstr(SIMD_AUTO);
|
SetSIMDInstr(SIMD_AUTO);
|
||||||
ctmp = tolower(param_getchar(Cmd, cmdp + 1));
|
ctmp = tolower(param_getchar(Cmd, cmdp + 1));
|
||||||
switch (ctmp) {
|
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':
|
case '5':
|
||||||
SetSIMDInstr(SIMD_AVX512);
|
SetSIMDInstr(SIMD_AVX512);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case '2':
|
case '2':
|
||||||
SetSIMDInstr(SIMD_AVX2);
|
SetSIMDInstr(SIMD_AVX2);
|
||||||
break;
|
break;
|
||||||
|
@ -2013,6 +2023,8 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
|
||||||
case 'm':
|
case 'm':
|
||||||
SetSIMDInstr(SIMD_MMX);
|
SetSIMDInstr(SIMD_MMX);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
case 'n':
|
case 'n':
|
||||||
SetSIMDInstr(SIMD_NONE);
|
SetSIMDInstr(SIMD_NONE);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -75,9 +75,13 @@ static float brute_force_per_second;
|
||||||
|
|
||||||
static void get_SIMD_instruction_set(char *instruction_set) {
|
static void get_SIMD_instruction_set(char *instruction_set) {
|
||||||
switch (GetSIMDInstrAuto()) {
|
switch (GetSIMDInstrAuto()) {
|
||||||
|
#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 SIMD_AVX512:
|
case SIMD_AVX512:
|
||||||
strcpy(instruction_set, "AVX512F");
|
strcpy(instruction_set, "AVX512F");
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case SIMD_AVX2:
|
case SIMD_AVX2:
|
||||||
strcpy(instruction_set, "AVX2");
|
strcpy(instruction_set, "AVX2");
|
||||||
break;
|
break;
|
||||||
|
@ -90,6 +94,8 @@ static void get_SIMD_instruction_set(char *instruction_set) {
|
||||||
case SIMD_MMX:
|
case SIMD_MMX:
|
||||||
strcpy(instruction_set, "MMX");
|
strcpy(instruction_set, "MMX");
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
case SIMD_AUTO:
|
case SIMD_AUTO:
|
||||||
case SIMD_NONE:
|
case SIMD_NONE:
|
||||||
strcpy(instruction_set, "no");
|
strcpy(instruction_set, "no");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue