summaryrefslogtreecommitdiff
path: root/src/vm
AgeCommit message (Collapse)AuthorFilesLines
2016-12-08[x86/Linux] Fix inconsistent GetCLRFunction definitions (#8472)Jonghyun Park2-2/+1
* [x86/Linux] Fix inconsistency in GetCLRFunction definitions GetCLRFunction is treated as pfnGetCLRFunction_t which has __stdcall convention, but is implemented without __stdcall. This inconsistency causes segmentaion fault while initializing CoreCLR for x86/Linux. This commit fixes such inconsistency via adding __stdcall to GetCLRFunction implementation. In addition, this commit declares GetCLRFuntion in 'utilcode.h' and and revises .cpp files to include 'utilcode.h' instead of declaring 'GetCLRFunction'. * Remove unnecessary includes * Remove another unnecessay include
2016-12-07Refactor Span<T> to ease implementation of JIT intrinsics (#8497)Jan Kotas8-39/+29
- Introduce internal ByReference<T> type for byref fields and change Span to use it - Generalize handling of byref-like types in the type loader - Make DangerousGetPinnableReference public while I was on it
2016-12-07Move JIT_EndCatch from asmhelpers.asm into jithelp.asm (#8492)Jonghyun Park2-28/+30
* Move JIT_EndCatch from asmhelpers.asm into jithelp.asm The name of JIT_EndCatch suggests that it is a JIT helper, but its implementation is inside asmhelpers.asm (not in jithelp.asm). This commit moves its implementation into jithelp.asm. * Move COMPlusEndCatch declaration
2016-12-06[x86/Linux] Port StubLinkerCPU::EmitSetup (#8494)Jonghyun Park1-5/+4
This commit ports StubLinkerCPU::EmitSetup to x86/Linux.
2016-12-06[x86/Linux] Port asmhelpers.asm (#8489)Jonghyun Park3-0/+1057
This commit ports asmhelpers.asm to x86/Linux. (CallRtlUnwind is currently marked as NYI)
2016-12-06Extract ARRAYSTUBS_AS_IL code from STUBS_AS_IL region (#8443)Jonghyun Park2-4/+8
FEATURE_ARRAYSTUBS_AS_IL code seems to be independent from FEATURE_STUBS_AS_IL, but the related code is enclosed with FEATURE_STUBS_AS_IL. This commit extracts the related code from STUBS_AS_IL region.
2016-12-05[x86/Linux] Fix exception handling routine (#8433)Jonghyun Park1-3/+3
* [x86/Linux] Fix exception handling routine DispatchManagedException requires WIN64EXCEPTIONS to be defined, but it is not defined for x86/Linux.
2016-12-05[x86/Linux] Revise COMPlusThrowCallback (#8430)Jonghyun Park3-0/+8
GetCallerToken and GetImpersonationToken methods in FrameSecurityDescriptorBaseObject are implemented only for Windows-platform.
2016-12-05[x86/Linux] Fix unknown pragma build error (#8427)Jonghyun Park1-0/+4
2016-12-05[x86/Linux] Port gmsasm.asm (#8456)Jonghyun Park2-0/+32
2016-12-06[x86/Linux] Mark several Windows-specific functions in excepx86.cpp as NYI ↵Jonghyun Park1-0/+18
(#8424) * Mark several Windows-specific functions as NYI * Use FEATURE_PAL instead of PLATFORM_UNIX * Revert the change in threads.h
2016-12-06Add UnhandledExceptionHandlerUnix Stub (#8425)Jonghyun Park1-0/+13
FuncEvalHijack in dbghelpers.S uses UnhandledExceptionHandlerUnix as a personality routine, but UnhandledExceptionHandlerUnix is not avaiable for x86 (UnhandledExceptionHandlerUnix is available only when WIN64EXCEPTIONS which is not defined for x86). This commit adds UnhandledExceptionHandlerUnix to fix dangling reference.
2016-12-06[x86/Linux] Enclose ArrayOpStub Exceptions with FEATURE_ARRAYSTUB_AS_IL (#8445)Jonghyun Park1-2/+6
* Enclose ArrayOpStub Exceptions with FEATURE_ARRAYSTUB_AS_IL * Fix unmatched ifdef * Fix unmatched ifdef
2016-12-06[x86/Linux] Fix no known conversion from 'void ()' to 'void *' (#8450)SaeHie Park1-3/+5
Fix compile error for x86/Linux - this will fix "no known conversion from 'void ()' to 'void *'" for "CallRtlUnwindSafe" - for compiler clang 3.8
2016-12-06[x86/Linux] add a stub for THROW_CONTROL_FOR_THREAD_FUNCTION (#8455)Jonghyun Park1-1/+1
THROW_CONTROL_FOR_THREAD_FUNCTION is defined as ThrowControlForThread for x86/Linux, but unixstubs implements RedirectForThrowControl (which corresponds to x64/Linux). This commit renames RedirectForThrowControl as ThrowControlForThread to fix dangling ThrowControlForThread reference in x86/Linux.
2016-12-05[x86/Linux] Re-enable FrameHandlerExRecord for x86/Linux (#8409)Jonghyun Park1-2/+3
* Re-enable FrameHandlerExRecord for x86/Linux * Use _TARGET_X86_ instead of WIN64EXCEPTIONS
2016-12-05Fix dangling StubLinkerCPU::EmitDelegateInvoke in x86/Linux (#8444)Jonghyun Park3-2/+12
Several methods in StublicLinkerCPU (including EmitDelegateInvoke) are available only when FEATURE_STUBS_AS_IL is defined. This commit encloses their declaration with appropriate macro (FEATURE_STUBS_AS_IL), and fix related build erros.
2016-12-05[x86/Linux] Enclose stub-linking methods with FEATURE_STUBS_AS_IL (#8432)Jonghyun Park3-4/+14
2016-12-05[x86/Linux] Fix dangling CLR_ImpersonateLoggedOnUser reference (#8435)Jonghyun Park2-0/+9
src/vm/securityprincipal.cpp is not included in x86/Linux build, and thus all the reference to the functions in it will be dangling. (i.e. COMPrincipal::CLR_ImpersonateLoggedOnUser). This commit hides COMPrincipal for non-Windows platforms, and marks COMPlusThrowCallbackHelper as NYI.
2016-12-05[x86/Linux] Mark LeaveCatch as NYI (#8384)Jonghyun Park1-0/+5
* Disable LeaveCatch for non-Windows platforms * Mark LeaveCatch as NYI * Use #ifndef as before
2016-12-05[x86/Linux] Fix all paths through this function will call itself (#8451)SaeHie Park1-0/+9
Fix compile error for x86/Linux - disable "infinite-recursion" for "recursiveFtn" function - only for clang
2016-12-05[x86/Linux] Use Portable LMul JIT Helper (#8449)Jonghyun Park1-2/+2
2016-12-04[x86/Linux] Fix indirection of non-volatile null pointer will be deleted (#8452)SaeHie Park1-2/+2
Fix compile error for x86/Linux - fix error "indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference]" - using clang 3.8
2016-12-04Use Portable Floating-point Arithmetic Helpers (#8447)Jonghyun Park2-2/+4
This commit enables portable floating-point arithmetic helpers for x86/Linux build.
2016-12-04Fix several misspellings of exception and "a exception". (#8442)Jon Hanna8-8/+8
2016-12-04[x86/Linux] Revert UMThkCallFrame-related changes (#8434)Jonghyun Park6-19/+21
* [x86/Linux] Revert UMThkCallFrame-related code * [x86/Linux] Fix dangling 'TheUMEntryPrestub' reference This commit re-enables GenerateUMThunkPrestub and its related code in order to remove TheUMEntryPrestub reference. * [x86/Linux] Re-enable several methods in StubLinkerCPU This commit re-enables the following methods for x86/Linux: - StubLinkerCPU::EmitSetup - StubLinkerCPU::EmitComMethodStubProlog - StubLinkerCPU::EmitComMethodStubEpilog In addtion, EmitComMethodStubEpilog is marked as NYI.
2016-12-04[x86/Linux] Fix unused function warning (#8429)Jonghyun Park1-12/+0
* Delete the unused code
2016-12-02[x86/Linux] fix several parentheses compile warnings (#8428)Jonghyun Park1-4/+4
2016-12-01[x86/Linux] Use portable JIT helpers (#8392)Jonghyun Park2-1/+4
2016-12-01[x86/Linux] Disable Watson-related code for non-Windows platforms (#8410)Jonghyun Park2-0/+10
2016-12-01[x86/Linux] Add Portable PopSEHRecords as NYI (#8412)Jonghyun Park2-0/+7
2016-12-01Resolve duplicated functions (#8413)Jonghyun Park1-0/+2
Several functions are implemented in both cgenx86.cpp and unixstubs.cpp, which results in linking errors. This commit disables functions in cgenx86.cpp to resolve linking errors.
2016-12-01[x86/Linux] Adjust the definition of FnStaticBaseHelper for x86 (#8390)Jonghyun Park1-1/+1
2016-12-01fix permissive C++ code (MSVC /permissive-) (#8337)Phil Christensen8-60/+73
* fix permissive C++ code (MSVC /permissive-) These were found by the C++ compiler group when doing "Real world code" build tests using /permissive-. We are sharing these with you to help you clean up your code before the new version of the compiler comes out. For more information on /permissive- see https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/. ---------------------------- Under /permissive-, skipping the initialization of a variable is not allowed. As an extension the compiler allowed this when there was no destructor for the type. void func(bool b) { if(b) goto END; int value = 0; //error C2362: initialization of 'value' is skipped by 'goto END' int array[10]; //Okay, not initialized. //... value used here END: return; } Fix 1) Limit the scope of value: { int value = 0; //... value used here } END: Fix 2) Initialize/declare value before the 'goto' int value = 0; if(b) goto END; //... value used here END: Fix 3) Don't initialize value in the variable declaration. int value; value = 0 //... value used here END: ------------------- Alternative token representations. The following are reserved as alternative representations for operators: and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq //Can't use reserved names for variables: static int and = 0; // Change name (possibly to 'and_') void func() { _asm { xor edx,edx // xor is reserved, change to uppercase XOR or eax,eax // or is reserved, change to uppercase OR } } * Apply formatting patch. * fixes from code review. I addressed @janvorli requests from the pull request code review.
2016-12-01Re-enable UMThkCallFrame and fix compile errors (#8411)Jonghyun Park1-6/+6
2016-11-30Add printing managed assert message to console (#8399)Jan Vorlicek1-20/+23
I have discovered that when GUI assertion dialogs are disabled, the assert message is not shown anywhere and the app just silently exits. This change adds printing the message and stack trace to console in such case.
2016-11-30Add parentheses aroung logical operations (#8406)Jonghyun Park1-2/+2
This commit fixes logical-op-parentheses compile error for x86/Linux build.
2016-11-30Merge pull request #8209 from stephentoub/arraypool_perfJan Kotas1-0/+1
Improve ArrayPool implementation and performance
2016-12-01Exclude jithelp.asm for x86/Linux (#8393)Jonghyun Park1-1/+0
2016-11-30Disable PrintSEHChain for non-Windows platforms (#8379)Jonghyun Park1-1/+1
PrintSEHChain uses 'EXCEPTION_REGISTRATION_RECORD' which is not available for non-Windows platforms. This commit disables PrintSEHChain for non-Windows platforms to fix build error in x86/Linux.
2016-11-30Disable EHWatsonBucketTracker for non-window platforms (#8373)Jonghyun Park1-0/+2
2016-11-30Fix to avoid stalling the process when ETW is doing a rundown (#8357)Vance Morrison1-0/+10
This only matters when there are MANY JIT compiled methods, but Bing operates in exactly this mode, and thus it stalls for several seconds while rundown completes. This fix does not fix the problem completely, but it makes it MUCH less likely, and is a trivial, safe fix. The problem is that as part of a GC, we do cleanup of any removed JIT code. To do this we take a JIT code manager lock, but this is also a lock that the JIT code iterator takes and is used during ETW rundown. Thus rundown blocks GCs. Almost all the time, we DON'T have JIT code manager cleanup to do, so we just avoid taking the lock in that case, and this makes the stall MUCH less likely.
2016-11-30[x86/Linux] Fix mismatch over LPOVERLAPPED_COMPLETION_ROUTINE (#8364)Jonghyun Park1-4/+4
* Fix the mismatch over LPOVERLAPPED_COMPLETION_ROUTINE Those functions are compared with Function variable of LPOVERLAPPED_COMPLETION_ROUTINE type, but has inconsistent type, - WaitIOCompletionCallback, - CallbackForInitiateDrainageOfCompletionPortQueue - CallbackForContinueDrainageOfCompletionPortQueue This inconsistency results in compile error for x86/Linux build. This commit fixes such inconsistency. * Revises 'CallbackForContinueDrainageOfCompletionPortQueue'
2016-11-30Fix mismatch between signature and implementation of ActivationFunctions (#8394)Jonghyun Park2-3/+3
2016-11-30[x86/Linux] Fix prototype for GCThreadStub (#8397)SaeHie Park1-1/+1
Fix compile error for x86/Linux - fix "cannot initialize a parameter of type 'LPTHREAD_START_ROUTINE'" - add __stdcall GCThreadStub as it's Windows/Linux common code
2016-11-29Updates m_LastRedirectIP and m_SpinCount only for non-Unix platforms (#8386)Jonghyun Park1-0/+2
Both variables are available only for non-Unix platforms.
2016-11-29[x86/Linux] Add virtual dtor for ArrayStubCache class (#8339)Jonghyun Park1-1/+1
* Adds virtual dtor for ArrayStubCache class * Remove unnecessary default destructor
2016-11-29[x86/Linux] Disable WIN64EXECPTION and fix related changes (#8375)SaeHie Park1-2/+2
Fix compile error for x86/Linux - undo some changes to disable WIN64EXCEPTION so the x86/Linux builds
2016-11-29Disable CER feature as it is not used (#8218)John Chen22-13/+93
Use FEATURE_CER to scope CER code, and disable CER feature in CoreCLR.
2016-11-29Uses 'W' to fix build error (#8345)Jonghyun Park1-1/+1