diff --git a/src/coreclr/inc/jiteeversionguid.h b/src/coreclr/inc/jiteeversionguid.h
index 9383fceebc29b2..77c4fb49ca8de1 100644
--- a/src/coreclr/inc/jiteeversionguid.h
+++ b/src/coreclr/inc/jiteeversionguid.h
@@ -43,12 +43,12 @@ typedef const GUID *LPCGUID;
#define GUID_DEFINED
#endif // !GUID_DEFINED
-constexpr GUID JITEEVersionIdentifier = { /* a116647a-3f80-4fd6-9c80-95156c7e9923 */
- 0xa116647a,
- 0x3f80,
- 0x4fd6,
- {0x9c, 0x80, 0x95, 0x15, 0x6c, 0x7e, 0x99, 0x23}
-};
+constexpr GUID JITEEVersionIdentifier = { /* 4463d6ac-dfcb-4ab0-a941-c53b56089b7c */
+ 0x4463d6ac,
+ 0xdfcb,
+ 0x4ab0,
+ {0xa9, 0x41, 0xc5, 0x3b, 0x56, 0x08, 0x9b, 0x7c}
+ };
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//
diff --git a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs
index de6ba3e2fc9d91..75de99fa17e563 100644
--- a/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs
+++ b/src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs
@@ -545,7 +545,7 @@ public void ExpandInstructionSetByImplication(TargetArchitecture architecture)
public static InstructionSet ConvertToImpliedInstructionSetForVectorInstructionSets(TargetArchitecture architecture, InstructionSet input)
{
- switch(architecture)
+ switch (architecture)
{
");
foreach (string architecture in _architectures)
@@ -554,7 +554,7 @@ public static InstructionSet ConvertToImpliedInstructionSetForVectorInstructionS
continue;
tr.Write($@" case TargetArchitecture.{architecture}:
- switch(input)
+ switch (input)
{{
");
foreach (var vectorInstructionSet in _architectureVectorInstructionSetJitNames[architecture])
@@ -635,7 +635,7 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe
do
{
oldflags = resultflags;
- switch(architecture)
+ switch (architecture)
{
");
foreach (string architecture in _architectures)
diff --git a/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h b/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h
index b9be6659ed773f..50e9720aefaa2a 100644
--- a/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h
+++ b/src/coreclr/tools/superpmi/superpmi-shared/lwmlist.h
@@ -102,6 +102,7 @@ LWM(GetLazyStringLiteralHelper, DWORDLONG, DWORD)
LWM(GetLocationOfThisType, DWORDLONG, Agnostic_CORINFO_LOOKUP_KIND)
LWM(IsIntrinsic, DWORDLONG, DWORD)
LWM(NotifyMethodInfoUsage, DWORDLONG, DWORD)
+LWM(NotifyInstructionSetUsage, DD, DWORD)
LWM(GetMethodAttribs, DWORDLONG, DWORD)
LWM(GetClassAssemblyName, DWORDLONG, DWORD)
LWM(GetMethodClass, DWORDLONG, DWORDLONG)
diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
index 2256711c703920..17de2d83eec18d 100644
--- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
+++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
@@ -791,6 +791,31 @@ bool MethodContext::repNotifyMethodInfoUsage(CORINFO_METHOD_HANDLE ftn)
return value != 0;
}
+void MethodContext::recNotifyInstructionSetUsage(CORINFO_InstructionSet isa, bool supported, bool result)
+{
+ if (NotifyInstructionSetUsage == nullptr)
+ NotifyInstructionSetUsage = new LightWeightMap
();
+
+ DD key{};
+ key.A = (DWORD)isa;
+ key.B = supported ? 1 : 0;
+ NotifyInstructionSetUsage->Add(key, result ? 1 : 0);
+ DEBUG_REC(dmpNotifyInstructionSetUsage(key, result ? 1 : 0));
+}
+void MethodContext::dmpNotifyInstructionSetUsage(DD key, DWORD value)
+{
+ printf("NotifyInstructionSetUsage key isa-%u, supported-%u, res-%u", key.A, key.B, value);
+}
+bool MethodContext::repNotifyInstructionSetUsage(CORINFO_InstructionSet isa, bool supported)
+{
+ DD key{};
+ key.A = (DWORD)isa;
+ key.B = supported ? 1 : 0;
+ DWORD value = LookupByKeyOrMiss(NotifyInstructionSetUsage, key, ": key %u-%u", key.A, key.B);
+ DEBUG_REP(dmpNotifyInstructionSetUsage(key, value));
+ return value != 0;
+}
+
void MethodContext::recGetMethodAttribs(CORINFO_METHOD_HANDLE methodHandle, DWORD attribs)
{
if (GetMethodAttribs == nullptr)
diff --git a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h
index b6997b94e6c251..8763439565410e 100644
--- a/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h
+++ b/src/coreclr/tools/superpmi/superpmi-shared/methodcontext.h
@@ -126,6 +126,10 @@ class MethodContext
void dmpNotifyMethodInfoUsage(DWORDLONG key, DWORD value);
bool repNotifyMethodInfoUsage(CORINFO_METHOD_HANDLE ftn);
+ void recNotifyInstructionSetUsage(CORINFO_InstructionSet instructionSet, bool supported, bool result);
+ void dmpNotifyInstructionSetUsage(DD key, DWORD supported);
+ bool repNotifyInstructionSetUsage(CORINFO_InstructionSet instructionSet, bool supported);
+
void recGetMethodAttribs(CORINFO_METHOD_HANDLE methodHandle, DWORD attribs);
void dmpGetMethodAttribs(DWORDLONG key, DWORD value);
DWORD repGetMethodAttribs(CORINFO_METHOD_HANDLE methodHandle);
@@ -1203,6 +1207,7 @@ enum mcPackets
Packet_GetSZArrayHelperEnumeratorClass = 226,
Packet_GetMethodInstantiationArgument = 227,
Packet_GetInstantiatedEntry = 228,
+ Packet_NotifyInstructionSetUsage = 229,
};
void SetDebugDumpVariables();
diff --git a/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp b/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp
index fdf27620abb211..ed693cdf1b2a9f 100644
--- a/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp
+++ b/src/coreclr/tools/superpmi/superpmi-shim-collector/icorjitinfo.cpp
@@ -36,6 +36,14 @@ bool interceptor_ICJI::notifyMethodInfoUsage(CORINFO_METHOD_HANDLE ftn)
return temp;
}
+bool interceptor_ICJI::notifyInstructionSetUsage(CORINFO_InstructionSet instructionSet, bool supported)
+{
+ mc->cr->AddCall("notifyInstructionSetUsage");
+ bool result = original_ICorJitInfo->notifyInstructionSetUsage(instructionSet, supported);
+ mc->recNotifyInstructionSetUsage(instructionSet, supported, result);
+ return result;
+}
+
// return flags (defined above, CORINFO_FLG_PUBLIC ...)
uint32_t interceptor_ICJI::getMethodAttribs(CORINFO_METHOD_HANDLE ftn /* IN */)
{
@@ -2024,11 +2032,6 @@ uint32_t interceptor_ICJI::getExpectedTargetArchitecture()
return result;
}
-bool interceptor_ICJI::notifyInstructionSetUsage(CORINFO_InstructionSet instructionSet, bool supported)
-{
- return original_ICorJitInfo->notifyInstructionSetUsage(instructionSet, supported);
-}
-
CORINFO_METHOD_HANDLE interceptor_ICJI::getSpecialCopyHelper(CORINFO_CLASS_HANDLE type)
{
mc->cr->AddCall("getSpecialCopyHelper");
diff --git a/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp b/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp
index d190ffe727303e..544b8f5d169bd8 100644
--- a/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp
+++ b/src/coreclr/tools/superpmi/superpmi/icorjitinfo.cpp
@@ -1529,7 +1529,7 @@ bool MyICJI::convertPInvokeCalliToCall(CORINFO_RESOLVED_TOKEN* pResolvedToken, b
bool MyICJI::notifyInstructionSetUsage(CORINFO_InstructionSet instructionSet, bool supported)
{
jitInstance->mc->cr->AddCall("notifyInstructionSetUsage");
- return supported;
+ return jitInstance->mc->repNotifyInstructionSetUsage(instructionSet, supported);
}
void MyICJI::updateEntryPointForTailCall(CORINFO_CONST_LOOKUP* entryPoint)