Stephen Toub [Fri, 9 Dec 2016 18:04:01 +0000 (13:04 -0500)]
Merge pull request #8507 from stephentoub/portcorert_cwt
Make ConditionalWeakTable reads lock-free
Alexander Radchenko [Fri, 9 Dec 2016 17:37:23 +0000 (00:37 +0700)]
StringBuilder.AppendJoin (appending lists to StringBuilder) (#8350)
Adding StringBuilder.AppendJoin
Gaurav Khanna [Fri, 9 Dec 2016 16:24:31 +0000 (08:24 -0800)]
Merge pull request #8563 from xoofx/TPA_glossary
Add TPA/Trusted Platform Assemblies description to the glossary
Alexandre Mutel [Fri, 9 Dec 2016 16:17:46 +0000 (17:17 +0100)]
Add TPA/Trusted Platform Assemblies description to the glossary (From https://github.com/dotnet/coreclr/issues/6470#issuecomment-
235161459 )
Jonghyun Park [Fri, 9 Dec 2016 12:27:03 +0000 (21:27 +0900)]
[x86/Linux] Port ResolveWorkerAsmStub (#8557)
Jonghyun Park [Fri, 9 Dec 2016 12:22:06 +0000 (21:22 +0900)]
[x86/Linux] Use Portable FastGetDomain (#8556)
FastGetDomain function (with __declspec(naked)) causes segmentation
fault.
Jan Vorlicek [Fri, 9 Dec 2016 09:50:01 +0000 (10:50 +0100)]
Fix incremental build when dummy version.cpp is generated (#8547)
This change fixes a problem with incremental build on Unix. When the
version.cpp is generated by the build.sh as a dummy one with no real
version stamp in it, it is recreated every time the build.sh is run.
That means that build needs to rebuild that file and also re-link
all the components that include it.
This change tests the file presence and contents before actually
regenerating it.
SaeHie Park [Fri, 9 Dec 2016 09:29:16 +0000 (18:29 +0900)]
[x86/Linux] Fix getcpuid calling convention (#8552)
Fix getcpuid(), getextcpuid() with STDCALL
Fix xmmYmmStateSupport() with STDCALL
Jeremy Kuhne [Fri, 9 Dec 2016 05:39:00 +0000 (21:39 -0800)]
Strip more defines from CoreLib (#8545)
* Strip more defines from CoreLib
Removes the rest of
FEATURE_CAS_POLICY
FEATURE_REMOTING
FEATURE_MACL
And another significant chunk of
!FEATURE_CORECLR
* Address feedback
Stephen Toub [Wed, 7 Dec 2016 21:35:03 +0000 (16:35 -0500)]
Fix perf regression with lots of objects in a ConditionalWeakTable
The CoreRT implementation of ConditionalWeakTable that was ported back to CoreCLR uses a special scheme to make reads lock-free. When the container needs to grow, it allocates new arrays and duplicates all of the dependency handles from the previous array, rather than just copying them. This avoids issues stemming from a thread getting a dependency handle in an operation on the container, then having that handle destroyed, and then trying to use it; the handle won't be destroyed as long as the container is referenced.
However, this also leads to a significant cost in a certain situation. Every time the container grows, it allocates another N dependency handles where N is the current size of the container. So, for example, with an initial size of 8, if 64 objects are added to the container, it'll allocate 8 dependency handles, then another 16, then another 32, and then another 64, resulting in significantly more handles than in the old implementation, which would only allocate 64 handles total.
This commit fixes that by changing the scheme slightly. A container still frees its handles in its finalizer. However, rather than duplicating all handles, that responsibility for freeing is transferred from one container to the next. Then to avoid issues where, for example, the second container is released while the first is still in use, a reference is maintained from the first to the second, so that the second can't be finalized while the first is still in use.
The commit also fixes a race condition with resurrection and finalization, whereby dependency handles could be used while or after they're being freed by the finalizer. It's addressed by only freeing handles in a second finalization after clearing out state in the first finalization to guarantee no possible usage during the second.
Stephen Toub [Wed, 7 Dec 2016 20:43:05 +0000 (15:43 -0500)]
Port ConditionalWeakTable from CoreRT
The CoreRT ConditionalWeakTable was modified to support lock-free reads. This ports the implementation back to coreclr.
sandreenko [Fri, 9 Dec 2016 01:56:58 +0000 (17:56 -0800)]
Merge pull request #8539 from sandreenko/fix-unix-unwind-info
Fix unix unwind info
SaeHie Park [Fri, 9 Dec 2016 01:09:48 +0000 (10:09 +0900)]
[x86/Linux] Fix PAL unit test paltest_pal_sxs_test1 (#8522)
Fix unit test error for x86/Linux
- fix fail of exception_handling/pal_sxs/test1/paltest_pal_sxs_test1
Jonghyun Park [Fri, 9 Dec 2016 01:03:07 +0000 (10:03 +0900)]
[x86/Linux] Revise asmhelper.S using macro (#8523)
* [x86/Linux] Revise asmhelper.S using macro
This commit revises asmhelper.S using macros that inserts CFI
directives.
Pat Gavlin [Fri, 9 Dec 2016 01:02:11 +0000 (17:02 -0800)]
Merge pull request #8537 from pgavlin/VSO299202
Disable special put args for LIMIT_CALLER on x86.
Pat Gavlin [Fri, 9 Dec 2016 00:57:14 +0000 (16:57 -0800)]
Merge pull request #8543 from pgavlin/VSO299207
Correct an assertion in LSRA.
Justin Van Patten [Fri, 9 Dec 2016 00:46:23 +0000 (16:46 -0800)]
Make TimeZoneInfo fields readonly (#8526)
TimeZoneInfo is immutable. Help enforce this by making its fields
readonly.
Justin Van Patten [Fri, 9 Dec 2016 00:44:20 +0000 (16:44 -0800)]
TimeZoneInfo: Use string.Concat instead of string.Format (#8540)
It's more efficient to concatenate the strings.
Justin Van Patten [Fri, 9 Dec 2016 00:43:45 +0000 (16:43 -0800)]
Make TimeZoneInfo.TransitionTime fields readonly (#8529)
TransitionTime is immutable. Help enforce this by making its fields
readonly.
Jonghyun Park [Fri, 9 Dec 2016 00:43:00 +0000 (09:43 +0900)]
[x86/Linux] Port Several Stubs as NYI (#8515)
This commit adds SinglecastDelegateInvokeStub and VSD-related Stubs as NYI.
Justin Van Patten [Fri, 9 Dec 2016 00:39:28 +0000 (16:39 -0800)]
Make TimeZoneInfo.AdjustmentRule fields readonly (#8528)
AdjustmentRule is immutable. Help enforce this by making its fields
readonly.
Justin Van Patten [Fri, 9 Dec 2016 00:32:56 +0000 (16:32 -0800)]
Preallocate the TimeZoneInfo.Utc instance (#8530)
There doesn't appear to be a good reason why the TimeZoneInfo.Utc
instance needs to be cleared when TimeZoneInfo.ClearCachedData() is
called. Instead, we can pre-allocate and reuse a singleton instance,
obviating the need for the lazy-initialization/locking mechanics.
Justin Van Patten [Fri, 9 Dec 2016 00:30:44 +0000 (16:30 -0800)]
Simplify TimeZoneInfo.AdjustmentRule.Equals (#8527)
Justin Van Patten [Fri, 9 Dec 2016 00:28:08 +0000 (16:28 -0800)]
Remove private TimeZoneInfoComparer (#8512)
Use Comparison<T> instead of IComparer<T> to sort the list of
TimeZoneInfos, which moves the comparison code to the sole place where
it is used, and now that Array.Sort is implemented in terms of
Comparison<T> instead of IComparer<T>, avoids some unnecessary
intermediate allocations.
Sergey Andreenko [Thu, 8 Dec 2016 22:42:56 +0000 (14:42 -0800)]
Fix unix unwind info
Windows uses offset from stack pointer, when unix has to use offset from
caninical frame address,
Jan Vorlicek [Thu, 8 Dec 2016 23:51:19 +0000 (00:51 +0100)]
Remove sscanf and sprintf usage (#8508)
* Remove sscanf
* Remove sprintf
Pat Gavlin [Thu, 8 Dec 2016 23:18:42 +0000 (15:18 -0800)]
Correct an assertion in LSRA.
`verifyFinalAllocation` asserts that if a non-BB interval RefPosition
that is either spilled or is the interval's last use does not have a
register, then that ref position must be marked `AllocateIfProfitable`.
However, this situation can also arise in at least one other situation:
an unused parameter will have at least one ref position that may not be
allocated to a register. This change corrects the assertion to check
`RefPosition::RequiresRegister` rather than
`RefPosition::AllocateIfProfitable`.
Fixes VSO 299207.
Pat Gavlin [Thu, 8 Dec 2016 22:14:38 +0000 (14:14 -0800)]
Disable special put args for LIMIT_CALLER on x86.
On x86, `LSRA_LIMIT_CALLER` is too restrictive to allow the use of special
put args: this stress mode leaves only three registers allocatable--eax,
ecx, and edx--of which the latter two are also used for the first two
integral arguments to a call. This can leave us with too few registers to
succesfully allocate in situations like the following:
t1026 = lclVar ref V52 tmp35 u:3 REG NA <l:$3a1, c:$98d>
/--* t1026 ref
t1352 = * putarg_reg ref REG NA
t342 = lclVar int V14 loc6 u:4 REG NA $50c
t343 = const int 1 REG NA $41
/--* t342 int
+--* t343 int
t344 = * + int REG NA $495
t345 = lclVar int V04 arg4 u:2 REG NA $100
/--* t344 int
+--* t345 int
t346 = * % int REG NA $496
/--* t346 int
t1353 = * putarg_reg int REG NA
t1354 = lclVar ref V52 tmp35 (last use) REG NA
/--* t1354 ref
t1355 = * lea(b+0) byref REG NA
Here, the first `putarg_reg` would normally be considered a special put arg,
which would remove `ecx` from the set of allocatable registers, leaving
only `eax` and `edx`. The allocator will then fail to allocate a register
for the def of `t345` if arg4 is not a register candidate: the corresponding
ref position will be constrained to { `ecx`, `ebx`, `esi`, `edi` }, which
`LSRA_LIMIT_CALLER` will further constrain to `ecx`, which will not be
available due to the special put arg.
Justin Van Patten [Thu, 8 Dec 2016 21:21:43 +0000 (13:21 -0800)]
Avoid allocating in TimeZoneInfo.GetHashCode() (#8513)
Avoid the intermediate ToUpper string allocation.
Justin Van Patten [Thu, 8 Dec 2016 21:21:28 +0000 (13:21 -0800)]
Simplify TimeZoneInfo.Equals(object) (#8514)
Equals(TimeZoneInfo) already handles null.
Jeremy Kuhne [Thu, 8 Dec 2016 21:10:38 +0000 (13:10 -0800)]
Move native search paths forward (#8531)
Set native search paths in AppDomain.Setup before doing the rest
of the setup steps to get ahead of potential P/Invoke calls.
Karel Zikmund [Thu, 8 Dec 2016 16:40:00 +0000 (08:40 -0800)]
Update glossary.md
Russ Keldorph [Thu, 8 Dec 2016 14:40:39 +0000 (06:40 -0800)]
Merge pull request #8524 from hqueue/xarch/lowercast
Remove an unused local variable
Hyung-Kyu Choi [Thu, 8 Dec 2016 08:05:54 +0000 (17:05 +0900)]
Remove an unused local variable
In lowerxarch.cpp, local variable srcUns is defined but not used
at Lowering::LowerCast(GenTree* tree).
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Jeremy Kuhne [Thu, 8 Dec 2016 01:29:31 +0000 (17:29 -0800)]
Strip some conditional compilation in SPCL (#8511)
Removed:
FEATURE_FUSION
FEATURE_PATHCOMPAT
FEATURE_APPDOMAINMANAGER_INITOPTIONS
FEATURE_APTCA
FEATURE_CLICKONCE
FEATURE_IMPERSONATION
FEATURE_MULTIMODULE_ASSEMBLIES
Removed some:
FEATURE_CAS_POLICY
!FEATURE_CORECLR
FEATURE_REMOTING
Jonghyun Park [Thu, 8 Dec 2016 01:25:38 +0000 (10:25 +0900)]
[x86/Linux] Fix inconsistent GetCLRFunction definitions (#8472)
* [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
Brian Sullivan [Thu, 8 Dec 2016 00:12:57 +0000 (16:12 -0800)]
Merge pull request #8509 from dotnet-bot/from-tfs
Merge changes from TFS
Jan Kotas [Wed, 7 Dec 2016 23:16:57 +0000 (15:16 -0800)]
Refactor Span<T> to ease implementation of JIT intrinsics (#8497)
- 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
Pat Gavlin [Wed, 7 Dec 2016 23:16:09 +0000 (15:16 -0800)]
Merge pull request #8505 from pgavlin/VSO297215
Use a left-leaning comma tree when morphing a stelem.ref helper.
Brian Sullivan [Wed, 7 Dec 2016 22:54:55 +0000 (14:54 -0800)]
Enable POGO build and link for CodegenMirror
[tfs-changeset: 1640669]
Jan Kotas [Wed, 7 Dec 2016 21:13:35 +0000 (13:13 -0800)]
Merge pull request #8504 from mikedn/sort-comparison
Change ArraySortHelper to use Comparison<T>
Carol Eidt [Wed, 7 Dec 2016 19:28:30 +0000 (11:28 -0800)]
Merge pull request #8482 from CarolEidt/Fix8220
Use only lower floats for Vector3 dot and equality
Sivarv [Wed, 7 Dec 2016 18:39:06 +0000 (10:39 -0800)]
Merge pull request #8488 from sivarv/upperSave
Fix to issue 8356.
Pat Gavlin [Wed, 7 Dec 2016 18:19:40 +0000 (10:19 -0800)]
Use a left-leaning comma tree when morphing a stelem.ref helper.
fgMorphCall may change a call to the stelem.ref helper that is storing a
null value into a simple store. This transformation needs to construct a
comma tree to hold the argument setup nodes present on the call if any
exist. Originally this tree was constructed in right-leaning fashion
(i.e. the first comma node was the root of the tree and each successive
comma node was the RHS of its parent). Unfortunately, this construction
did not automatically propagate the flags of a comma node's children to
the comma node, since not all of each comma node's actual children were
available at the time it was constructed. Constructing the tree in
left-leaning fashion (i.e. the first comma node is the left-most child
and the final comma node is the root of the tree) allows the flag
propagation to be performed correctly by constrution.
Fixes VSO 297215.
Pat Gavlin [Wed, 7 Dec 2016 18:17:44 +0000 (10:17 -0800)]
Merge pull request #8503 from pgavlin/VSO289704
Remove a use of `gtGetOp` in earlyprop.
Mike Danes [Wed, 7 Dec 2016 18:04:38 +0000 (20:04 +0200)]
Remove unused DepthLimitedQuickSort methods
These are never used in CoreCLR
Mike Danes [Wed, 7 Dec 2016 17:38:02 +0000 (19:38 +0200)]
Change ArraySortHelper to use Comparison<T>
The Array/List.Sort overloads that take a Comparison<T> have worse performance than the ones that take a IComparer<T>. That's because sorting is implemented around IComparer<T> and a Comparison<T> needs to be wrapped in a comparer object to be used.
At the same time, interface calls are slower than delegate calls so the existing implementation doesn't offer the best performance even when the IComparer<T> based overloads are used.
By changing the implementation to use Comparison<T> we avoid interface calls in both cases.
When IComparer<T> overloads are used a Comparison<T> delegate is created from IComparer<T>.Compare, that's an extra object allocation but sorting is faster and we avoid having two separate sorting implementations.
Pat Gavlin [Wed, 7 Dec 2016 17:02:02 +0000 (09:02 -0800)]
Remove a use of `gtGetOp` in earlyprop.
Instead, use `GenTreeIndir::Addr`, as some indirections are not simple
operators.
Fixes VSO 289704.
Evgeny Pavlov [Wed, 7 Dec 2016 16:48:30 +0000 (19:48 +0300)]
[x86/Linux][SOS] Get correct stack pointer from DT_CONTEXT (#8500)
Carol Eidt [Thu, 1 Dec 2016 03:31:58 +0000 (19:31 -0800)]
Use only lower floats for Vector3 dot and equality
For both dot product and comparisons that produce a boolean result, we need to use only the lower 3 floats. The bug was exposed by a case where the result of a call was being used in one of these operations without being stored to a local (which would have caused the upper bits to be cleared).
Fix #8220
Evgeny Pavlov [Wed, 7 Dec 2016 10:07:20 +0000 (13:07 +0300)]
[x86/Linux][SOS] Add definitions for CLR_CMAKE_PLATFORM_ARCH_I386 in CMakeLists.txt file of lldbplugin (#8499)
Jonghyun Park [Wed, 7 Dec 2016 09:54:54 +0000 (18:54 +0900)]
Move JIT_EndCatch from asmhelpers.asm into jithelp.asm (#8492)
* 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
Jonghyun Park [Wed, 7 Dec 2016 06:37:07 +0000 (15:37 +0900)]
[x86/Linux] Port StubLinkerCPU::EmitSetup (#8494)
This commit ports StubLinkerCPU::EmitSetup to x86/Linux.
Brian Robbins [Wed, 7 Dec 2016 05:14:38 +0000 (21:14 -0800)]
Merge pull request #8470 from brianrob/fix_lttng_header_detection
Fix building against liblttng-ust-dev 2.8+
Jonghyun Park [Wed, 7 Dec 2016 03:46:17 +0000 (12:46 +0900)]
[x86/Linux] Port asmhelpers.asm (#8489)
This commit ports asmhelpers.asm to x86/Linux.
(CallRtlUnwind is currently marked as NYI)
Jonghyun Park [Wed, 7 Dec 2016 03:41:44 +0000 (12:41 +0900)]
[x86/Linux] Port PATCH_LABEL macro (#8483)
Swaroop Sridhar [Wed, 7 Dec 2016 01:17:21 +0000 (17:17 -0800)]
GcInfoEncoder: Initialize the BitArrays tracking liveness (#8485)
The non-X86 GcInfoEncoder library uses two bit-arrays to keep track
of pointer-liveness. The BitArrays are allocated using the arena allocator
which doesn't zero-initialize them. This was causing non-deterministic
redundant allocation of unused slots. This change fixes the problem.
Pat Gavlin [Wed, 7 Dec 2016 01:01:50 +0000 (17:01 -0800)]
Merge pull request #8484 from pgavlin/VSO297113
Fix use edge iterator for DYN_BLK nodes.
sivarv [Wed, 7 Dec 2016 00:19:55 +0000 (16:19 -0800)]
Fix to issue 8356.
Brian Robbins [Mon, 5 Dec 2016 04:16:29 +0000 (20:16 -0800)]
Fix building against liblttng-ust-dev 2.8+
Pat Gavlin [Tue, 6 Dec 2016 23:37:08 +0000 (15:37 -0800)]
Fix use edge iterator for DYN_BLK nodes.
Dynamic block nodes (i.e. DYN_BLK and STORE_DYN_BLK) are not standard
nodes. As such, the use order of their operands may be reordered in ways
that are not visible via the usual mechanisms. The use edge iterator was
not taking these mechanisms into account, which caused mismatches
between the use order observed by LSRA and the order observed by code
generation. This in turn caused SBCG under circumstances in which one
operand needed to be copied from e.g. esi to edi before another operand
was unspilled into esi.
Fixes VSO 297113.
Carol Eidt [Tue, 6 Dec 2016 22:31:09 +0000 (14:31 -0800)]
Merge pull request #8466 from CarolEidt/Fix297074
Create Blk node for struct vararg
Brian Sullivan [Tue, 6 Dec 2016 21:30:32 +0000 (13:30 -0800)]
Merge pull request #8467 from briansull/vso-287663
Don't change a GT_DYN_BLK into a GT_BLK when the size is zero
Andy Ayers [Tue, 6 Dec 2016 19:12:30 +0000 (11:12 -0800)]
Merge pull request #8263 from AndyAyersMS/InlineInlinePinvoke
JIT: enable inline pinvoke in more cases
ahsonkhan [Tue, 6 Dec 2016 18:17:40 +0000 (10:17 -0800)]
Fixed typo
Brian Sullivan [Tue, 6 Dec 2016 01:06:40 +0000 (17:06 -0800)]
We should not transform a GT_DYN_BLK with a constant zero size into a GT_BLK as we do not support a GT_BLK of size zero.
Fixes VSO 287663
Pat Gavlin [Tue, 6 Dec 2016 17:14:06 +0000 (09:14 -0800)]
Merge pull request #8464 from pgavlin/VSO297109
x86: Deactivate P/Invoke frames after a native call.
Pat Gavlin [Tue, 6 Dec 2016 17:01:36 +0000 (09:01 -0800)]
Address PR feedback.
Evgeny Pavlov [Tue, 6 Dec 2016 14:42:44 +0000 (17:42 +0300)]
[x86/Linux][SOS] Fix DataTarget::GetPointerSize for x86 (#8473)
Evgeny Pavlov [Tue, 6 Dec 2016 14:42:15 +0000 (17:42 +0300)]
[x86/Linux][SOS] Disable ARM target support for xplat (#8471)
SaeHie Park [Tue, 6 Dec 2016 09:22:30 +0000 (18:22 +0900)]
[x86/Linux] Fix Dacp structure size mismatch (#8377)
Fix compile error for x86/Linux
- add __attribute__((__ms_struct__)) as "MSLAYOUT" for those structures
- Fix "Dacp structs cannot be modified due to backwards compatibility" error
Jonghyun Park [Tue, 6 Dec 2016 09:22:14 +0000 (18:22 +0900)]
Extract ARRAYSTUBS_AS_IL code from STUBS_AS_IL region (#8443)
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.
Carol Eidt [Tue, 6 Dec 2016 07:42:39 +0000 (23:42 -0800)]
Merge pull request #8463 from CarolEidt/Fix288220
Allow remorph of SIMD assignment
Jonghyun Park [Tue, 6 Dec 2016 01:58:32 +0000 (10:58 +0900)]
[x86/Linux] Fix exception handling routine (#8433)
* [x86/Linux] Fix exception handling routine
DispatchManagedException requires WIN64EXCEPTIONS to be defined, but it
is not defined for x86/Linux.
Jonghyun Park [Tue, 6 Dec 2016 01:57:52 +0000 (10:57 +0900)]
[x86/Linux] Revise COMPlusThrowCallback (#8430)
GetCallerToken and GetImpersonationToken methods in FrameSecurityDescriptorBaseObject
are implemented only for Windows-platform.
Jonghyun Park [Tue, 6 Dec 2016 01:56:58 +0000 (10:56 +0900)]
[x86/Linux] Fix unknown pragma build error (#8427)
Carol Eidt [Tue, 6 Dec 2016 00:44:22 +0000 (16:44 -0800)]
Create Blk node for struct vararg
When morphing a reference to a struct parameter in a varargs method, it must be a blk node if it is the destination of an assignment.
Drew Scoggins [Tue, 6 Dec 2016 01:19:53 +0000 (19:19 -0600)]
Merge pull request #8468 from DrewScoggins/LinuxPerfFixup
Fix calls to curl in prep script
Drew Scoggins [Tue, 6 Dec 2016 01:14:59 +0000 (17:14 -0800)]
Fix calls to curl in prep script
Before we were calling curl without the -L configuration. This would
cause it not follow redirects and several of the files we needed have
now started using redirects. This fixes that issue.
Jonghyun Park [Tue, 6 Dec 2016 01:01:57 +0000 (10:01 +0900)]
[x86/Linux] Port gmsasm.asm (#8456)
Jonghyun Park [Tue, 6 Dec 2016 00:37:53 +0000 (09:37 +0900)]
[x86/Linux] Mark several Windows-specific functions in excepx86.cpp as NYI (#8424)
* Mark several Windows-specific functions as NYI
* Use FEATURE_PAL instead of PLATFORM_UNIX
* Revert the change in threads.h
Jonghyun Park [Tue, 6 Dec 2016 00:37:41 +0000 (09:37 +0900)]
Add UnhandledExceptionHandlerUnix Stub (#8425)
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.
Sivarv [Tue, 6 Dec 2016 00:28:37 +0000 (16:28 -0800)]
Merge pull request #8461 from sivarv/shiftFix
Compare opt against zero involving a shift oper.
Drew Scoggins [Tue, 6 Dec 2016 00:12:42 +0000 (18:12 -0600)]
Merge pull request #8195 from DrewScoggins/LinuxPerfAuto
Add Linux perf support to Jenkins
Jonghyun Park [Mon, 5 Dec 2016 23:58:20 +0000 (08:58 +0900)]
[x86/Linux] Enclose ArrayOpStub Exceptions with FEATURE_ARRAYSTUB_AS_IL (#8445)
* Enclose ArrayOpStub Exceptions with FEATURE_ARRAYSTUB_AS_IL
* Fix unmatched ifdef
* Fix unmatched ifdef
SaeHie Park [Mon, 5 Dec 2016 23:54:51 +0000 (08:54 +0900)]
[x86/Linux] Fix no known conversion from 'void ()' to 'void *' (#8450)
Fix compile error for x86/Linux
- this will fix "no known conversion from 'void ()' to 'void *'" for "CallRtlUnwindSafe"
- for compiler clang 3.8
Jonghyun Park [Mon, 5 Dec 2016 23:54:41 +0000 (08:54 +0900)]
[x86/Linux] add a stub for THROW_CONTROL_FOR_THREAD_FUNCTION (#8455)
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.
Pat Gavlin [Mon, 5 Dec 2016 23:50:13 +0000 (15:50 -0800)]
x86: Deactivate P/Invoke frames after a native call.
Although this does not appear to be strictly necessary, this matches
JIT32's behavior. With this change, the stack walker will ignore the
P/Invoke frame even while it is still present on its thread's frame
list.
Fixes VSO 297109.
Carol Eidt [Mon, 5 Dec 2016 23:07:35 +0000 (15:07 -0800)]
Allow remorph of SIMD assignment
This fixes an assert exposed by JitStress=1.
sivarv [Mon, 5 Dec 2016 19:59:57 +0000 (11:59 -0800)]
Compare opt against zero involving a shift oper.
Jeremy Kuhne [Mon, 5 Dec 2016 22:42:51 +0000 (14:42 -0800)]
Copy CoreFX environment variable code (#8405)
Tweak the core code to match up with what we had done in CoreFX and expose
so that we can have a single source of environment truth. This is
particularly important for Unix as we use a local copy of the state.
Bruce Forstall [Mon, 5 Dec 2016 22:33:27 +0000 (14:33 -0800)]
Merge pull request #8109 from BruceForstall/FixSimd12NYI
RyuJIT/x86: Implement TYP_SIMD12 support
Drew Scoggins [Fri, 11 Nov 2016 17:29:07 +0000 (09:29 -0800)]
Add Linux perf support to Jenkins
This change adds perf support for CoreCLR on Ubuntu 14.04 to Jenkins.
This is mostly work extending what Smile had already done. The main
changes were to build CoreCLR rather then grab it from CI, and work to
get the upload portion finished.
Andy Ayers [Mon, 5 Dec 2016 20:24:56 +0000 (12:24 -0800)]
Incorporate changes from Jan's #8437, plus review feedback.
Still honoring windows exception interop restrictions on all platforms
and runtimes. Will revisit when addressing #8459.
Andy Ayers [Mon, 21 Nov 2016 23:44:21 +0000 (15:44 -0800)]
JIT: enable inline pinvoke in more cases
An inline pinvoke is a pinvoke where the managed/native transition
overhead is reduced by inlining parts of the transition bookkeeping
around the call site. A normal pinvoke does this bookkeeping in
a stub method that interposes between the managed caller and the
native callee.
Previously the jit would not allow pinvoke calls that came from inlines
to be optimized via inline pinvoke. This sometimes caused performance
surprises for users who wrap DLL imports with managed methods. See for
instance #2373.
This change lifts this limitation. Pinvokes from inlined method bodies
are now given the same treatment as pinvokes in the root method. The
legality check for inline pinvokes has been streamlined slightly to
remove a redundant check. Inline pinvokes introduced by inlining are
handled by accumulating the unmanaged method count with the value from
inlinees, and deferring insertion of the special basic blocks until after
inlining, so that if the only inline pinvokes come from inline instances
they are still properly processed.
Inline pinvokes are still disallowed in try and handler regions
(catches, filters, and finallies).
X87 liveness tracking was updated to handle the implicit inline frame
var references. This was a pre-existing issue that now can show up more
frequently. Added a test case that fails with the stock legacy jit
(and also with the new enhancements to pinvoke). Now both the original
failing case and this case pass.
Inline pinvokes are also now suppressed in rarely executed blocks,
for instance blocks leading up to throws or similar.
The inliner is now also changed to preferentially report inline
reasons as forced instead of always when both are applicable.
This change adds a new test case that shows the variety of
situations that can occur with pinvoke, inlining, and EH.
Ian Hays [Mon, 5 Dec 2016 20:57:09 +0000 (12:57 -0800)]
Merge pull request #8306 from jamesqo/better-bulk-add
Better bulk adds for List.
Jonghyun Park [Mon, 5 Dec 2016 20:41:00 +0000 (05:41 +0900)]
[x86/Linux] Re-enable FrameHandlerExRecord for x86/Linux (#8409)
* Re-enable FrameHandlerExRecord for x86/Linux
* Use _TARGET_X86_ instead of WIN64EXCEPTIONS
Jonghyun Park [Mon, 5 Dec 2016 20:29:56 +0000 (05:29 +0900)]
[x86/Linux] Fix dangling ClrCaptureContext (#8453)
Jonghyun Park [Mon, 5 Dec 2016 20:20:53 +0000 (05:20 +0900)]
Fix dangling StubLinkerCPU::EmitDelegateInvoke in x86/Linux (#8444)
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.
Jonghyun Park [Mon, 5 Dec 2016 20:08:33 +0000 (05:08 +0900)]
[x86/Linux] Enclose stub-linking methods with FEATURE_STUBS_AS_IL (#8432)