Skip to content

Commit

Permalink
[mono][jit] Add minimal support for unsupported avx instruction sets. (
Browse files Browse the repository at this point in the history
…#98151)

Extracted from #97096.

Author: Johan Lorensson lateralusx.github@gmail.com.
  • Loading branch information
vargaz authored Feb 9, 2024
1 parent eb4152d commit 512bcaf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mono/mono/mini/simd-intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ is_hw_intrinsics_class (MonoClass *klass, const char *name, gboolean *is_64bit)
if ((!strcmp (class_name, "X64") || !strcmp (class_name, "Arm64")) && m_class_get_nested_in (klass)) {
*is_64bit = TRUE;
return !strcmp (m_class_get_name (m_class_get_nested_in (klass)), name);
} else if (!strcmp (class_name, "VL")) {
return !strcmp (m_class_get_name (m_class_get_nested_in (klass)), name);
} else {
*is_64bit = FALSE;
return !strcmp (class_name, name);
Expand Down Expand Up @@ -4711,6 +4713,11 @@ static const IntrinGroup supported_x86_intrinsics [] = {
{ "Aes", MONO_CPU_X86_AES, aes_methods, sizeof (aes_methods) },
{ "Avx", MONO_CPU_X86_AVX, unsupported, sizeof (unsupported) },
{ "Avx2", MONO_CPU_X86_AVX2, unsupported, sizeof (unsupported) },
{ "Avx512BW", MONO_CPU_X86_AVX2, unsupported, sizeof (unsupported) },
{ "Avx512CD", MONO_CPU_X86_AVX2, unsupported, sizeof (unsupported) },
{ "Avx512DQ", MONO_CPU_X86_AVX2, unsupported, sizeof (unsupported) },
{ "Avx512F", MONO_CPU_X86_AVX2, unsupported, sizeof (unsupported) },
{ "Avx512Vbmi", MONO_CPU_X86_AVX2, unsupported, sizeof (unsupported) },
{ "AvxVnni", 0, unsupported, sizeof (unsupported) },
{ "Bmi1", MONO_CPU_X86_BMI1, bmi1_methods, sizeof (bmi1_methods) },
{ "Bmi2", MONO_CPU_X86_BMI2, bmi2_methods, sizeof (bmi2_methods) },
Expand Down

0 comments on commit 512bcaf

Please sign in to comment.