Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable non-blittable struct returns on UnmanagedCallersOnly #45625

Merged
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
0302e18
Allow non-primitive struct returns to not require a stub. Fixes #35928.
jkoritzinsky Dec 3, 2020
ee5264f
Support propagating the UnmanagedCallersOnly calling convention to th…
jkoritzinsky Dec 4, 2020
96e5e0f
Support passing through the calling convention for UnmanagedCallersOn…
jkoritzinsky Dec 5, 2020
1b3ed1a
Fix clang errors.
jkoritzinsky Dec 5, 2020
79b5916
Fix stack calculation.
jkoritzinsky Dec 7, 2020
2723dc6
Fix usings
jkoritzinsky Dec 7, 2020
d0e811b
Clean up jitinterface.
jkoritzinsky Dec 7, 2020
5d83953
Remove invalid assert.
jkoritzinsky Dec 7, 2020
6fe0f4e
Fix up stdcall name mangling lookup.
jkoritzinsky Dec 7, 2020
2e3fecc
Fix flag condition.
jkoritzinsky Dec 8, 2020
7fa08ca
Merge branch 'master' of github.com:dotnet/runtime into unmanaged-cal…
jkoritzinsky Dec 8, 2020
e2a9d40
Use the register var type when copying from the register to the stack.
jkoritzinsky Dec 8, 2020
74a69e5
Change flag check for readability.
jkoritzinsky Dec 8, 2020
c12cc51
Rename variables to remove shadowing.
jkoritzinsky Dec 8, 2020
6345e3e
Fix formatting.
jkoritzinsky Dec 8, 2020
f08c166
Create new getEntryPointCallConv method on the EE-JIT interface to ha…
jkoritzinsky Dec 9, 2020
e598176
Remove unreachable code.
jkoritzinsky Dec 9, 2020
8ea0869
Remove now unused getUnmanagedCallConv jitinterface method (replaced …
jkoritzinsky Dec 9, 2020
6fb1e8c
Merge branch 'master' of github.com:dotnet/runtime into unmanaged-cal…
jkoritzinsky Dec 9, 2020
bcf270d
Fix formatting.
jkoritzinsky Dec 9, 2020
d2e016c
Rename getEntryPointCallConv and only call it with a method when it's…
jkoritzinsky Dec 10, 2020
b809ff8
Pass SuppressGCTransition through the getUnmanagedCallConv JIT-EE int…
jkoritzinsky Dec 11, 2020
ddb885f
Refactor callconv handling so we can handle reverse P/Invokes with th…
jkoritzinsky Dec 11, 2020
0b98994
Clean up whitespace.
jkoritzinsky Dec 11, 2020
3f0c7f9
Pass MethodIL as the scope for the signature to enable propagating do…
jkoritzinsky Dec 11, 2020
af41c1b
Remove usages of CORINFO_CALLCONV_FOO where FOO is an unmanaged callc…
jkoritzinsky Dec 12, 2020
2db1966
SuppressGC cleanup.
jkoritzinsky Dec 12, 2020
477ae3c
Rename superpmi struct
jkoritzinsky Dec 12, 2020
be82f96
Add default condition to make clang happy.
jkoritzinsky Dec 12, 2020
dd0c692
change enums to make clang happy.
jkoritzinsky Dec 12, 2020
8ba8f9b
Remove CORINFO_CALLCONV_C and family from interpreter.
jkoritzinsky Dec 12, 2020
31eb30a
Fix up handling of managed function pointers and remove invalid assert.
jkoritzinsky Dec 14, 2020
1be214b
Continue to use sigflag for suppressgc workaround.
jkoritzinsky Dec 14, 2020
1440fad
Clean up comment wording.
jkoritzinsky Dec 14, 2020
ed5b32e
Remove more MethodIL passing we don't need any more
jkoritzinsky Dec 14, 2020
3d5c8e2
Update src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
jkoritzinsky Dec 14, 2020
05e4efe
Merge branch 'master' of github.com:dotnet/runtime into unmanaged-cal…
jkoritzinsky Dec 14, 2020
dead19d
Fix SigTypeContext creation.
jkoritzinsky Dec 14, 2020
6465ce0
Merge branch 'master' of github.com:dotnet/runtime into unmanaged-cal…
jkoritzinsky Dec 14, 2020
6a4cbeb
Pass context by ptr.
jkoritzinsky Dec 14, 2020
6b870e6
Fix formatting.
jkoritzinsky Dec 14, 2020
792d56f
Clear the Reverse P/Invoke flag when compiling inlinees. It's only ne…
jkoritzinsky Dec 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/coreclr/ToolBox/superpmi/superpmi-shared/lwmlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ LWM(GetTypeForPrimitiveValueClass, DWORDLONG, DWORD)
LWM(GetTypeForPrimitiveNumericClass, DWORDLONG, DWORD)
LWM(GetUnboxedEntry, DWORDLONG, DLD);
LWM(GetUnBoxHelper, DWORDLONG, DWORD)
LWM(GetUnmanagedCallConv, DWORDLONG, DWORD)
LWM(GetVarArgsHandle, GetVarArgsHandleValue, DLDL)
LWM(GetVars, DWORDLONG, Agnostic_GetVars)
DENSELWM(HandleException, DWORD)
Expand All @@ -149,12 +148,13 @@ LWM(IsValidToken, DLD, DWORD)
LWM(IsValueClass, DWORDLONG, DWORD)
LWM(MergeClasses, DLDL, DWORDLONG)
LWM(IsMoreSpecificType, DLDL, DWORD)
LWM(PInvokeMarshalingRequired, PInvokeMarshalingRequiredValue, DWORD)
LWM(PInvokeMarshalingRequired, MethodOrSigInfoValue, DWORD)
LWM(ResolveToken, Agnostic_CORINFO_RESOLVED_TOKENin, ResolveTokenValue)
LWM(ResolveVirtualMethod, Agnostic_ResolveVirtualMethodKey, Agnostic_ResolveVirtualMethodResult)
LWM(TryResolveToken, Agnostic_CORINFO_RESOLVED_TOKENin, TryResolveTokenValue)
LWM(SatisfiesClassConstraints, DWORDLONG, DWORD)
LWM(SatisfiesMethodConstraints, DLDL, DWORD)
LWM(GetUnmanagedCallConv, MethodOrSigInfoValue, DD)


#undef LWM
Expand Down
101 changes: 63 additions & 38 deletions src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1624,35 +1624,6 @@ bool MethodContext::repIsIntrinsicType(CORINFO_CLASS_HANDLE cls)
return result;
}

