Jeremy Kuhne [Thu, 8 Dec 2016 01:29:31 +0000 (17:29 -0800)]
Strip some conditional compilation in SPCL (dotnet/coreclr#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
Commit migrated from https://github.com/dotnet/coreclr/commit/
957b6d9f317c12462c377342a132708494b6f34c
Jonghyun Park [Thu, 8 Dec 2016 01:25:38 +0000 (10:25 +0900)]
[x86/Linux] Fix inconsistent GetCLRFunction definitions (dotnet/coreclr#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
Commit migrated from https://github.com/dotnet/coreclr/commit/
6665345c5a6e6e7fcc5b2fcb36c0f536e773648e
Brian Sullivan [Thu, 8 Dec 2016 00:12:57 +0000 (16:12 -0800)]
Merge pull request dotnet/coreclr#8509 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
79f22fd6b8a0c4f884421a63cfa9054ced1b2cfd
Jan Kotas [Wed, 7 Dec 2016 23:16:57 +0000 (15:16 -0800)]
Refactor Span<T> to ease implementation of JIT intrinsics (dotnet/coreclr#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
Commit migrated from https://github.com/dotnet/coreclr/commit/
64c2ad17351ac5bc0bb042216bfcbf1c5136d7cf
Pat Gavlin [Wed, 7 Dec 2016 23:16:09 +0000 (15:16 -0800)]
Merge pull request dotnet/coreclr#8505 from pgavlin/VSO297215
Use a left-leaning comma tree when morphing a stelem.ref helper.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bea2a8cf3d1ffe90683c47758f27f7cc83850982
Brian Sullivan [Wed, 7 Dec 2016 22:54:55 +0000 (14:54 -0800)]
Enable POGO build and link for CodegenMirror
[tfs-changeset: 1640669]
Commit migrated from https://github.com/dotnet/coreclr/commit/
1e7a3ece5f580834921703438e8b68724d681c78
Jan Kotas [Wed, 7 Dec 2016 21:13:35 +0000 (13:13 -0800)]
Merge pull request dotnet/coreclr#8504 from mikedn/sort-comparison
Change ArraySortHelper to use Comparison<T>
Commit migrated from https://github.com/dotnet/coreclr/commit/
2d888b52df39e32e5f1c3e92ace9824deb0c8a82
Carol Eidt [Wed, 7 Dec 2016 19:28:30 +0000 (11:28 -0800)]
Merge pull request dotnet/coreclr#8482 from CarolEidt/Fix8220
Use only lower floats for Vector3 dot and equality
Commit migrated from https://github.com/dotnet/coreclr/commit/
4d35a3a3dba0a4d2fc17e7b31dab87d8ac9b81dc
Sivarv [Wed, 7 Dec 2016 18:39:06 +0000 (10:39 -0800)]
Merge pull request dotnet/coreclr#8488 from sivarv/upperSave
Fix to issue 8356.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d926c5949d4fbf541e9cefbcf627967f318d67b
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
83a0f89cc1f0fcbe96a16299f5acc6b88c1a9f56
Pat Gavlin [Wed, 7 Dec 2016 18:17:44 +0000 (10:17 -0800)]
Merge pull request dotnet/coreclr#8503 from pgavlin/VSO289704
Remove a use of `gtGetOp` in earlyprop.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3895a36ed7387041ebb6dd677c7aa266e44e02f
Mike Danes [Wed, 7 Dec 2016 18:04:38 +0000 (20:04 +0200)]
Remove unused DepthLimitedQuickSort methods
These are never used in CoreCLR
Commit migrated from https://github.com/dotnet/coreclr/commit/
e8946fbb3463b598a3f55e968d26cc7c2be6b98b
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1cf86165849ffb0ab909078ef09f124f898f0461
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
95de3a09c7adca51e1f56eb295cfb1b6e26801db
Evgeny Pavlov [Wed, 7 Dec 2016 16:48:30 +0000 (19:48 +0300)]
[x86/Linux][SOS] Get correct stack pointer from DT_CONTEXT (dotnet/coreclr#8500)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ae3df538d3e36ee9d51a47ce6eb8d9c5c08a1008
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 dotnet/coreclr#8220
Commit migrated from https://github.com/dotnet/coreclr/commit/
0403e4d81f67a9abe61bf8637deff85b971381b7
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 (dotnet/coreclr#8499)
Commit migrated from https://github.com/dotnet/coreclr/commit/
aa6cbc6e994298697900877636c34095bceeebc9
Jonghyun Park [Wed, 7 Dec 2016 09:54:54 +0000 (18:54 +0900)]
Move JIT_EndCatch from asmhelpers.asm into jithelp.asm (dotnet/coreclr#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
Commit migrated from https://github.com/dotnet/coreclr/commit/
eb582352acec56cc9744cae32a34900d6de987ea
Jonghyun Park [Wed, 7 Dec 2016 06:37:07 +0000 (15:37 +0900)]
[x86/Linux] Port StubLinkerCPU::EmitSetup (dotnet/coreclr#8494)
This commit ports StubLinkerCPU::EmitSetup to x86/Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
375948e39cf1a946b3d8048ca51cd4e548f94648
Brian Robbins [Wed, 7 Dec 2016 05:14:38 +0000 (21:14 -0800)]
Merge pull request dotnet/coreclr#8470 from brianrob/fix_lttng_header_detection
Fix building against liblttng-ust-dev 2.8+
Commit migrated from https://github.com/dotnet/coreclr/commit/
805363de5e8cdfa407a7fafcd4d53bb8733db887
Jonghyun Park [Wed, 7 Dec 2016 03:46:17 +0000 (12:46 +0900)]
[x86/Linux] Port asmhelpers.asm (dotnet/coreclr#8489)
This commit ports asmhelpers.asm to x86/Linux.
(CallRtlUnwind is currently marked as NYI)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c28ec8cd8b5ea4755f471f2e0d9836520735ffab
Jonghyun Park [Wed, 7 Dec 2016 03:41:44 +0000 (12:41 +0900)]
[x86/Linux] Port PATCH_LABEL macro (dotnet/coreclr#8483)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b490ed0122670c0764a8e5aa529a4a50e074090e
Swaroop Sridhar [Wed, 7 Dec 2016 01:17:21 +0000 (17:17 -0800)]
GcInfoEncoder: Initialize the BitArrays tracking liveness (dotnet/coreclr#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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
12c3a063686c0c4f718a45c42480c4db04abeba7
Pat Gavlin [Wed, 7 Dec 2016 01:01:50 +0000 (17:01 -0800)]
Merge pull request dotnet/coreclr#8484 from pgavlin/VSO297113
Fix use edge iterator for DYN_BLK nodes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
41a92a370ef131be63ecb55105945ced0546fd83
sivarv [Wed, 7 Dec 2016 00:19:55 +0000 (16:19 -0800)]
Fix to issue 8356.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bdfe0ed89115ab8b52e7450c607701f5d6e31e75
Brian Robbins [Mon, 5 Dec 2016 04:16:29 +0000 (20:16 -0800)]
Fix building against liblttng-ust-dev 2.8+
Commit migrated from https://github.com/dotnet/coreclr/commit/
cb2b31a94d817cadac14c421bc90739bd66e1bb2
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bdcf7fbde9aa473799b02c1ae4d61a463e67f7b8
Carol Eidt [Tue, 6 Dec 2016 22:31:09 +0000 (14:31 -0800)]
Merge pull request dotnet/coreclr#8466 from CarolEidt/Fix297074
Create Blk node for struct vararg
Commit migrated from https://github.com/dotnet/coreclr/commit/
cc4bbf63fe9ffe21237eb7c44f354911df90edf3
Brian Sullivan [Tue, 6 Dec 2016 21:30:32 +0000 (13:30 -0800)]
Merge pull request dotnet/coreclr#8467 from briansull/vso-287663
Don't change a GT_DYN_BLK into a GT_BLK when the size is zero
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e0d836504e73f3d39701c0287893de9affe668b
Andy Ayers [Tue, 6 Dec 2016 19:12:30 +0000 (11:12 -0800)]
Merge pull request dotnet/coreclr#8263 from AndyAyersMS/InlineInlinePinvoke
JIT: enable inline pinvoke in more cases
Commit migrated from https://github.com/dotnet/coreclr/commit/
3de39408dc7f98c55c8ec0a9e4e79f6228642853
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
Commit migrated from https://github.com/dotnet/coreclr/commit/
1e046fe3f79d4f352a36706cdb9a32a62af2339d
Pat Gavlin [Tue, 6 Dec 2016 17:14:06 +0000 (09:14 -0800)]
Merge pull request dotnet/coreclr#8464 from pgavlin/VSO297109
x86: Deactivate P/Invoke frames after a native call.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b19ac36f62620eac435e50993f36a8713a0aaf44
Pat Gavlin [Tue, 6 Dec 2016 17:01:36 +0000 (09:01 -0800)]
Address PR feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
344da95319273c239162a0ac9c0d6ab590be7e77
Evgeny Pavlov [Tue, 6 Dec 2016 14:42:44 +0000 (17:42 +0300)]
[x86/Linux][SOS] Fix DataTarget::GetPointerSize for x86 (dotnet/coreclr#8473)
Commit migrated from https://github.com/dotnet/coreclr/commit/
061fba83ca43a5f10b91380582c07b9a5d3af26c
Evgeny Pavlov [Tue, 6 Dec 2016 14:42:15 +0000 (17:42 +0300)]
[x86/Linux][SOS] Disable ARM target support for xplat (dotnet/coreclr#8471)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e938d038c8afd856825944378301350cb261a795
SaeHie Park [Tue, 6 Dec 2016 09:22:30 +0000 (18:22 +0900)]
[x86/Linux] Fix Dacp structure size mismatch (dotnet/coreclr#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
Commit migrated from https://github.com/dotnet/coreclr/commit/
e3da0c0b895790d2b0dc94e2ca69b66f9d4476e2
Jonghyun Park [Tue, 6 Dec 2016 09:22:14 +0000 (18:22 +0900)]
Extract ARRAYSTUBS_AS_IL code from STUBS_AS_IL region (dotnet/coreclr#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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7baf52ee8d079fd41a306fcc3a195199f50f85d3
Carol Eidt [Tue, 6 Dec 2016 07:42:39 +0000 (23:42 -0800)]
Merge pull request dotnet/coreclr#8463 from CarolEidt/Fix288220
Allow remorph of SIMD assignment
Commit migrated from https://github.com/dotnet/coreclr/commit/
a04f79c64c92cd309ca0196833a851510d88303e
Jonghyun Park [Tue, 6 Dec 2016 01:58:32 +0000 (10:58 +0900)]
[x86/Linux] Fix exception handling routine (dotnet/coreclr#8433)
* [x86/Linux] Fix exception handling routine
DispatchManagedException requires WIN64EXCEPTIONS to be defined, but it
is not defined for x86/Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7b92136d5ee99e10b2a7fa843a1fbf5cc76be6ee
Jonghyun Park [Tue, 6 Dec 2016 01:57:52 +0000 (10:57 +0900)]
[x86/Linux] Revise COMPlusThrowCallback (dotnet/coreclr#8430)
GetCallerToken and GetImpersonationToken methods in FrameSecurityDescriptorBaseObject
are implemented only for Windows-platform.
Commit migrated from https://github.com/dotnet/coreclr/commit/
910209a77d3311f845c535023d49b409d90e63ef
Jonghyun Park [Tue, 6 Dec 2016 01:56:58 +0000 (10:56 +0900)]
[x86/Linux] Fix unknown pragma build error (dotnet/coreclr#8427)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6c1b9cc682eccae1e655d8037f06c0f516f2f90b
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fa073a025ee20c87cee3e477a4676013881a6f75
Drew Scoggins [Tue, 6 Dec 2016 01:19:53 +0000 (19:19 -0600)]
Merge pull request dotnet/coreclr#8468 from DrewScoggins/LinuxPerfFixup
Fix calls to curl in prep script
Commit migrated from https://github.com/dotnet/coreclr/commit/
fd976d67c775ea4820279bfd7236c42b06b1d774
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d6615c8a205060dfc5da6e87b81478ef10747fb
Jonghyun Park [Tue, 6 Dec 2016 01:01:57 +0000 (10:01 +0900)]
[x86/Linux] Port gmsasm.asm (dotnet/coreclr#8456)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ea8387f07031f42708e419a5629c53d7fbf384d7
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 (dotnet/coreclr#8424)
* Mark several Windows-specific functions as NYI
* Use FEATURE_PAL instead of PLATFORM_UNIX
* Revert the change in threads.h
Commit migrated from https://github.com/dotnet/coreclr/commit/
61ffc9f3fbf80a6b8a04eb2674b057c6cce465f0
Jonghyun Park [Tue, 6 Dec 2016 00:37:41 +0000 (09:37 +0900)]
Add UnhandledExceptionHandlerUnix Stub (dotnet/coreclr#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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4e21d57d09174addc4900b64a23d15b3b62de02d
Sivarv [Tue, 6 Dec 2016 00:28:37 +0000 (16:28 -0800)]
Merge pull request dotnet/coreclr#8461 from sivarv/shiftFix
Compare opt against zero involving a shift oper.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1c8d3d9d61542801be93044ba993860cd7c9f61c
Drew Scoggins [Tue, 6 Dec 2016 00:12:42 +0000 (18:12 -0600)]
Merge pull request dotnet/coreclr#8195 from DrewScoggins/LinuxPerfAuto
Add Linux perf support to Jenkins
Commit migrated from https://github.com/dotnet/coreclr/commit/
5c1caba131a85b729ce5f566b09094f5978b587a
Jonghyun Park [Mon, 5 Dec 2016 23:58:20 +0000 (08:58 +0900)]
[x86/Linux] Enclose ArrayOpStub Exceptions with FEATURE_ARRAYSTUB_AS_IL (dotnet/coreclr#8445)
* Enclose ArrayOpStub Exceptions with FEATURE_ARRAYSTUB_AS_IL
* Fix unmatched ifdef
* Fix unmatched ifdef
Commit migrated from https://github.com/dotnet/coreclr/commit/
23eaa4756468d89b84c6d2efc9be38a3f1f63c81
SaeHie Park [Mon, 5 Dec 2016 23:54:51 +0000 (08:54 +0900)]
[x86/Linux] Fix no known conversion from 'void ()' to 'void *' (dotnet/coreclr#8450)
Fix compile error for x86/Linux
- this will fix "no known conversion from 'void ()' to 'void *'" for "CallRtlUnwindSafe"
- for compiler clang 3.8
Commit migrated from https://github.com/dotnet/coreclr/commit/
fdc4efd22703b5fa0cd52882b0cf4568a0f7708a
Jonghyun Park [Mon, 5 Dec 2016 23:54:41 +0000 (08:54 +0900)]
[x86/Linux] add a stub for THROW_CONTROL_FOR_THREAD_FUNCTION (dotnet/coreclr#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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
528508ccee9925c663ef86fd842d60883760db02
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4fa21337c75284fec6eec6f77e9201643819e2e6
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
70e11ac7dc21b095e10cd0fb91c8cd3245e83cde
sivarv [Mon, 5 Dec 2016 19:59:57 +0000 (11:59 -0800)]
Compare opt against zero involving a shift oper.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b22b27b984545259d139e6ff8b8e85e9f067251c
Jeremy Kuhne [Mon, 5 Dec 2016 22:42:51 +0000 (14:42 -0800)]
Copy CoreFX environment variable code (dotnet/coreclr#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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e06afa73cc284c6659a03eb475eb426d08938e77
Bruce Forstall [Mon, 5 Dec 2016 22:33:27 +0000 (14:33 -0800)]
Merge pull request dotnet/coreclr#8109 from BruceForstall/FixSimd12NYI
RyuJIT/x86: Implement TYP_SIMD12 support
Commit migrated from https://github.com/dotnet/coreclr/commit/
44a7d097a38c4ed33b633bf422eb2b79a12e38dd
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
90c0d32ffd9eab3383f4f9a59b5e58c8ab79fb0b
Andy Ayers [Mon, 5 Dec 2016 20:24:56 +0000 (12:24 -0800)]
Incorporate changes from Jan's dotnet/coreclr#8437, plus review feedback.
Still honoring windows exception interop restrictions on all platforms
and runtimes. Will revisit when addressing dotnet/coreclr#8459.
Commit migrated from https://github.com/dotnet/coreclr/commit/
050fec8fcb11af35bf1a593613a759e8d0f33469
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 dotnet/coreclr#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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
043fe32b7489952a62b2cb0cbe41de86895075a3
Ian Hays [Mon, 5 Dec 2016 20:57:09 +0000 (12:57 -0800)]
Merge pull request dotnet/coreclr#8306 from jamesqo/better-bulk-add
Better bulk adds for List.
Commit migrated from https://github.com/dotnet/coreclr/commit/
78d2ea048edbd86de9e9a510c3f3ec7789c44fe8
Jonghyun Park [Mon, 5 Dec 2016 20:41:00 +0000 (05:41 +0900)]
[x86/Linux] Re-enable FrameHandlerExRecord for x86/Linux (dotnet/coreclr#8409)
* Re-enable FrameHandlerExRecord for x86/Linux
* Use _TARGET_X86_ instead of WIN64EXCEPTIONS
Commit migrated from https://github.com/dotnet/coreclr/commit/
493132ca95fdfc1fe380e92882122e81230db217
Jonghyun Park [Mon, 5 Dec 2016 20:29:56 +0000 (05:29 +0900)]
[x86/Linux] Fix dangling ClrCaptureContext (dotnet/coreclr#8453)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c7a649255975920b8aaba2a7048823ca17384067
Jonghyun Park [Mon, 5 Dec 2016 20:20:53 +0000 (05:20 +0900)]
Fix dangling StubLinkerCPU::EmitDelegateInvoke in x86/Linux (dotnet/coreclr#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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
14bcf6ddf93ae4f7e897e219aaa8c0e43bb99415
Jonghyun Park [Mon, 5 Dec 2016 20:08:33 +0000 (05:08 +0900)]
[x86/Linux] Enclose stub-linking methods with FEATURE_STUBS_AS_IL (dotnet/coreclr#8432)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0c952dcef303e2ee80e892bca7bf5d0950e225cd
Jonghyun Park [Mon, 5 Dec 2016 20:06:49 +0000 (05:06 +0900)]
[x86/Linux] Fix dangling CLR_ImpersonateLoggedOnUser reference (dotnet/coreclr#8435)
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
46483e11a314a167eecc557ef3f246dcc95bee99
Hyeongseok Oh [Mon, 5 Dec 2016 18:55:40 +0000 (03:55 +0900)]
Fix runtest.sh: delete ni file and lock correctly (dotnet/coreclr#8081)
Commit migrated from https://github.com/dotnet/coreclr/commit/
55b1bb4e35807220a48391548238e29b075102bb
Jonghyun Park [Mon, 5 Dec 2016 12:20:32 +0000 (21:20 +0900)]
[x86/Linux] Mark LeaveCatch as NYI (dotnet/coreclr#8384)
* Disable LeaveCatch for non-Windows platforms
* Mark LeaveCatch as NYI
* Use #ifndef as before
Commit migrated from https://github.com/dotnet/coreclr/commit/
75a625faaddcd45b5ab396019dc1623dfe3b35c1
SaeHie Park [Mon, 5 Dec 2016 08:04:41 +0000 (17:04 +0900)]
[x86/Linux] Fix all paths through this function will call itself (dotnet/coreclr#8451)
Fix compile error for x86/Linux
- disable "infinite-recursion" for "recursiveFtn" function
- only for clang
Commit migrated from https://github.com/dotnet/coreclr/commit/
7200e78258623eb889a46aa7a90818046bd1957d
Jonghyun Park [Mon, 5 Dec 2016 08:02:25 +0000 (17:02 +0900)]
[x86/Linux] Use Portable LMul JIT Helper (dotnet/coreclr#8449)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3891c5f681eccd262f1ccca4bfa34a582573ce1d
SaeHie Park [Mon, 5 Dec 2016 07:45:38 +0000 (16:45 +0900)]
[x86/Linux] Fix indirection of non-volatile null pointer will be deleted (dotnet/coreclr#8452)
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
Commit migrated from https://github.com/dotnet/coreclr/commit/
9f84a04da21622944a96b2e77d3330910f5af263
Jonghyun Park [Mon, 5 Dec 2016 07:37:17 +0000 (16:37 +0900)]
Use Portable Floating-point Arithmetic Helpers (dotnet/coreclr#8447)
This commit enables portable floating-point arithmetic helpers for
x86/Linux build.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fdc9e6c0397a28cdbbd28f10ee55494387498fbc
Jonghyun Park [Mon, 5 Dec 2016 07:35:52 +0000 (16:35 +0900)]
[x86/Linux] Fix dangling DoubleToNumber and NumberToDouble (dotnet/coreclr#8446)
This commit enables portable DoubleToNumber and NumberToDouble for
x86/Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
933073140a0a7ca1f83084943e7516015f7e2ae8
Jon Hanna [Mon, 5 Dec 2016 07:22:10 +0000 (07:22 +0000)]
Fix several misspellings of exception and "a exception". (dotnet/coreclr#8442)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e5946c901f3f82f668ee4322b300f195c43cecaf
Jonghyun Park [Mon, 5 Dec 2016 07:19:41 +0000 (16:19 +0900)]
[x86/Linux] Revert UMThkCallFrame-related changes (dotnet/coreclr#8434)
* [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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6ed21c52f25243b7cc1c64b19a47bbd4beb69314
Jonghyun Park [Mon, 5 Dec 2016 07:15:41 +0000 (16:15 +0900)]
[x86/Linux] Fix unused function warning (dotnet/coreclr#8429)
* Delete the unused code
Commit migrated from https://github.com/dotnet/coreclr/commit/
7f533e516a5b0f8fd83bc616cd9241e294d24aaf
Sean Gillespie [Mon, 5 Dec 2016 04:02:21 +0000 (20:02 -0800)]
Ensure MSBuild properties get persisted to child MSBuild tasks, fixes a race condition in the build (dotnet/coreclr#8404)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b51bcf1dafdb2d726e3203db5535794bbc193295
Bruce Forstall [Mon, 14 Nov 2016 03:35:32 +0000 (19:35 -0800)]
RyuJIT/x86: Implement TYP_SIMD12 support
There is no native load/store instruction for Vector3/TYP_SIMD12,
so we need to break this type down into two loads or two stores,
with an additional instruction to put the values together in the
xmm target register. AMD64 SIMD support already implements most of
this. For RyuJIT/x86, we need to implement stack argument support
(both incoming and outgoing), which is different from the AMD64 ABI.
In addition, this change implements accurate alignment-sensitive
codegen for all SIMD types. For RyuJIT/x86, the stack is only 4
byte aligned (unless we have double alignment), so SIMD locals are
not known to be aligned (TYP_SIMD8 could be with double alignment).
For AMD64, we were unnecessarily pessimizing alignment information,
and were always generating unaligned moves when on AVX2 hardware.
Now, all SIMD types are given their preferred alignment in
getSIMDTypeAlignment() and alignment determination in
isSIMDTypeLocalAligned() takes into account stack alignment (it
still needs support for x86 dynamic alignment). X86 still needs to
consider dynamic stack alignment for SIMD locals.
Fixes dotnet/coreclr#7863
Commit migrated from https://github.com/dotnet/coreclr/commit/
e401df83de9a4f135e71ca2ab06eff19c112a881
Jonghyun Park [Fri, 2 Dec 2016 11:14:24 +0000 (20:14 +0900)]
[x86/Linux] fix several parentheses compile warnings (dotnet/coreclr#8428)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a0a055ba3cf8265055a37a14f206e9e30836bc18
Jan Kotas [Fri, 2 Dec 2016 11:06:55 +0000 (03:06 -0800)]
Introduce CORINFO_EH_CLAUSE_SAMETRY flag for CoreRT ABI (dotnet/coreclr#8422)
CORINFO_EH_CLAUSE_SAMEBLOCK flag is returned on mutually protecting EH clauses for CoreRT ABI. It is set on EH clauses that cover same try block as the previous one. The runtime cannot reliably infer this information from native code offsets without full description of duplicate clauses because of different try blocks can have same offsets. Alternative solution to this problem would be inserting extra nops to ensure that different try blocks have different offsets.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fcc57b23e2f2072e07d69154faab61f7d52e594b
Jan Kotas [Fri, 2 Dec 2016 04:54:11 +0000 (20:54 -0800)]
Merge pull request dotnet/coreclr#8419 from jkotas/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24801-03, beta-24721-02, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
cb4ac230e8d0a55a7a972fa7e433703fc25629f1
Jan Kotas [Thu, 1 Dec 2016 21:34:08 +0000 (13:34 -0800)]
Disable test against dotnet/coreclr#8418 to unblock corefx updates
Commit migrated from https://github.com/dotnet/coreclr/commit/
28e4d0d2422cd88839944686c550529904915b5b
Jonghyun Park [Fri, 2 Dec 2016 02:48:52 +0000 (11:48 +0900)]
[x86/Linux] Use portable JIT helpers (dotnet/coreclr#8392)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3e5eb34d820637c584976ba37d7d0ec02565fa2
Jonghyun Park [Fri, 2 Dec 2016 01:01:29 +0000 (10:01 +0900)]
[x86/Linux] Disable Watson-related code for non-Windows platforms (dotnet/coreclr#8410)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1a1da83f1750c45cfe6e62080608f328d9b36978
Jonghyun Park [Fri, 2 Dec 2016 00:58:37 +0000 (09:58 +0900)]
[x86/Linux] Add Portable PopSEHRecords as NYI (dotnet/coreclr#8412)
Commit migrated from https://github.com/dotnet/coreclr/commit/
731bb02df3aa410d69641226364fb52c3567faba
Jonghyun Park [Fri, 2 Dec 2016 00:57:46 +0000 (09:57 +0900)]
Resolve duplicated functions (dotnet/coreclr#8413)
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7c1fb28db6cd0e0bdd83494054d743a30c3287b6
Jonghyun Park [Fri, 2 Dec 2016 00:55:18 +0000 (09:55 +0900)]
[x86/Linux] Adjust the definition of FnStaticBaseHelper for x86 (dotnet/coreclr#8390)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8d800dfe9c0461a4b60df076b5e71149c1748a0d
Bruce Forstall [Thu, 1 Dec 2016 19:04:55 +0000 (11:04 -0800)]
Merge pull request dotnet/coreclr#8414 from BruceForstall/FixSimdRegressions
Fix recent x86 SIMD regressions
Commit migrated from https://github.com/dotnet/coreclr/commit/
eed8ab262a5a47643e26f35b2c529f71f2d0c9a8
dotnet-bot [Thu, 1 Dec 2016 17:36:24 +0000 (17:36 +0000)]
Update CoreClr, CoreFx to beta-24801-03, beta-24721-02, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
cbed6c3609c5959f018ec05b4b64361e556694bf
Phil Christensen [Thu, 1 Dec 2016 11:53:23 +0000 (03:53 -0800)]
fix permissive C++ code (MSVC /permissive-) (dotnet/coreclr#8337)
* 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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
20275aa647c5733bc5b1929cba3fd1094c67fb1d
Jonghyun Park [Thu, 1 Dec 2016 10:57:07 +0000 (19:57 +0900)]
Re-enable UMThkCallFrame and fix compile errors (dotnet/coreclr#8411)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3f4680c80dc510a96efa322054145a807480bab7
Jonghyun Park [Thu, 1 Dec 2016 10:52:25 +0000 (19:52 +0900)]
Fix build error in ARM64 code (dotnet/coreclr#8407)
CONTEXT struct for ARM64 does not contain X29 field.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6aa53dc3703b49dba774f3c1ea1e988a85e69274
Jonghyun Park [Thu, 1 Dec 2016 09:24:32 +0000 (18:24 +0900)]
Add EXCEPTION_REGISTRATION_RECORD for x86/Linux (dotnet/coreclr#8408)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d06220f50d7cc05424aeecb0eee990abb522d37b
Bruce Forstall [Thu, 1 Dec 2016 08:15:53 +0000 (00:15 -0800)]
Fix recent x86 SIMD regressions
1. Recent PUTARG_STK work didn't consider SIMD arguments.
2. SSE3_4 work caused underestimation of instruction sizes for SSE4
instructions (e.g., pmulld).
Commit migrated from https://github.com/dotnet/coreclr/commit/
76390e45acb3aa5379d56cceb6f54f9555f96181
Alex Ghiondea [Thu, 1 Dec 2016 07:52:29 +0000 (23:52 -0800)]
Remove the BinaryCompatibility class as it is not useful on .NET Core… (dotnet/coreclr#8396)
* Remove the BinaryCompatibility class as it is not useful on .NET Core and creates issues on Debug builds when the TFM on the AppDomain is not recognized.
* Update the code for DateTimeFormatInfo to not use BinaryCompatibility
* Remove initialization of preferExistingTokens now that we removed its usage
Commit migrated from https://github.com/dotnet/coreclr/commit/
eca37b41de5cf03681c510aa9f94577c76aa2c26
Jan Vorlicek [Thu, 1 Dec 2016 07:51:52 +0000 (08:51 +0100)]
Add printing managed assert message to console (dotnet/coreclr#8399)
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
32d03bb66a51c7ed6712c4cdd319de0cc7cbbf37
Jan Kotas [Thu, 1 Dec 2016 05:52:35 +0000 (21:52 -0800)]
Skip emitting duplicate clauses for CoreRT (dotnet/coreclr#8400)
Fixes https://github.com/dotnet/corert/issues/2262
Commit migrated from https://github.com/dotnet/coreclr/commit/
746d0330e19a764c4d23160e56e8a281335b8e56
Jonghyun Park [Thu, 1 Dec 2016 02:26:08 +0000 (11:26 +0900)]
Add parentheses aroung logical operations (dotnet/coreclr#8406)
This commit fixes logical-op-parentheses compile error for x86/Linux build.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4e17522078fd30bcc4e83a43c03a673a1f98eee1
Jan Kotas [Thu, 1 Dec 2016 01:16:45 +0000 (17:16 -0800)]
Merge pull request dotnet/coreclr#8209 from stephentoub/arraypool_perf
Improve ArrayPool implementation and performance
Commit migrated from https://github.com/dotnet/coreclr/commit/
32e6bf8b03aafe84e6d24e0c36a65dd18d2054ed
Bruce Forstall [Thu, 1 Dec 2016 00:47:24 +0000 (16:47 -0800)]
Merge pull request dotnet/coreclr#8382 from BruceForstall/FixShift
Fix x86 encoder to use 64-bit type to accumulate opcode/prefix bits
Commit migrated from https://github.com/dotnet/coreclr/commit/
392748e2df331ca3cfb9f7b08655f2a4379fc527