diff options
author | Petr Bred <bredpetr@gmail.com> | 2017-06-29 10:24:40 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-06-29 10:24:40 +0300 |
commit | 38f63827df09e3695aa03606425dbab838c94068 (patch) | |
tree | 8bc269d8fa08bf52a61e92cd0557fcacadcf370b /src/Native/Runtime/arm | |
parent | b5218502cd1ea6b90e3d3f1c9793c3b2f3b18681 (diff) |
Add calling convention converter helpers asm stubs for arm (#4016)
Signed-off-by: Petr Bred <bredpetr@gmail.com>
Diffstat (limited to 'src/Native/Runtime/arm')
-rw-r--r-- | src/Native/Runtime/arm/CallingConventionConverterHelpers.S | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/Native/Runtime/arm/CallingConventionConverterHelpers.S b/src/Native/Runtime/arm/CallingConventionConverterHelpers.S index de818954b..0b2f046d0 100644 --- a/src/Native/Runtime/arm/CallingConventionConverterHelpers.S +++ b/src/Native/Runtime/arm/CallingConventionConverterHelpers.S @@ -5,3 +5,74 @@ #include <unixasmmacros.inc> // TODO: Implement Arm support +.syntax unified +.thumb + +#ifdef _DEBUG +.rodata +AssertMsg: .asciz "__FILE__:%s: %s is not implemented\n" +FileName: .asciz "CallingConventionConverterHelpers.S" +CallingConventionConverter_ReturnThunkName: .asciz "CallingConventionConverter_ReturnThunk" +__jmpstub__CallingConventionConverter_CommonCallingStubName: .asciz "__jmpstub__CallingConventionConverter_CommonCallingStub" +CallingConventionConverter_SpecifyCommonStubDataName: .asciz "CallingConventionConverter_SpecifyCommonStubData" +CallingConventionConverter_GetStubsName: .asciz "CallingConventionConverter_GetStubs" + +.text +.macro GEN_ASSERT_FUNC func + GEN_ASSERT AssertMsg, FileName, \func +.endm +#endif + +// +// void CallingConventionConverter_ReturnThunk() +// +LEAF_ENTRY CallingConventionConverter_ReturnThunk +#ifdef _DEBUG + GEN_ASSERT_FUNC CallingConventionConverter_ReturnThunkName +#endif +LEAF_END CallingConventionConverter_ReturnThunk + + +// +// __jmpstub__CallingConventionConverter_CommonCallingStub +// +// struct CallingConventionConverter_CommonCallingStub_PointerData +// { +// void *ManagedCallConverterThunk; +// void *UniversalThunk; +// } +// +// struct CommonCallingStubInputData +// { +// ULONG_PTR CallingConventionId; +// CallingConventionConverter_CommonCallingStub_PointerData *commonData; // Only the ManagedCallConverterThunk field is used +// // However, it is specified just like other platforms, so the behavior of the common +// // calling stub is easier to debug +// } +// +// sp-4 - Points at CommonCallingStubInputData +// +// +LEAF_ENTRY __jmpstub__CallingConventionConverter_CommonCallingStub +#ifdef _DEBUG + GEN_ASSERT_FUNC __jmpstub__CallingConventionConverter_CommonCallingStubName +#endif +LEAF_END __jmpstub__CallingConventionConverter_CommonCallingStub + +// +// void CallingConventionConverter_SpecifyCommonStubData(CallingConventionConverter_CommonCallingStub_PointerData *commonData); +// +LEAF_ENTRY CallingConventionConverter_SpecifyCommonStubData +#ifdef _DEBUG + GEN_ASSERT_FUNC CallingConventionConverter_SpecifyCommonStubDataName +#endif +LEAF_END CallingConventionConverter_SpecifyCommonStubData + +// +// void CallingConventionConverter_GetStubs(IntPtr *returnVoidStub, IntPtr *returnIntegerStub, IntPtr *commonCallingStub) +// +LEAF_ENTRY CallingConventionConverter_GetStubs, _TEXT +#ifdef _DEBUG + GEN_ASSERT_FUNC CallingConventionConverter_GetStubsName +#endif +LEAF_END CallingConventionConverter_GetStubs, _TEXT |