diff options
author | Rahul Kumar <rahku@microsoft.com> | 2016-04-19 14:22:23 -0700 |
---|---|---|
committer | Rahul Kumar <rahku@microsoft.com> | 2016-04-26 10:12:06 -0700 |
commit | 27fc507393a641542a939168b41585895b6b4fc2 (patch) | |
tree | 4e979ea708fe9af0987087a155cf27135e049e97 /src | |
parent | 5fe61b36cc72d43263fc892c754bb9f46acb5ef5 (diff) | |
download | coreclr-27fc507393a641542a939168b41585895b6b4fc2.tar.gz coreclr-27fc507393a641542a939168b41585895b6b4fc2.tar.bz2 coreclr-27fc507393a641542a939168b41585895b6b4fc2.zip |
This has following changes:
1. Update arm64 toolset to latest.
2. Link against ucrt.
3. Fix tls offsets which have changed due to updated toolset
4. Fix source code in decimal.cpp to avoid integer overflow. Result of signed integer overlfow is undefined in C++.
5. Enable build of sos which can be loaded in arm64 windbg
6. Add nop to empty assembly marker methods as new toolset generates invalid .pdata for them.
Diffstat (limited to 'src')
-rw-r--r-- | src/ToolBox/SOS/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/ToolBox/SOS/Strike/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/classlibnative/bcltype/decimal.cpp | 4 | ||||
-rw-r--r-- | src/dlls/dbgshim/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/dlls/mscordac/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/dlls/mscordbi/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/inc/tls.h | 16 | ||||
-rw-r--r-- | src/tools/GenClrDebugResource/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/tools/InjectResource/CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/vm/arm64/crthelpers.asm | 2 |
10 files changed, 24 insertions, 49 deletions
diff --git a/src/ToolBox/SOS/CMakeLists.txt b/src/ToolBox/SOS/CMakeLists.txt index f48f3a70c1..9380dc1de6 100644 --- a/src/ToolBox/SOS/CMakeLists.txt +++ b/src/ToolBox/SOS/CMakeLists.txt @@ -1,5 +1,3 @@ if(WIN32) -if(NOT DEFINED CLR_CMAKE_PLATFORM_ARCH_ARM64) add_subdirectory(Strike) -endif(NOT DEFINED CLR_CMAKE_PLATFORM_ARCH_ARM64) endif(WIN32) diff --git a/src/ToolBox/SOS/Strike/CMakeLists.txt b/src/ToolBox/SOS/Strike/CMakeLists.txt index 124fe979b3..36893b1e42 100644 --- a/src/ToolBox/SOS/Strike/CMakeLists.txt +++ b/src/ToolBox/SOS/Strike/CMakeLists.txt @@ -85,6 +85,7 @@ if(WIN32) dbgutil ${STATIC_MT_CRT_LIB} ${STATIC_MT_CPP_LIB} + ${STATIC_MT_VCRT_LIB} kernel32.lib user32.lib ole32.lib @@ -96,14 +97,6 @@ if(WIN32) psapi.lib ntdll.lib ) - - # ARM64_TODO: Enable this for Windows Arm64 - if (NOT CLR_CMAKE_PLATFORM_ARCH_ARM64) - list(APPEND SOS_LIBRARY - ${STATIC_MT_VCRT_LIB} - ) - endif() - else(WIN32) add_definitions(-DFEATURE_ENABLE_HARDWARE_EXCEPTIONS) add_definitions(-DPAL_STDCPP_COMPAT=1) diff --git a/src/classlibnative/bcltype/decimal.cpp b/src/classlibnative/bcltype/decimal.cpp index 85743dc3d0..ed63391e54 100644 --- a/src/classlibnative/bcltype/decimal.cpp +++ b/src/classlibnative/bcltype/decimal.cpp @@ -246,6 +246,10 @@ FCIMPL1(INT32, COMDecimal::ToInt32, FC_DECIMAL d) if (i >= 0) return i; } else { + // Int32.MinValue is represented as sign being negative + // and Lo32 being 0x80000000 (-ve number). Return that as is without + // reversing the sign of the number. + if(i == 0x80000000) return i; i = -i; if (i <= 0) return i; } diff --git a/src/dlls/dbgshim/CMakeLists.txt b/src/dlls/dbgshim/CMakeLists.txt index c3ebaf5d06..5024642ca5 100644 --- a/src/dlls/dbgshim/CMakeLists.txt +++ b/src/dlls/dbgshim/CMakeLists.txt @@ -44,6 +44,7 @@ if(WIN32) list(APPEND DBGSHIM_LIBRARIES kernel32.lib ${STATIC_MT_CRT_LIB} + ${STATIC_MT_VCRT_LIB} uuid.lib user32.lib advapi32.lib @@ -52,14 +53,6 @@ if(WIN32) version.lib psapi.lib ) - - # ARM64_TODO: Enable this for Windows Arm64 - if (NOT CLR_CMAKE_PLATFORM_ARCH_ARM64) - list(APPEND DBGSHIM_LIBRARIES - ${STATIC_MT_VCRT_LIB} - ) - endif() - else() list(APPEND DBGSHIM_LIBRARIES coreclrpal diff --git a/src/dlls/mscordac/CMakeLists.txt b/src/dlls/mscordac/CMakeLists.txt index 4a80ef46e7..8c2cec1b81 100644 --- a/src/dlls/mscordac/CMakeLists.txt +++ b/src/dlls/mscordac/CMakeLists.txt @@ -86,15 +86,8 @@ if(WIN32) uuid.lib user32.lib ${STATIC_MT_CRT_LIB} + ${STATIC_MT_VCRT_LIB} ) - - # ARM64_TODO: Enable this for Windows Arm64 - if (NOT CLR_CMAKE_TARGET_ARCH_ARM64) - list(APPEND COREDAC_LIBRARIES - ${STATIC_MT_VCRT_LIB} - ) - endif() - else(WIN32) list(APPEND COREDAC_LIBRARIES mscorrc_debug diff --git a/src/dlls/mscordbi/CMakeLists.txt b/src/dlls/mscordbi/CMakeLists.txt index b8dfa71ca6..28b006b58c 100644 --- a/src/dlls/mscordbi/CMakeLists.txt +++ b/src/dlls/mscordbi/CMakeLists.txt @@ -62,15 +62,9 @@ if(WIN32) user32.lib version.lib ${STATIC_MT_CRT_LIB} + ${STATIC_MT_VCRT_LIB} ) - # ARM64_TODO: Enable this for Windows Arm64 - if (NOT CLR_CMAKE_PLATFORM_ARCH_ARM64) - list(APPEND COREDBI_LIBRARIES - ${STATIC_MT_VCRT_LIB} - ) - endif() - target_link_libraries(mscordbi ${COREDBI_LIBRARIES}) elseif(CLR_CMAKE_PLATFORM_UNIX) diff --git a/src/inc/tls.h b/src/inc/tls.h index 05e50575f4..55f74892bb 100644 --- a/src/inc/tls.h +++ b/src/inc/tls.h @@ -15,13 +15,19 @@ #ifdef FEATURE_IMPLICIT_TLS #ifdef _WIN64 -#define OFFSETOF__TLS__tls_CurrentThread 0x08 -#define OFFSETOF__TLS__tls_EETlsData 0x18 -#else -#define OFFSETOF__TLS__tls_CurrentThread 0x04 -#define OFFSETOF__TLS__tls_EETlsData 0x0c +#ifndef _DEBUG +#define OFFSETOF__TLS__tls_ThreadLocalInfo 0x10 +#else // _DEBUG +#define OFFSETOF__TLS__tls_ThreadLocalInfo 0x08 +#endif // _DEBUG +#else // _WIN64 +#define OFFSETOF__TLS__tls_ThreadLocalInfo 0x04 #endif // _WIN64 +#define OFFSETOF__TLS__tls_CurrentThread (OFFSETOF__TLS__tls_ThreadLocalInfo+0x0) +#define OFFSETOF__TLS__tls_EETlsData (OFFSETOF__TLS__tls_CurrentThread+2*sizeof(void*)) + + #ifdef _TARGET_WIN64_ #define WINNT_OFFSETOF__TEB__ThreadLocalStoragePointer 0x58 #else diff --git a/src/tools/GenClrDebugResource/CMakeLists.txt b/src/tools/GenClrDebugResource/CMakeLists.txt index c30f391440..ad2598a373 100644 --- a/src/tools/GenClrDebugResource/CMakeLists.txt +++ b/src/tools/GenClrDebugResource/CMakeLists.txt @@ -3,9 +3,5 @@ add_executable(GenClrDebugResource GenClrDebugResource.cpp) target_link_libraries(GenClrDebugResource ${STATIC_MT_CRT_LIB} + ${STATIC_MT_VCRT_LIB} ) - -# ARM64_TODO: Enable this for Windows Arm64 -if (NOT CLR_CMAKE_PLATFORM_ARCH_ARM64) - target_link_libraries(GenClrDebugResource ${STATIC_MT_VCRT_LIB}) -endif()
\ No newline at end of file diff --git a/src/tools/InjectResource/CMakeLists.txt b/src/tools/InjectResource/CMakeLists.txt index f8593069ab..a4fd538662 100644 --- a/src/tools/InjectResource/CMakeLists.txt +++ b/src/tools/InjectResource/CMakeLists.txt @@ -6,9 +6,5 @@ add_executable(InjectResource InjectResource.cpp) target_link_libraries(InjectResource ${STATIC_MT_CRT_LIB} -) - -# ARM64_TODO: Enable this for Windows Arm64 -if (NOT CLR_CMAKE_PLATFORM_ARCH_ARM64) - target_link_libraries(InjectResource ${STATIC_MT_VCRT_LIB}) -endif()
\ No newline at end of file + ${STATIC_MT_VCRT_LIB} +)
\ No newline at end of file diff --git a/src/vm/arm64/crthelpers.asm b/src/vm/arm64/crthelpers.asm index 127b3e40fb..a341dc4027 100644 --- a/src/vm/arm64/crthelpers.asm +++ b/src/vm/arm64/crthelpers.asm @@ -153,6 +153,7 @@ JIT_MemSet_0xd8 LEAF_END LEAF_ENTRY JIT_MemSet_End + nop LEAF_END @@ -292,6 +293,7 @@ JIT_MemCpy_0xe8 LEAF_END LEAF_ENTRY JIT_MemCpy_End + nop LEAF_END ; Must be at very end of file |