diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2018-05-14 23:46:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-14 23:46:00 +0300 |
commit | 51e510c1053015a1813a4f44d33d75b7218014d1 (patch) | |
tree | bd59af61be35df88d1ccca9c138bff761fc4b5c9 /src/Native | |
parent | 75ad39ea723f831e2e756708891c6a87b21ca26f (diff) |
Start building System.Private.TypeLoader.Native (#5805)
And remove workaround that was trying to avoid dependency on `ConstrainedCallSupport_GetStubs`.
Diffstat (limited to 'src/Native')
6 files changed, 92 insertions, 0 deletions
diff --git a/src/Native/Bootstrap/main.cpp b/src/Native/Bootstrap/main.cpp index 52a2a576a..f327d28c6 100644 --- a/src/Native/Bootstrap/main.cpp +++ b/src/Native/Bootstrap/main.cpp @@ -245,6 +245,10 @@ extern "C" void RhpUniversalTransition_DebugStepTailCall() { throw "RhpUniversalTransition_DebugStepTailCall"; } +extern "C" void ConstrainedCallSupport_GetStubs() +{ + throw "ConstrainedCallSupport_GetStubs"; +} extern "C" void* RtRHeaderWrapper(); #endif // CPPCODEGEN diff --git a/src/Native/CMakeLists.txt b/src/Native/CMakeLists.txt index 2aad804ff..2da913649 100644 --- a/src/Native/CMakeLists.txt +++ b/src/Native/CMakeLists.txt @@ -228,6 +228,8 @@ if(NOT WIN32) add_subdirectory(System.Private.CoreLib.Native) endif(NOT WIN32) +add_subdirectory(System.Private.TypeLoader.Native) + if(OBJWRITER_BUILD) add_subdirectory(ObjWriter/llvmCap) endif() diff --git a/src/Native/System.Private.TypeLoader.Native/CMakeLists.txt b/src/Native/System.Private.TypeLoader.Native/CMakeLists.txt new file mode 100644 index 000000000..d1827372f --- /dev/null +++ b/src/Native/System.Private.TypeLoader.Native/CMakeLists.txt @@ -0,0 +1,45 @@ +if(WIN32) + set(ASM_SUFFIX asm) + + if(CLR_CMAKE_PLATFORM_ARCH_AMD64) + set(ARCH_SOURCES_DIR amd64) + elseif(CLR_CMAKE_PLATFORM_ARCH_I386) + set(ARCH_SOURCES_DIR i386) + endif() + +else() + + set(ASM_SUFFIX S) + + if(CLR_CMAKE_PLATFORM_ARCH_AMD64) + set(ARCH_SOURCES_DIR amd64) + elseif(CLR_CMAKE_PLATFORM_ARCH_ARM64) + set(ARCH_SOURCES_DIR arm64) + elseif(CLR_CMAKE_PLATFORM_ARCH_ARM) + set(ARCH_SOURCES_DIR arm) + elseif(CLR_CMAKE_PLATFORM_ARCH_I386) + set(ARCH_SOURCES_DIR i386) + elseif(CLR_CMAKE_PLATFORM_ARCH_WASM) + set(ARCH_SOURCES_DIR wasm) + endif() + +endif() + +set(RUNTIME_SOURCES_ARCH_ASM + ${ARCH_SOURCES_DIR}/ConstrainedCallSupportHelpers.${ASM_SUFFIX} + ${ARCH_SOURCES_DIR}/MethodEntrypointStubs.${ASM_SUFFIX} + ${ARCH_SOURCES_DIR}/VTableResolver.${ASM_SUFFIX} +) + +convert_to_absolute_path(RUNTIME_SOURCES_ARCH_ASM ${RUNTIME_SOURCES_ARCH_ASM}) + +add_library(System.Private.TypeLoader.Native + STATIC + ${RUNTIME_SOURCES_ARCH_ASM} +) + +if (CMAKE_SYSTEM_NAME STREQUAL Linux) + target_link_libraries(System.Private.TypeLoader.Native rt) +endif () + +install (TARGETS System.Private.TypeLoader.Native DESTINATION sdk) diff --git a/src/Native/System.Private.TypeLoader.Native/amd64/ConstrainedCallSupportHelpers.S b/src/Native/System.Private.TypeLoader.Native/amd64/ConstrainedCallSupportHelpers.S new file mode 100644 index 000000000..bca35df81 --- /dev/null +++ b/src/Native/System.Private.TypeLoader.Native/amd64/ConstrainedCallSupportHelpers.S @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +.intel_syntax noprefix + +#include <../../Runtime/unix/unixasmmacros.inc> + +LEAF_ENTRY ConstrainedCallSupport_GetStubs, _TEXT + // TODO: implement + ret +LEAF_END ConstrainedCallSupport_GetStubs, _TEXT diff --git a/src/Native/System.Private.TypeLoader.Native/amd64/MethodEntrypointStubs.S b/src/Native/System.Private.TypeLoader.Native/amd64/MethodEntrypointStubs.S new file mode 100644 index 000000000..4071c4038 --- /dev/null +++ b/src/Native/System.Private.TypeLoader.Native/amd64/MethodEntrypointStubs.S @@ -0,0 +1,12 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +.intel_syntax noprefix + +#include <../../Runtime/unix/unixasmmacros.inc> + +LEAF_ENTRY MethodEntrypointStubs_SetupPointers, _TEXT + // TODO: implement + ret +LEAF_END MethodEntrypointStubs_SetupPointers, _TEXT diff --git a/src/Native/System.Private.TypeLoader.Native/amd64/VTableResolver.S b/src/Native/System.Private.TypeLoader.Native/amd64/VTableResolver.S new file mode 100644 index 000000000..cc2d7068b --- /dev/null +++ b/src/Native/System.Private.TypeLoader.Native/amd64/VTableResolver.S @@ -0,0 +1,17 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +.intel_syntax noprefix + +#include <../../Runtime/unix/unixasmmacros.inc> + +LEAF_ENTRY VTableResolver_Init, _TEXT + // TODO: implement + ret +LEAF_END VTableResolver_Init, _TEXT + +LEAF_ENTRY VTableResolver_GetCommonCallingStub, _TEXT + // TODO: implement + ret +LEAF_END VTableResolver_GetCommonCallingStub, _TEXT |