void MethodContext::recGetUnmanagedCallConv(CORINFO_METHOD_HANDLE method, CorInfoUnmanagedCallConv result)
{
if (GetUnmanagedCallConv == nullptr)
GetUnmanagedCallConv = new LightWeightMap<DWORDLONG, DWORD>();

GetUnmanagedCallConv->Add((DWORDLONG)method, result);
DEBUG_REC(dmpGetUnmanagedCallConv((DWORDLONG)method, (DWORD)result));
}
void MethodContext::dmpGetUnmanagedCallConv(DWORDLONG key, DWORD result)
{
printf("GetUnmanagedCallConv key ftn-%016llX, value res-%u", key, result);
}
CorInfoUnmanagedCallConv MethodContext::repGetUnmanagedCallConv(CORINFO_METHOD_HANDLE method)
{
if ((GetUnmanagedCallConv == nullptr) || (GetUnmanagedCallConv->GetIndex((DWORDLONG)method) == -1))
{
#ifdef sparseMC
LogDebug("Sparse - repGetUnmanagedCallConv returning CORINFO_UNMANAGED_CALLCONV_STDCALL");
return CORINFO_UNMANAGED_CALLCONV_STDCALL;
#else
LogException(EXCEPTIONCODE_MC, "Found a null GetUnmanagedCallConv. Probably missing a fatTrigger for %016llX.",
(DWORDLONG)method);
#endif
}
CorInfoUnmanagedCallConv result = (CorInfoUnmanagedCallConv)GetUnmanagedCallConv->Get((DWORDLONG)method);
DEBUG_REP(dmpGetUnmanagedCallConv((DWORDLONG)method, (DWORD)result));
return result;
}

void MethodContext::recAsCorInfoType(CORINFO_CLASS_HANDLE cls, CorInfoType result)
{
if (AsCorInfoType == nullptr)
Expand Down Expand Up @@ -3086,7 +3057,7 @@ void MethodContext::recResolveVirtualMethod(CORINFO_DEVIRTUALIZATION_INFO * info
key.context = (DWORDLONG)info->context;
Agnostic_ResolveVirtualMethodResult result;
result.returnValue = returnValue;
result.devirtualizedMethod = (DWORDLONG)info->devirtualizedMethod;
result.devirtualizedMethod = (DWORDLONG)info->devirtualizedMethod;
result.requiresInstMethodTableArg = info->requiresInstMethodTableArg;
result.exactContext = (DWORDLONG)info->exactContext;
ResolveVirtualMethod->Add(key, result);
Expand Down Expand Up @@ -3771,10 +3742,10 @@ void MethodContext::recPInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method,
bool result)
{
if (PInvokeMarshalingRequired == nullptr)
PInvokeMarshalingRequired = new LightWeightMap<PInvokeMarshalingRequiredValue, DWORD>();
PInvokeMarshalingRequired = new LightWeightMap<MethodOrSigInfoValue, DWORD>();

PInvokeMarshalingRequiredValue key;
ZeroMemory(&key, sizeof(PInvokeMarshalingRequiredValue)); // We use the input structs as a key and use memcmp to
MethodOrSigInfoValue key;
ZeroMemory(&key, sizeof(MethodOrSigInfoValue)); // We use the input structs as a key and use memcmp to
// compare.. so we need to zero out padding too

key.method = (DWORDLONG)method;
Expand All @@ -3785,7 +3756,7 @@ void MethodContext::recPInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method,
PInvokeMarshalingRequired->Add(key, (DWORD)result);
DEBUG_REC(dmpPInvokeMarshalingRequired(key, (DWORD)result));
}
void MethodContext::dmpPInvokeMarshalingRequired(const PInvokeMarshalingRequiredValue& key, DWORD value)
void MethodContext::dmpPInvokeMarshalingRequired(const MethodOrSigInfoValue& key, DWORD value)
{
printf("PInvokeMarshalingRequired key mth-%016llX scp-%016llX sig-%u, value res-%u", key.method, key.scope,
key.pSig_Index, value);
Expand All @@ -3796,9 +3767,9 @@ bool MethodContext::repPInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method, C
if (PInvokeMarshalingRequired == nullptr) // so when we replay checked on free, we throw from lwm
return TRUE; // TODO-Cleanup: hackish...

PInvokeMarshalingRequiredValue key;
ZeroMemory(&key, sizeof(PInvokeMarshalingRequiredValue)); // We use the input structs as a key and use memcmp to
// compare.. so we need to zero out padding too
MethodOrSigInfoValue key;
ZeroMemory(&key, sizeof(MethodOrSigInfoValue)); // We use the input structs as a key and use memcmp to
// compare.. so we need to zero out padding too

key.method = (DWORDLONG)method;
key.pSig_Index = (DWORD)PInvokeMarshalingRequired->Contains((unsigned char*)callSiteSig->pSig, callSiteSig->cbSig);
Expand All @@ -3810,6 +3781,60 @@ bool MethodContext::repPInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method, C
return value;
}

void MethodContext::recGetUnmanagedCallConv(CORINFO_METHOD_HANDLE method,
CORINFO_SIG_INFO* callSiteSig,
CorInfoCallConvExtension result,
bool suppressGCTransitionResult)
{
if (GetUnmanagedCallConv == nullptr)
GetUnmanagedCallConv = new LightWeightMap<MethodOrSigInfoValue, DD>();

MethodOrSigInfoValue key;
ZeroMemory(&key, sizeof(MethodOrSigInfoValue)); // We use the input structs as a key and use memcmp to
// compare.. so we need to zero out padding too

key.method = (DWORDLONG)method;
key.pSig_Index = (DWORD)PInvokeMarshalingRequired->AddBuffer((unsigned char*)callSiteSig->pSig, callSiteSig->cbSig);
key.cbSig = (DWORD)callSiteSig->cbSig;
key.scope = (DWORDLONG)callSiteSig->scope;

GetUnmanagedCallConv->Add(key, { (DWORD)result, (DWORD)suppressGCTransitionResult });
DEBUG_REC(dmpGetUnmanagedCallConv(key, { (DWORD)result, (DWORD)suppressGCTransitionResult }));
}
void MethodContext::dmpGetUnmanagedCallConv(const MethodOrSigInfoValue& key, DD value)
{
printf("GetUnmanagedCallConv key mth-%016llX scp-%016llX sig-%u, value res-%u,%u", key.method, key.scope,
key.pSig_Index, value.A, value.B);
}
// Note the jit interface implementation seems to only care about scope and pSig from callSiteSig
CorInfoCallConvExtension MethodContext::repGetUnmanagedCallConv(CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig, bool* pSuppressGCTransition)
{
if (GetUnmanagedCallConv == nullptr)
{
#ifdef sparseMC
LogDebug("Sparse - repGetUnmanagedCallConv returning CorInfoCallConvExtension::Managed");
return CorInfoCallConvExtension::Managed;
#else
LogException(EXCEPTIONCODE_MC, "Found a null GetUnmGetUnmanagedCallConvanagedCallConv. Probably missing a fatTrigger for %016llX.",
(DWORDLONG)method);
#endif
}

MethodOrSigInfoValue key;
ZeroMemory(&key, sizeof(MethodOrSigInfoValue)); // We use the input structs as a key and use memcmp to
// compare.. so we need to zero out padding too

key.method = (DWORDLONG)method;
key.pSig_Index = (DWORD)GetUnmanagedCallConv->Contains((unsigned char*)callSiteSig->pSig, callSiteSig->cbSig);
key.cbSig = (DWORD)callSiteSig->cbSig;
key.scope = (DWORDLONG)callSiteSig->scope;

DD value = GetUnmanagedCallConv->Get(key);
DEBUG_REP(dmpGetUnmanagedCallConv(key, value));
*pSuppressGCTransition = value.B != 0;
return (CorInfoCallConvExtension)value.A;
}

void MethodContext::recFindSig(CORINFO_MODULE_HANDLE module,
unsigned sigTOK,
CORINFO_CONTEXT_HANDLE context,
Expand Down Expand Up @@ -5290,7 +5315,7 @@ void MethodContext::recGetLikelyClass(CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLAS
}
void MethodContext::dmpGetLikelyClass(const Agnostic_GetLikelyClass& key, const Agnostic_GetLikelyClassResult& value)
{
printf("GetLikelyClass key ftn-%016llX base-%016llX il-%u, class-%016llX likelihood-%u numberOfClasses-%u",
printf("GetLikelyClass key ftn-%016llX base-%016llX il-%u, class-%016llX likelihood-%u numberOfClasses-%u",
key.ftnHnd, key.baseHnd, key.ilOffset, value.classHnd, value.likelihood, value.numberOfClasses);
}
CORINFO_CLASS_HANDLE MethodContext::repGetLikelyClass(CORINFO_METHOD_HANDLE ftnHnd, CORINFO_CLASS_HANDLE baseHnd, UINT32 ilOffset, UINT32* pLikelihood, UINT32* pNumberOfClasses)
Expand Down
12 changes: 6 additions & 6 deletions src/coreclr/ToolBox/superpmi/superpmi-shared/methodcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class MethodContext
DWORD sigTOK;
DWORDLONG context;
};
struct PInvokeMarshalingRequiredValue
struct MethodOrSigInfoValue
{
DWORDLONG method;
DWORD pSig_Index;
Expand Down Expand Up @@ -730,10 +730,6 @@ class MethodContext
void dmpGetIntrinsicID(DWORDLONG key, DD value);
CorInfoIntrinsics repGetIntrinsicID(CORINFO_METHOD_HANDLE method, bool* pMustExpand);

void recGetUnmanagedCallConv(CORINFO_METHOD_HANDLE method, CorInfoUnmanagedCallConv result);
void dmpGetUnmanagedCallConv(DWORDLONG key, DWORD result);
CorInfoUnmanagedCallConv repGetUnmanagedCallConv(CORINFO_METHOD_HANDLE method);

void recAsCorInfoType(CORINFO_CLASS_HANDLE cls, CorInfoType result);
void dmpAsCorInfoType(DWORDLONG key, DWORD value);
CorInfoType repAsCorInfoType(CORINFO_CLASS_HANDLE cls);
Expand Down Expand Up @@ -1003,9 +999,13 @@ class MethodContext
CORINFO_CLASS_HANDLE repEmbedClassHandle(CORINFO_CLASS_HANDLE handle, void** ppIndirection);

void recPInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig, bool result);
void dmpPInvokeMarshalingRequired(const PInvokeMarshalingRequiredValue& key, DWORD value);
void dmpPInvokeMarshalingRequired(const MethodOrSigInfoValue& key, DWORD value);
bool repPInvokeMarshalingRequired(CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig);

void recGetUnmanagedCallConv(CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig, CorInfoCallConvExtension result, bool suppressGCTransitionResult);
void dmpGetUnmanagedCallConv(const MethodOrSigInfoValue& key, DD value);
CorInfoCallConvExtension repGetUnmanagedCallConv(CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig, bool* pSuppressGCTransition);

void recFindSig(CORINFO_MODULE_HANDLE module,
unsigned sigTOK,
CORINFO_CONTEXT_HANDLE context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,15 @@ bool interceptor_ICJI::isIntrinsicType(CORINFO_CLASS_HANDLE classHnd)
return temp;
}

// return the unmanaged calling convention for a PInvoke
CorInfoUnmanagedCallConv interceptor_ICJI::getUnmanagedCallConv(CORINFO_METHOD_HANDLE method)
// return the entry point calling convention for any of the following
// - a P/Invoke
// - a method marked with UnmanagedCallersOnly
// - a function pointer with the CORINFO_CALLCONV_UNMANAGED calling convention.
CorInfoCallConvExtension interceptor_ICJI::getUnmanagedCallConv(CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig, bool* pSuppressGCTransition)
{
mc->cr->AddCall("getUnmanagedCallConv");
CorInfoUnmanagedCallConv temp = original_ICorJitInfo->getUnmanagedCallConv(method);
mc->recGetUnmanagedCallConv(method, temp);
CorInfoCallConvExtension temp = original_ICorJitInfo->getUnmanagedCallConv(method, callSiteSig, pSuppressGCTransition);
mc->recGetUnmanagedCallConv(method, callSiteSig, temp, *pSuppressGCTransition);
return temp;
}

Expand Down Expand Up @@ -2046,7 +2049,7 @@ HRESULT interceptor_ICJI::getMethodBlockCounts(CORINFO_METHOD_HANDLE ftnHnd,

// Get the likely implementing class for a virtual call or interface call made by ftnHnd
// at the indicated IL offset. baseHnd is the interface class or base class for the method
// being called.
// being called.
CORINFO_CLASS_HANDLE interceptor_ICJI::getLikelyClass(CORINFO_METHOD_HANDLE ftnHnd,
CORINFO_CLASS_HANDLE baseHnd,
UINT32 ilOffset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,13 @@ bool interceptor_ICJI::isIntrinsicType(
return original_ICorJitInfo->isIntrinsicType(classHnd);
}

CorInfoUnmanagedCallConv interceptor_ICJI::getUnmanagedCallConv(
CORINFO_METHOD_HANDLE method)
CorInfoCallConvExtension interceptor_ICJI::getUnmanagedCallConv(
CORINFO_METHOD_HANDLE method,
CORINFO_SIG_INFO* callSiteSig,
bool* pSuppressGCTransition)
{
mcs->AddCall("getUnmanagedCallConv");
return original_ICorJitInfo->getUnmanagedCallConv(method);
return original_ICorJitInfo->getUnmanagedCallConv(method, callSiteSig, pSuppressGCTransition);
}

bool interceptor_ICJI::pInvokeMarshalingRequired(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ bool interceptor_ICJI::isIntrinsicType(
return original_ICorJitInfo->isIntrinsicType(classHnd);
}

CorInfoUnmanagedCallConv interceptor_ICJI::getUnmanagedCallConv(
CORINFO_METHOD_HANDLE method)
CorInfoCallConvExtension interceptor_ICJI::getUnmanagedCallConv(
CORINFO_METHOD_HANDLE method,
CORINFO_SIG_INFO* callSiteSig,
bool* pSuppressGCTransition)
{
return original_ICorJitInfo->getUnmanagedCallConv(method);
return original_ICorJitInfo->getUnmanagedCallConv(method, callSiteSig, pSuppressGCTransition);
}

bool interceptor_ICJI::pInvokeMarshalingRequired(
Expand Down
11 changes: 7 additions & 4 deletions src/coreclr/ToolBox/superpmi/superpmi/icorjitinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,14 @@ bool MyICJI::isIntrinsicType(CORINFO_CLASS_HANDLE classHnd)
return jitInstance->mc->repIsIntrinsicType(classHnd) ? true : false;
}

// return the unmanaged calling convention for a PInvoke
CorInfoUnmanagedCallConv MyICJI::getUnmanagedCallConv(CORINFO_METHOD_HANDLE method)
// return the entry point calling convention for any of the following
// - a P/Invoke
// - a method marked with UnmanagedCallersOnly
// - a function pointer with the CORINFO_CALLCONV_UNMANAGED calling convention.
CorInfoCallConvExtension MyICJI::getUnmanagedCallConv(CORINFO_METHOD_HANDLE method, CORINFO_SIG_INFO* callSiteSig, bool* pSuppressGCTransition)
{
jitInstance->mc->cr->AddCall("getUnmanagedCallConv");
return jitInstance->mc->repGetUnmanagedCallConv(method);
return jitInstance->mc->repGetUnmanagedCallConv(method, callSiteSig, pSuppressGCTransition);
}

// return if any marshaling is required for PInvoke methods. Note that
Expand Down Expand Up @@ -1803,7 +1806,7 @@ HRESULT MyICJI::getMethodBlockCounts(CORINFO_METHOD_HANDLE ftnHnd,

// Get the likely implementing class for a virtual call or interface call made by ftnHnd
// at the indicated IL offset. baseHnd is the interface class or base class for the method
// being called.
// being called.
CORINFO_CLASS_HANDLE MyICJI::getLikelyClass(CORINFO_METHOD_HANDLE ftnHnd,
CORINFO_CLASS_HANDLE baseHnd,
UINT32 ilOffset,
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/debug/daccess/nidump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7350,7 +7350,6 @@ static NativeImageDumper::EnumMnemonics g_NDirectFlags[] =
NDF_ENTRY(kStdCall),
NDF_ENTRY(kThisCall),
NDF_ENTRY(kIsQCall),
NDF_ENTRY(kStdCallWithRetBuf),
#undef NDF_ENTRY
};
NativeImageDumper::EnumMnemonics NativeImageDumper::s_IMDFlags[] =
Expand Down
26 changes: 11 additions & 15 deletions src/coreclr/inc/corhdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -954,11 +954,21 @@ typedef enum CorSerializationType
// Calling convention flags.
//

typedef enum CorUnmanagedCallingConvention
{
IMAGE_CEE_UNMANAGED_CALLCONV_C = 0x1,
IMAGE_CEE_UNMANAGED_CALLCONV_STDCALL = 0x2,
IMAGE_CEE_UNMANAGED_CALLCONV_THISCALL = 0x3,
IMAGE_CEE_UNMANAGED_CALLCONV_FASTCALL = 0x4,
} CorUnmanagedCallingConvention;

typedef enum CorCallingConvention
{
IMAGE_CEE_CS_CALLCONV_DEFAULT = 0x0,

IMAGE_CEE_CS_CALLCONV_C = IMAGE_CEE_UNMANAGED_CALLCONV_C,
IMAGE_CEE_CS_CALLCONV_STDCALL = IMAGE_CEE_UNMANAGED_CALLCONV_STDCALL,
IMAGE_CEE_CS_CALLCONV_THISCALL = IMAGE_CEE_UNMANAGED_CALLCONV_THISCALL,
IMAGE_CEE_CS_CALLCONV_FASTCALL = IMAGE_CEE_UNMANAGED_CALLCONV_FASTCALL,
IMAGE_CEE_CS_CALLCONV_VARARG = 0x5,
IMAGE_CEE_CS_CALLCONV_FIELD = 0x6,
IMAGE_CEE_CS_CALLCONV_LOCAL_SIG = 0x7,
Expand All @@ -979,20 +989,6 @@ typedef enum CorCallingConvention

#define IMAGE_CEE_CS_CALLCONV_INSTANTIATION IMAGE_CEE_CS_CALLCONV_GENERICINST

typedef enum CorUnmanagedCallingConvention
{
IMAGE_CEE_UNMANAGED_CALLCONV_C = 0x1,
IMAGE_CEE_UNMANAGED_CALLCONV_STDCALL = 0x2,
IMAGE_CEE_UNMANAGED_CALLCONV_THISCALL = 0x3,
IMAGE_CEE_UNMANAGED_CALLCONV_FASTCALL = 0x4,

IMAGE_CEE_CS_CALLCONV_C = IMAGE_CEE_UNMANAGED_CALLCONV_C,
IMAGE_CEE_CS_CALLCONV_STDCALL = IMAGE_CEE_UNMANAGED_CALLCONV_STDCALL,
IMAGE_CEE_CS_CALLCONV_THISCALL = IMAGE_CEE_UNMANAGED_CALLCONV_THISCALL,
IMAGE_CEE_CS_CALLCONV_FASTCALL = IMAGE_CEE_UNMANAGED_CALLCONV_FASTCALL,

} CorUnmanagedCallingConvention;


typedef enum CorArgType
{
Expand Down
Loading