From 7bc3c1d31b850723f3d658dea61432d6c8bfab99 Mon Sep 17 00:00:00 2001 From: DeepakRajendrakumaran Date: Wed, 25 Jan 2023 23:47:24 -0800 Subject: [PATCH] Updating JitInterface to support Vector512. (#81197) * Auto-generated changes for adding Vector512 in JitInterface. * Additional Interface Changes. * Updating JITEEVersionIdentifier. --- src/coreclr/inc/corinfoinstructionset.h | 162 +++++++++-------- src/coreclr/inc/corjit.h | 1 + src/coreclr/inc/jiteeversionguid.h | 10 +- .../Runtime/ReadyToRunInstructionSetHelper.cs | 2 + .../tools/Common/JitInterface/CorInfoImpl.cs | 6 +- .../JitInterface/CorInfoInstructionSet.cs | 168 ++++++++++-------- .../tools/Common/JitInterface/CorInfoTypes.cs | 1 + .../ThunkGenerator/InstructionSetDesc.txt | 3 + .../tools/superpmi/superpmi/icorjitinfo.cpp | 4 + 9 files changed, 199 insertions(+), 158 deletions(-) diff --git a/src/coreclr/inc/corinfoinstructionset.h b/src/coreclr/inc/corinfoinstructionset.h index 18bde83aace..4f489cb93b7 100644 --- a/src/coreclr/inc/corinfoinstructionset.h +++ b/src/coreclr/inc/corinfoinstructionset.h @@ -57,44 +57,45 @@ enum CORINFO_InstructionSet InstructionSet_POPCNT=16, InstructionSet_Vector128=17, InstructionSet_Vector256=18, - InstructionSet_AVXVNNI=19, - InstructionSet_MOVBE=20, - InstructionSet_X86Serialize=21, - InstructionSet_AVX512F=22, - InstructionSet_AVX512F_VL=23, - InstructionSet_AVX512BW=24, - InstructionSet_AVX512BW_VL=25, - InstructionSet_AVX512CD=26, - InstructionSet_AVX512CD_VL=27, - InstructionSet_AVX512DQ=28, - InstructionSet_AVX512DQ_VL=29, - InstructionSet_X86Base_X64=30, - InstructionSet_SSE_X64=31, - InstructionSet_SSE2_X64=32, - InstructionSet_SSE3_X64=33, - InstructionSet_SSSE3_X64=34, - InstructionSet_SSE41_X64=35, - InstructionSet_SSE42_X64=36, - InstructionSet_AVX_X64=37, - InstructionSet_AVX2_X64=38, - InstructionSet_AES_X64=39, - InstructionSet_BMI1_X64=40, - InstructionSet_BMI2_X64=41, - InstructionSet_FMA_X64=42, - InstructionSet_LZCNT_X64=43, - InstructionSet_PCLMULQDQ_X64=44, - InstructionSet_POPCNT_X64=45, - InstructionSet_AVXVNNI_X64=46, - InstructionSet_MOVBE_X64=47, - InstructionSet_X86Serialize_X64=48, - InstructionSet_AVX512F_X64=49, - InstructionSet_AVX512F_VL_X64=50, - InstructionSet_AVX512BW_X64=51, - InstructionSet_AVX512BW_VL_X64=52, - InstructionSet_AVX512CD_X64=53, - InstructionSet_AVX512CD_VL_X64=54, - InstructionSet_AVX512DQ_X64=55, - InstructionSet_AVX512DQ_VL_X64=56, + InstructionSet_Vector512=19, + InstructionSet_AVXVNNI=20, + InstructionSet_MOVBE=21, + InstructionSet_X86Serialize=22, + InstructionSet_AVX512F=23, + InstructionSet_AVX512F_VL=24, + InstructionSet_AVX512BW=25, + InstructionSet_AVX512BW_VL=26, + InstructionSet_AVX512CD=27, + InstructionSet_AVX512CD_VL=28, + InstructionSet_AVX512DQ=29, + InstructionSet_AVX512DQ_VL=30, + InstructionSet_X86Base_X64=31, + InstructionSet_SSE_X64=32, + InstructionSet_SSE2_X64=33, + InstructionSet_SSE3_X64=34, + InstructionSet_SSSE3_X64=35, + InstructionSet_SSE41_X64=36, + InstructionSet_SSE42_X64=37, + InstructionSet_AVX_X64=38, + InstructionSet_AVX2_X64=39, + InstructionSet_AES_X64=40, + InstructionSet_BMI1_X64=41, + InstructionSet_BMI2_X64=42, + InstructionSet_FMA_X64=43, + InstructionSet_LZCNT_X64=44, + InstructionSet_PCLMULQDQ_X64=45, + InstructionSet_POPCNT_X64=46, + InstructionSet_AVXVNNI_X64=47, + InstructionSet_MOVBE_X64=48, + InstructionSet_X86Serialize_X64=49, + InstructionSet_AVX512F_X64=50, + InstructionSet_AVX512F_VL_X64=51, + InstructionSet_AVX512BW_X64=52, + InstructionSet_AVX512BW_VL_X64=53, + InstructionSet_AVX512CD_X64=54, + InstructionSet_AVX512CD_VL_X64=55, + InstructionSet_AVX512DQ_X64=56, + InstructionSet_AVX512DQ_VL_X64=57, #endif // TARGET_AMD64 #ifdef TARGET_X86 InstructionSet_X86Base=1, @@ -115,44 +116,45 @@ enum CORINFO_InstructionSet InstructionSet_POPCNT=16, InstructionSet_Vector128=17, InstructionSet_Vector256=18, - InstructionSet_AVXVNNI=19, - InstructionSet_MOVBE=20, - InstructionSet_X86Serialize=21, - InstructionSet_AVX512F=22, - InstructionSet_AVX512F_VL=23, - InstructionSet_AVX512BW=24, - InstructionSet_AVX512BW_VL=25, - InstructionSet_AVX512CD=26, - InstructionSet_AVX512CD_VL=27, - InstructionSet_AVX512DQ=28, - InstructionSet_AVX512DQ_VL=29, - InstructionSet_X86Base_X64=30, - InstructionSet_SSE_X64=31, - InstructionSet_SSE2_X64=32, - InstructionSet_SSE3_X64=33, - InstructionSet_SSSE3_X64=34, - InstructionSet_SSE41_X64=35, - InstructionSet_SSE42_X64=36, - InstructionSet_AVX_X64=37, - InstructionSet_AVX2_X64=38, - InstructionSet_AES_X64=39, - InstructionSet_BMI1_X64=40, - InstructionSet_BMI2_X64=41, - InstructionSet_FMA_X64=42, - InstructionSet_LZCNT_X64=43, - InstructionSet_PCLMULQDQ_X64=44, - InstructionSet_POPCNT_X64=45, - InstructionSet_AVXVNNI_X64=46, - InstructionSet_MOVBE_X64=47, - InstructionSet_X86Serialize_X64=48, - InstructionSet_AVX512F_X64=49, - InstructionSet_AVX512F_VL_X64=50, - InstructionSet_AVX512BW_X64=51, - InstructionSet_AVX512BW_VL_X64=52, - InstructionSet_AVX512CD_X64=53, - InstructionSet_AVX512CD_VL_X64=54, - InstructionSet_AVX512DQ_X64=55, - InstructionSet_AVX512DQ_VL_X64=56, + InstructionSet_Vector512=19, + InstructionSet_AVXVNNI=20, + InstructionSet_MOVBE=21, + InstructionSet_X86Serialize=22, + InstructionSet_AVX512F=23, + InstructionSet_AVX512F_VL=24, + InstructionSet_AVX512BW=25, + InstructionSet_AVX512BW_VL=26, + InstructionSet_AVX512CD=27, + InstructionSet_AVX512CD_VL=28, + InstructionSet_AVX512DQ=29, + InstructionSet_AVX512DQ_VL=30, + InstructionSet_X86Base_X64=31, + InstructionSet_SSE_X64=32, + InstructionSet_SSE2_X64=33, + InstructionSet_SSE3_X64=34, + InstructionSet_SSSE3_X64=35, + InstructionSet_SSE41_X64=36, + InstructionSet_SSE42_X64=37, + InstructionSet_AVX_X64=38, + InstructionSet_AVX2_X64=39, + InstructionSet_AES_X64=40, + InstructionSet_BMI1_X64=41, + InstructionSet_BMI2_X64=42, + InstructionSet_FMA_X64=43, + InstructionSet_LZCNT_X64=44, + InstructionSet_PCLMULQDQ_X64=45, + InstructionSet_POPCNT_X64=46, + InstructionSet_AVXVNNI_X64=47, + InstructionSet_MOVBE_X64=48, + InstructionSet_X86Serialize_X64=49, + InstructionSet_AVX512F_X64=50, + InstructionSet_AVX512F_VL_X64=51, + InstructionSet_AVX512BW_X64=52, + InstructionSet_AVX512BW_VL_X64=53, + InstructionSet_AVX512CD_X64=54, + InstructionSet_AVX512CD_VL_X64=55, + InstructionSet_AVX512DQ_X64=56, + InstructionSet_AVX512DQ_VL_X64=57, #endif // TARGET_X86 }; @@ -534,6 +536,8 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins resultflags.RemoveInstructionSet(InstructionSet_Vector128); if (resultflags.HasInstructionSet(InstructionSet_Vector256) && !resultflags.HasInstructionSet(InstructionSet_AVX)) resultflags.RemoveInstructionSet(InstructionSet_Vector256); + if (resultflags.HasInstructionSet(InstructionSet_Vector512) && !resultflags.HasInstructionSet(InstructionSet_AVX512F)) + resultflags.RemoveInstructionSet(InstructionSet_Vector512); if (resultflags.HasInstructionSet(InstructionSet_AVXVNNI) && !resultflags.HasInstructionSet(InstructionSet_AVX2)) resultflags.RemoveInstructionSet(InstructionSet_AVXVNNI); if (resultflags.HasInstructionSet(InstructionSet_MOVBE) && !resultflags.HasInstructionSet(InstructionSet_SSE42)) @@ -592,6 +596,8 @@ inline CORINFO_InstructionSetFlags EnsureInstructionSetFlagsAreValid(CORINFO_Ins resultflags.RemoveInstructionSet(InstructionSet_Vector128); if (resultflags.HasInstructionSet(InstructionSet_Vector256) && !resultflags.HasInstructionSet(InstructionSet_AVX)) resultflags.RemoveInstructionSet(InstructionSet_Vector256); + if (resultflags.HasInstructionSet(InstructionSet_Vector512) && !resultflags.HasInstructionSet(InstructionSet_AVX512F)) + resultflags.RemoveInstructionSet(InstructionSet_Vector512); if (resultflags.HasInstructionSet(InstructionSet_AVXVNNI) && !resultflags.HasInstructionSet(InstructionSet_AVX2)) resultflags.RemoveInstructionSet(InstructionSet_AVXVNNI); if (resultflags.HasInstructionSet(InstructionSet_MOVBE) && !resultflags.HasInstructionSet(InstructionSet_SSE42)) @@ -742,6 +748,8 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet) return "Vector128"; case InstructionSet_Vector256 : return "Vector256"; + case InstructionSet_Vector512 : + return "Vector512"; case InstructionSet_AVXVNNI : return "AVXVNNI"; case InstructionSet_AVXVNNI_X64 : @@ -824,6 +832,8 @@ inline const char *InstructionSetToString(CORINFO_InstructionSet instructionSet) return "Vector128"; case InstructionSet_Vector256 : return "Vector256"; + case InstructionSet_Vector512 : + return "Vector512"; case InstructionSet_AVXVNNI : return "AVXVNNI"; case InstructionSet_MOVBE : diff --git a/src/coreclr/inc/corjit.h b/src/coreclr/inc/corjit.h index 380db270e1c..4f8a8a090d1 100644 --- a/src/coreclr/inc/corjit.h +++ b/src/coreclr/inc/corjit.h @@ -117,6 +117,7 @@ enum CorJitAllocMemFlag CORJIT_ALLOCMEM_FLG_RODATA_16BYTE_ALIGN = 0x00000002, // The read-only data will be 16-byte aligned CORJIT_ALLOCMEM_FLG_32BYTE_ALIGN = 0x00000004, // The code will be 32-byte aligned CORJIT_ALLOCMEM_FLG_RODATA_32BYTE_ALIGN = 0x00000008, // The read-only data will be 32-byte aligned + CORJIT_ALLOCMEM_FLG_RODATA_64BYTE_ALIGN = 0x00000010, // The read-only data will be 64-byte aligned }; inline CorJitAllocMemFlag operator |(CorJitAllocMemFlag a, CorJitAllocMemFlag b) diff --git a/src/coreclr/inc/jiteeversionguid.h b/src/coreclr/inc/jiteeversionguid.h index c690c3d5ea4..9dc7f52524e 100644 --- a/src/coreclr/inc/jiteeversionguid.h +++ b/src/coreclr/inc/jiteeversionguid.h @@ -43,11 +43,11 @@ typedef const GUID *LPCGUID; #define GUID_DEFINED #endif // !GUID_DEFINED -constexpr GUID JITEEVersionIdentifier = { /* 91a3d851-74df-4be2-a270-432a8fab6955 */ - 0x91a3d851, - 0x74df, - 0x4be2, - {0xa2, 0x70, 0x43, 0x2a, 0x8f, 0xab, 0x69, 0x55} +constexpr GUID JITEEVersionIdentifier = { /* ed7c6864-68bb-40cd-90de-b47632899a13 */ + 0xed7c6864, + 0x68bb, + 0x40cd, + {0x90, 0xde, 0xb4, 0x76, 0x32, 0x89, 0x9a, 0x13} }; ////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs index 326ae38a5e7..4b82e02d647 100644 --- a/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs +++ b/src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs @@ -87,6 +87,7 @@ namespace Internal.ReadyToRunConstants case InstructionSet.X64_POPCNT_X64: return ReadyToRunInstructionSet.Popcnt; case InstructionSet.X64_Vector128: return null; case InstructionSet.X64_Vector256: return null; + case InstructionSet.X64_Vector512: return null; case InstructionSet.X64_AVXVNNI: return ReadyToRunInstructionSet.AvxVnni; case InstructionSet.X64_AVXVNNI_X64: return ReadyToRunInstructionSet.AvxVnni; case InstructionSet.X64_MOVBE: return ReadyToRunInstructionSet.Movbe; @@ -152,6 +153,7 @@ namespace Internal.ReadyToRunConstants case InstructionSet.X86_POPCNT_X64: return null; case InstructionSet.X86_Vector128: return null; case InstructionSet.X86_Vector256: return null; + case InstructionSet.X86_Vector512: return null; case InstructionSet.X86_AVXVNNI: return ReadyToRunInstructionSet.AvxVnni; case InstructionSet.X86_AVXVNNI_X64: return null; case InstructionSet.X86_MOVBE: return ReadyToRunInstructionSet.Movbe; diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs index f321d7c9191..df7d8784901 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs @@ -3460,7 +3460,11 @@ namespace Internal.JitInterface { _roDataAlignment = 8; - if ((args.flag & CorJitAllocMemFlag.CORJIT_ALLOCMEM_FLG_RODATA_32BYTE_ALIGN) != 0) + if ((args.flag & CorJitAllocMemFlag.CORJIT_ALLOCMEM_FLG_RODATA_64BYTE_ALIGN) != 0) + { + _roDataAlignment = 64; + } + else if ((args.flag & CorJitAllocMemFlag.CORJIT_ALLOCMEM_FLG_RODATA_32BYTE_ALIGN) != 0) { _roDataAlignment = 32; } diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs b/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs index 22d96d02fd5..69104df677e 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs @@ -55,6 +55,7 @@ namespace Internal.JitInterface X64_POPCNT = InstructionSet_X64.POPCNT, X64_Vector128 = InstructionSet_X64.Vector128, X64_Vector256 = InstructionSet_X64.Vector256, + X64_Vector512 = InstructionSet_X64.Vector512, X64_AVXVNNI = InstructionSet_X64.AVXVNNI, X64_MOVBE = InstructionSet_X64.MOVBE, X64_X86Serialize = InstructionSet_X64.X86Serialize, @@ -111,6 +112,7 @@ namespace Internal.JitInterface X86_POPCNT = InstructionSet_X86.POPCNT, X86_Vector128 = InstructionSet_X86.Vector128, X86_Vector256 = InstructionSet_X86.Vector256, + X86_Vector512 = InstructionSet_X86.Vector512, X86_AVXVNNI = InstructionSet_X86.AVXVNNI, X86_MOVBE = InstructionSet_X86.MOVBE, X86_X86Serialize = InstructionSet_X86.X86Serialize, @@ -199,44 +201,45 @@ namespace Internal.JitInterface POPCNT = 16, Vector128 = 17, Vector256 = 18, - AVXVNNI = 19, - MOVBE = 20, - X86Serialize = 21, - AVX512F = 22, - AVX512F_VL = 23, - AVX512BW = 24, - AVX512BW_VL = 25, - AVX512CD = 26, - AVX512CD_VL = 27, - AVX512DQ = 28, - AVX512DQ_VL = 29, - X86Base_X64 = 30, - SSE_X64 = 31, - SSE2_X64 = 32, - SSE3_X64 = 33, - SSSE3_X64 = 34, - SSE41_X64 = 35, - SSE42_X64 = 36, - AVX_X64 = 37, - AVX2_X64 = 38, - AES_X64 = 39, - BMI1_X64 = 40, - BMI2_X64 = 41, - FMA_X64 = 42, - LZCNT_X64 = 43, - PCLMULQDQ_X64 = 44, - POPCNT_X64 = 45, - AVXVNNI_X64 = 46, - MOVBE_X64 = 47, - X86Serialize_X64 = 48, - AVX512F_X64 = 49, - AVX512F_VL_X64 = 50, - AVX512BW_X64 = 51, - AVX512BW_VL_X64 = 52, - AVX512CD_X64 = 53, - AVX512CD_VL_X64 = 54, - AVX512DQ_X64 = 55, - AVX512DQ_VL_X64 = 56, + Vector512 = 19, + AVXVNNI = 20, + MOVBE = 21, + X86Serialize = 22, + AVX512F = 23, + AVX512F_VL = 24, + AVX512BW = 25, + AVX512BW_VL = 26, + AVX512CD = 27, + AVX512CD_VL = 28, + AVX512DQ = 29, + AVX512DQ_VL = 30, + X86Base_X64 = 31, + SSE_X64 = 32, + SSE2_X64 = 33, + SSE3_X64 = 34, + SSSE3_X64 = 35, + SSE41_X64 = 36, + SSE42_X64 = 37, + AVX_X64 = 38, + AVX2_X64 = 39, + AES_X64 = 40, + BMI1_X64 = 41, + BMI2_X64 = 42, + FMA_X64 = 43, + LZCNT_X64 = 44, + PCLMULQDQ_X64 = 45, + POPCNT_X64 = 46, + AVXVNNI_X64 = 47, + MOVBE_X64 = 48, + X86Serialize_X64 = 49, + AVX512F_X64 = 50, + AVX512F_VL_X64 = 51, + AVX512BW_X64 = 52, + AVX512BW_VL_X64 = 53, + AVX512CD_X64 = 54, + AVX512CD_VL_X64 = 55, + AVX512DQ_X64 = 56, + AVX512DQ_VL_X64 = 57, } public enum InstructionSet_X86 @@ -261,44 +264,45 @@ namespace Internal.JitInterface POPCNT = 16, Vector128 = 17, Vector256 = 18, - AVXVNNI = 19, - MOVBE = 20, - X86Serialize = 21, - AVX512F = 22, - AVX512F_VL = 23, - AVX512BW = 24, - AVX512BW_VL = 25, - AVX512CD = 26, - AVX512CD_VL = 27, - AVX512DQ = 28, - AVX512DQ_VL = 29, - X86Base_X64 = 30, - SSE_X64 = 31, - SSE2_X64 = 32, - SSE3_X64 = 33, - SSSE3_X64 = 34, - SSE41_X64 = 35, - SSE42_X64 = 36, - AVX_X64 = 37, - AVX2_X64 = 38, - AES_X64 = 39, - BMI1_X64 = 40, - BMI2_X64 = 41, - FMA_X64 = 42, - LZCNT_X64 = 43, - PCLMULQDQ_X64 = 44, - POPCNT_X64 = 45, - AVXVNNI_X64 = 46, - MOVBE_X64 = 47, - X86Serialize_X64 = 48, - AVX512F_X64 = 49, - AVX512F_VL_X64 = 50, - AVX512BW_X64 = 51, - AVX512BW_VL_X64 = 52, - AVX512CD_X64 = 53, - AVX512CD_VL_X64 = 54, - AVX512DQ_X64 = 55, - AVX512DQ_VL_X64 = 56, + Vector512 = 19, + AVXVNNI = 20, + MOVBE = 21, + X86Serialize = 22, + AVX512F = 23, + AVX512F_VL = 24, + AVX512BW = 25, + AVX512BW_VL = 26, + AVX512CD = 27, + AVX512CD_VL = 28, + AVX512DQ = 29, + AVX512DQ_VL = 30, + X86Base_X64 = 31, + SSE_X64 = 32, + SSE2_X64 = 33, + SSE3_X64 = 34, + SSSE3_X64 = 35, + SSE41_X64 = 36, + SSE42_X64 = 37, + AVX_X64 = 38, + AVX2_X64 = 39, + AES_X64 = 40, + BMI1_X64 = 41, + BMI2_X64 = 42, + FMA_X64 = 43, + LZCNT_X64 = 44, + PCLMULQDQ_X64 = 45, + POPCNT_X64 = 46, + AVXVNNI_X64 = 47, + MOVBE_X64 = 48, + X86Serialize_X64 = 49, + AVX512F_X64 = 50, + AVX512F_VL_X64 = 51, + AVX512BW_X64 = 52, + AVX512BW_VL_X64 = 53, + AVX512CD_X64 = 54, + AVX512CD_VL_X64 = 55, + AVX512DQ_X64 = 56, + AVX512DQ_VL_X64 = 57, } public unsafe struct InstructionSetFlags : IEnumerable @@ -431,6 +435,7 @@ namespace Internal.JitInterface { case InstructionSet.X64_Vector128: return InstructionSet.X64_SSE; case InstructionSet.X64_Vector256: return InstructionSet.X64_AVX; + case InstructionSet.X64_Vector512: return InstructionSet.X64_AVX512F; } break; case TargetArchitecture.X86: @@ -438,6 +443,7 @@ namespace Internal.JitInterface { case InstructionSet.X86_Vector128: return InstructionSet.X86_SSE; case InstructionSet.X86_Vector256: return InstructionSet.X86_AVX; + case InstructionSet.X86_Vector512: return InstructionSet.X86_AVX512F; } break; } @@ -650,6 +656,8 @@ namespace Internal.JitInterface resultflags.AddInstructionSet(InstructionSet.X64_SSE); if (resultflags.HasInstructionSet(InstructionSet.X64_Vector256)) resultflags.AddInstructionSet(InstructionSet.X64_AVX); + if (resultflags.HasInstructionSet(InstructionSet.X64_Vector512)) + resultflags.AddInstructionSet(InstructionSet.X64_AVX512F); if (resultflags.HasInstructionSet(InstructionSet.X64_AVXVNNI)) resultflags.AddInstructionSet(InstructionSet.X64_AVX2); if (resultflags.HasInstructionSet(InstructionSet.X64_MOVBE)) @@ -709,6 +717,8 @@ namespace Internal.JitInterface resultflags.AddInstructionSet(InstructionSet.X86_SSE); if (resultflags.HasInstructionSet(InstructionSet.X86_Vector256)) resultflags.AddInstructionSet(InstructionSet.X86_AVX); + if (resultflags.HasInstructionSet(InstructionSet.X86_Vector512)) + resultflags.AddInstructionSet(InstructionSet.X86_AVX512F); if (resultflags.HasInstructionSet(InstructionSet.X86_AVXVNNI)) resultflags.AddInstructionSet(InstructionSet.X86_AVX2); if (resultflags.HasInstructionSet(InstructionSet.X86_MOVBE)) @@ -879,6 +889,8 @@ namespace Internal.JitInterface resultflags.AddInstructionSet(InstructionSet.X64_Vector128); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX)) resultflags.AddInstructionSet(InstructionSet.X64_Vector256); + if (resultflags.HasInstructionSet(InstructionSet.X64_AVX512F)) + resultflags.AddInstructionSet(InstructionSet.X64_Vector512); if (resultflags.HasInstructionSet(InstructionSet.X64_AVX2)) resultflags.AddInstructionSet(InstructionSet.X64_AVXVNNI); if (resultflags.HasInstructionSet(InstructionSet.X64_SSE42)) @@ -938,6 +950,8 @@ namespace Internal.JitInterface resultflags.AddInstructionSet(InstructionSet.X86_Vector128); if (resultflags.HasInstructionSet(InstructionSet.X86_AVX)) resultflags.AddInstructionSet(InstructionSet.X86_Vector256); + if (resultflags.HasInstructionSet(InstructionSet.X86_AVX512F)) + resultflags.AddInstructionSet(InstructionSet.X86_Vector512); if (resultflags.HasInstructionSet(InstructionSet.X86_AVX2)) resultflags.AddInstructionSet(InstructionSet.X86_AVXVNNI); if (resultflags.HasInstructionSet(InstructionSet.X86_SSE42)) @@ -1051,6 +1065,7 @@ namespace Internal.JitInterface yield return new InstructionSetInfo("popcnt", "Popcnt", InstructionSet.X64_POPCNT, true); yield return new InstructionSetInfo("Vector128", "", InstructionSet.X64_Vector128, false); yield return new InstructionSetInfo("Vector256", "", InstructionSet.X64_Vector256, false); + yield return new InstructionSetInfo("Vector512", "", InstructionSet.X64_Vector512, false); yield return new InstructionSetInfo("avxvnni", "AvxVnni", InstructionSet.X64_AVXVNNI, true); yield return new InstructionSetInfo("movbe", "Movbe", InstructionSet.X64_MOVBE, true); yield return new InstructionSetInfo("serialize", "X86Serialize", InstructionSet.X64_X86Serialize, true); @@ -1083,6 +1098,7 @@ namespace Internal.JitInterface yield return new InstructionSetInfo("popcnt", "Popcnt", InstructionSet.X86_POPCNT, true); yield return new InstructionSetInfo("Vector128", "", InstructionSet.X86_Vector128, false); yield return new InstructionSetInfo("Vector256", "", InstructionSet.X86_Vector256, false); + yield return new InstructionSetInfo("Vector512", "", InstructionSet.X86_Vector512, false); yield return new InstructionSetInfo("avxvnni", "AvxVnni", InstructionSet.X86_AVXVNNI, true); yield return new InstructionSetInfo("movbe", "Movbe", InstructionSet.X86_MOVBE, true); yield return new InstructionSetInfo("serialize", "X86Serialize", InstructionSet.X86_X86Serialize, true); diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs b/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs index 6b0976724f0..3f9cf5b01d1 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs @@ -745,6 +745,7 @@ namespace Internal.JitInterface CORJIT_ALLOCMEM_FLG_RODATA_16BYTE_ALIGN = 0x00000002, // The read-only data will be 16-byte aligned CORJIT_ALLOCMEM_FLG_32BYTE_ALIGN = 0x00000004, // The code will be 32-byte aligned CORJIT_ALLOCMEM_FLG_RODATA_32BYTE_ALIGN = 0x00000008, // The read-only data will be 32-byte aligned + CORJIT_ALLOCMEM_FLG_RODATA_64BYTE_ALIGN = 0x00000008, // The read-only data will be 64-byte aligned } public enum CorJitFuncKind diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt index adb3c17f2bb..3841be35e52 100644 --- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt +++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt @@ -43,6 +43,7 @@ instructionset ,X86 ,Pclmulqdq , ,14 ,PCLMULQDQ,pclmul instructionset ,X86 ,Popcnt , ,15 ,POPCNT ,popcnt instructionset ,X86 , , , ,Vector128, instructionset ,X86 , , , ,Vector256, +instructionset ,X86 , , , ,Vector512, instructionset ,X86 ,AvxVnni , ,25 ,AVXVNNI ,avxvnni instructionset ,X86 ,Movbe , ,27 ,MOVBE ,movbe instructionset ,X86 ,X86Serialize , ,28 ,X86Serialize ,serialize @@ -85,6 +86,7 @@ instructionset64bit,X86 ,AVX512DQ_VL vectorinstructionset,X86 ,Vector128 vectorinstructionset,X86 ,Vector256 +vectorinstructionset,X86 ,Vector512 implication ,X86 ,SSE ,X86Base implication ,X86 ,SSE2 ,SSE @@ -103,6 +105,7 @@ implication ,X86 ,PCLMULQDQ ,SSE2 implication ,X86 ,POPCNT ,SSE42 implication ,X86 ,Vector128 ,SSE implication ,X86 ,Vector256 ,AVX +implication ,X86 ,Vector512 ,AVX512F implication ,X86 ,AVXVNNI ,AVX2 implication ,X86 ,MOVBE ,SSE42 implication ,X86 ,X86Serialize, X86Base diff --git a/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp b/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp index 074e1f2457a..c627a042d4f 100644 --- a/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp +++ b/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp @@ -1653,6 +1653,10 @@ void MyICJI::allocMem(AllocMemArgs* pArgs) size_t roDataAlignment = sizeof(void*); size_t roDataAlignedSize = static_cast(pArgs->roDataSize); + if ((pArgs->flag & CORJIT_ALLOCMEM_FLG_RODATA_64BYTE_ALIGN) != 0) + { + roDataAlignment = 64; + } if ((pArgs->flag & CORJIT_ALLOCMEM_FLG_RODATA_32BYTE_ALIGN) != 0) { roDataAlignment = 32; -- 2.34.1