Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaizur Rahman <shrah@microsoft.com>2017-04-19 03:44:22 +0300
committerFaizur Rahman <shrah@microsoft.com>2017-04-19 03:44:22 +0300
commit742860cc1d1fa9ded49b29495fd370c44f15707e (patch)
tree2aabf164ef4f971af19c9c3d598be57bbacab37f /src/Native/Runtime/amd64
parentc7d29fd9d840e42c538519bc85ab02116f9d5587 (diff)
Unify delegate marshalling runtime infrastructure between CoreRT and .NET Native
This change unifies the runtime delegate marshalling infrastructure between CoreRT and .NET Native by removing duplicate codes and moving shared helpers to PInvokeMarshal in CoreLib. I got rid of the InteropThunskHelpers from Interop.Native directory and instead used the ones already ported to CoreRT. With this unification the delegate marshalling memory leak issue(which was caused by not having a cache) should be gone. [tfs-changeset: 1654801]
Diffstat (limited to 'src/Native/Runtime/amd64')
-rw-r--r--src/Native/Runtime/amd64/InteropThunksHelpers.S14
-rw-r--r--src/Native/Runtime/amd64/InteropThunksHelpers.asm20
2 files changed, 17 insertions, 17 deletions
diff --git a/src/Native/Runtime/amd64/InteropThunksHelpers.S b/src/Native/Runtime/amd64/InteropThunksHelpers.S
index 136484dd1..47011c295 100644
--- a/src/Native/Runtime/amd64/InteropThunksHelpers.S
+++ b/src/Native/Runtime/amd64/InteropThunksHelpers.S
@@ -7,7 +7,7 @@
#include <AsmOffsets.inc> // generated by the build from AsmOffsets.cpp
#define POINTER_SIZE 8
-LEAF_ENTRY RhpCommonStub, _TEXT
+LEAF_ENTRY RhCommonStub, _TEXT
PUSH_ARGUMENT_REGISTERS
push_register r10
@@ -28,19 +28,19 @@ LEAF_ENTRY RhpCommonStub, _TEXT
mov rax, [r10 + POINTER_SIZE]
jmp rax
-LEAF_END RhpCommonStub, _TEXT
+LEAF_END RhCommonStub, _TEXT
-LEAF_ENTRY RhpGetCommonStubAddress, _TEXT
- lea rax, [rip + C_FUNC(RhpCommonStub)]
+LEAF_ENTRY RhGetCommonStubAddress, _TEXT
+ lea rax, [rip + C_FUNC(RhCommonStub)]
ret
-LEAF_END RhpGetCommonStubAddress, _TEXT
+LEAF_END RhGetCommonStubAddress, _TEXT
-LEAF_ENTRY RhpGetCurrentThunkContext, _TEXT
+LEAF_ENTRY RhGetCurrentThunkContext, _TEXT
INLINE_GET_TLS_VAR tls_thunkData
mov rax, qword ptr [rax]
ret
-LEAF_END RhpGetCurrentThunkContext, _TEXT
+LEAF_END RhGetCurrentThunkContext, _TEXT
diff --git a/src/Native/Runtime/amd64/InteropThunksHelpers.asm b/src/Native/Runtime/amd64/InteropThunksHelpers.asm
index fa2ad93fc..aa0520dcb 100644
--- a/src/Native/Runtime/amd64/InteropThunksHelpers.asm
+++ b/src/Native/Runtime/amd64/InteropThunksHelpers.asm
@@ -41,9 +41,9 @@ EXTRN _tls_index:DWORD
;;;;;;;;;;;;;;;;;;;;;;; Interop Thunks Helpers ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
-;; RhpCommonStub
+;; RhCommonStub
;;
-LEAF_ENTRY RhpCommonStub, _TEXT
+LEAF_ENTRY RhCommonStub, _TEXT
;; There are arbitrary callers passing arguments with arbitrary signatures.
;; Custom calling convention:
;; r10: pointer to the current thunk's data block (data contains 2 pointer values: context + target pointers)
@@ -70,29 +70,29 @@ LEAF_ENTRY RhpCommonStub, _TEXT
;; jump to the target
mov rax, [r10 + POINTER_SIZE]
TAILJMP_RAX
-LEAF_END RhpCommonStub, _TEXT
+LEAF_END RhCommonStub, _TEXT
;;
-;; IntPtr RhpGetCommonStubAddress()
+;; IntPtr RhGetCommonStubAddress()
;;
-LEAF_ENTRY RhpGetCommonStubAddress, _TEXT
- lea rax, [RhpCommonStub]
+LEAF_ENTRY RhGetCommonStubAddress, _TEXT
+ lea rax, [RhCommonStub]
ret
-LEAF_END RhpGetCommonStubAddress, _TEXT
+LEAF_END RhGetCommonStubAddress, _TEXT
;;
-;; IntPtr RhpGetCurrentThunkContext()
+;; IntPtr RhGetCurrentThunkContext()
;;
-LEAF_ENTRY RhpGetCurrentThunkContext, _TEXT
+LEAF_ENTRY RhGetCurrentThunkContext, _TEXT
mov r10d, [_tls_index]
mov r11, gs:[_tls_array]
mov r10, [r11 + r10 * POINTER_SIZE]
mov r8d, SECTIONREL ThunkParamSlot
mov rax, [r10 + r8] ;; rax <- ThunkParamSlot
ret
-LEAF_END RhpGetCurrentThunkContext, _TEXT
+LEAF_END RhGetCurrentThunkContext, _TEXT
end