Add very basic feature flagging for NEON

This commit is contained in:
Doridian committed 2022-03-28 23:06:40 -07:00
1 parent 03aa9e27c8
commit 62704db5ed
8 files changed
+210 -26

No files matched your search

+25
View File
@@ -1873,6 +1873,9 @@ static int CmdHF14AMfNestedHard(const char *Cmd) {
#endif
#if defined(COMPILER_HAS_SIMD_AVX512)
arg_lit0(NULL, "i5", "AVX512"),
#endif
#if defined(COMPILER_HAS_SIMD_NEON)
arg_lit0(NULL, "ie", "NEON"),
#endif
arg_param_end
};
@@ -1930,6 +1933,9 @@ static int CmdHF14AMfNestedHard(const char *Cmd) {
#endif
#if defined(COMPILER_HAS_SIMD_AVX512)
bool i5 = arg_get_lit(ctx, 20);
#endif
#if defined(COMPILER_HAS_SIMD_NEON)
bool ie = arg_get_lit(ctx, 16);
#endif
CLIParserFree(ctx);
@@ -1951,6 +1957,12 @@ static int CmdHF14AMfNestedHard(const char *Cmd) {
if (im)
SetSIMDInstr(SIMD_MMX);
#endif
#if defined(COMPILER_HAS_SIMD_NEON)
if (ie)
SetSIMDInstr(SIMD_NEON);
#endif
if (in)
SetSIMDInstr(SIMD_NONE);
@@ -2067,6 +2079,9 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
#endif
#if defined(COMPILER_HAS_SIMD_AVX512)
arg_lit0(NULL, "i5", "AVX512"),
#endif
#if defined(COMPILER_HAS_SIMD_NEON)
arg_lit0(NULL, "ie", "NEON"),
#endif
arg_param_end
};
@@ -2118,6 +2133,10 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
#if defined(COMPILER_HAS_SIMD_AVX512)
bool i5 = arg_get_lit(ctx, 18);
#endif
#if defined(COMPILER_HAS_SIMD_NEON)
bool ie = arg_get_lit(ctx, 14);
#endif
CLIParserFree(ctx);
//validations
@@ -2167,6 +2186,12 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
if (im)
SetSIMDInstr(SIMD_MMX);
#endif
#if defined(COMPILER_HAS_SIMD_NEON)
if (ie)
SetSIMDInstr(SIMD_NEON);
#endif
if (in)
SetSIMDInstr(SIMD_NONE);
+5
View File
@@ -101,6 +101,11 @@ static void get_SIMD_instruction_set(char *instruction_set) {
case SIMD_MMX:
strcpy(instruction_set, "MMX");
break;
#endif
#if defined(COMPILER_HAS_SIMD_NEON)
case SIMD_NEON:
strcpy(instruction_set, "NEON");
break;
#endif
case SIMD_AUTO:
case SIMD_NONE: