summaryrefslogtreecommitdiff
path: root/src/vm/dllimportcallback.h
diff options
context:
space:
mode:
authorJonghyun Park <parjong@gmail.com>2017-03-16 13:05:30 +0900
committerJan Kotas <jkotas@microsoft.com>2017-03-15 21:05:30 -0700
commite55c985fb2c833b332581680f050bf7ebaa98f5f (patch)
tree213f9b705536084e2182a0217dca7bb838b97b6c /src/vm/dllimportcallback.h
parent9422f47c5de802d877c08f9f5118471b375239b1 (diff)
downloadcoreclr-e55c985fb2c833b332581680f050bf7ebaa98f5f.tar.gz
coreclr-e55c985fb2c833b332581680f050bf7ebaa98f5f.tar.bz2
coreclr-e55c985fb2c833b332581680f050bf7ebaa98f5f.zip
Reorder stack arguments on reverse P/Invoke (#10217)
Diffstat (limited to 'src/vm/dllimportcallback.h')
-rw-r--r--src/vm/dllimportcallback.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/vm/dllimportcallback.h b/src/vm/dllimportcallback.h
index c6f5788739..b50b917337 100644
--- a/src/vm/dllimportcallback.h
+++ b/src/vm/dllimportcallback.h
@@ -205,6 +205,16 @@ public:
Stub *CompileNExportThunk(LoaderHeap *pLoaderHeap, PInvokeStaticSigInfo* pSigInfo, MetaSig *pMetaSig, BOOL fNoStub);
#endif // _TARGET_X86_ && !FEATURE_STUBS_AS_IL
+#if defined(_TARGET_X86_) && defined(FEATURE_STUBS_AS_IL)
+ struct ArgumentRegisters
+ {
+ UINT32 Ecx;
+ UINT32 Edx;
+ };
+
+ VOID SetupArguments(char *pSrc, ArgumentRegisters *pArgRegs, char *pDst);
+#endif // _TARGET_X86_ && FEATURE_STUBS_AS_IL
+
private:
PCODE m_pILStub; // IL stub for marshaling
// On x86, NULL for no-marshal signatures
@@ -213,8 +223,7 @@ private:
#if defined(_TARGET_X86_)
UINT16 m_cbRetPop; // stack bytes popped by callee (for UpdateRegDisplay)
#if defined(FEATURE_STUBS_AS_IL)
- UINT32 m_ecxArgOffset;
- UINT32 m_edxArgOffset;
+ UINT32 m_cbStackArgSize; // stack bytes pushed for managed code
#else
Stub* m_pExecStub; // UMEntryThunk jumps directly here
UINT16 m_callConv; // unmanaged calling convention and flags (CorPinvokeMap)