platform/upstream/dotnet/runtime.git
7 years agoFix _our_GetThreadCycles for clang/xarch.
Pat Gavlin [Sat, 25 Feb 2017 18:09:00 +0000 (10:09 -0800)]
Fix _our_GetThreadCycles for clang/xarch.

The `"=A"` constraint in `asm volatile("rdtsc" : "=A"(cycles))` does not work as expected
on AMD64. Instead, the assembly must use an output constraint for both `eax` and `edx`
(i.e. `=a"(lo), "=d"(hi)`).

Commit migrated from https://github.com/dotnet/coreclr/commit/6be8d477451eb69861cd000330990487ffa4fcc6

7 years ago[Linux/ARM,ARM64] Fix undefined FixContextHandler issue (dotnet/coreclr#9755)
Jonghyun Park [Fri, 24 Feb 2017 14:48:58 +0000 (23:48 +0900)]
[Linux/ARM,ARM64] Fix undefined FixContextHandler issue (dotnet/coreclr#9755)

Commit migrated from https://github.com/dotnet/coreclr/commit/3392356945aabd5a3ebac5317ff4a0e0361dc9ad

7 years agoFix segmentation fault when using ZapImage::PrintStats() (dotnet/coreclr#9731)
Sujin Kim [Fri, 24 Feb 2017 14:43:15 +0000 (23:43 +0900)]
Fix segmentation fault when using ZapImage::PrintStats() (dotnet/coreclr#9731)

Currently, ZapImage::PrintStats is not used anywhere. But I want to get detailed informations about Native Image(ni.dll) components.
So I just used ZapImage::PrintStats when called ZapImage::SaveImage. After that I met the segmentation fault likes dotnet/coreclr#9680.

I found the reason for this issue is accessing the null pointer to get sizes.

Commit migrated from https://github.com/dotnet/coreclr/commit/e876e8147d06a213f562021a4d02a5a60ba63c99

7 years agotypo in CMakeLists.txt (dotnet/coreclr#9763)
John Gorter [Fri, 24 Feb 2017 14:41:42 +0000 (15:41 +0100)]
typo in CMakeLists.txt (dotnet/coreclr#9763)

Commit migrated from https://github.com/dotnet/coreclr/commit/7716164c1d69b10b32a46060ec55d17d77ff5bd8

7 years agoMerge pull request dotnet/coreclr#9738 from stephentoub/ordinalignorecase_hashing
Stephen Toub [Fri, 24 Feb 2017 12:43:36 +0000 (07:43 -0500)]
Merge pull request dotnet/coreclr#9738 from stephentoub/ordinalignorecase_hashing

Tweak OrdinalComparer for OrdinalIgnoreCase

Commit migrated from https://github.com/dotnet/coreclr/commit/9d066ad753629d57d1d263851d6d6c7bd1674e9c

7 years ago[x86/Linux] Initial patch for EH funclet (dotnet/coreclr#9601)
Hanjoung Lee [Fri, 24 Feb 2017 07:02:21 +0000 (16:02 +0900)]
[x86/Linux] Initial patch for EH funclet (dotnet/coreclr#9601)

- Generate a simple EH funclet frame and support SP-based stack unwinding for funclets.
- Introduce assembly helpers : CallEHFunclet and CallEHFilterFunclet

Commit migrated from https://github.com/dotnet/coreclr/commit/77f2ad4c07b24fcfe1298dd7cd260876ef46e6c3

7 years agoMerge pull request dotnet/coreclr#9758 from seanshpark/fixx86break
Bruce Forstall [Fri, 24 Feb 2017 06:34:58 +0000 (22:34 -0800)]
Merge pull request dotnet/coreclr#9758 from seanshpark/fixx86break

Fix build break for !FEATURE_FIXED_OUT_ARGS

Commit migrated from https://github.com/dotnet/coreclr/commit/687e0fbfe1b753653968308d1cd17c079c5a87fc

7 years agoMerge pull request dotnet/coreclr#9723 from fiigii/is4byte
Sivarv [Fri, 24 Feb 2017 04:35:39 +0000 (20:35 -0800)]
Merge pull request dotnet/coreclr#9723 from fiigii/is4byte

Simplify and streamline Is4ByteAVXInstruction() and Is4ByteSSE4Instruction() functions

Commit migrated from https://github.com/dotnet/coreclr/commit/93c35cd5dd3ee76460ec31948f0d4d222cdbe70d

7 years agoAddress PR feedback
Stephen Toub [Thu, 23 Feb 2017 18:15:27 +0000 (13:15 -0500)]
Address PR feedback

Commit migrated from https://github.com/dotnet/coreclr/commit/109feb786bf010b2c34a78e6219be763656c9e65

7 years agoImprove CompareOrdinalIgnoreCaseHelper by removing return from loop
Stephen Toub [Thu, 23 Feb 2017 16:25:03 +0000 (11:25 -0500)]
Improve CompareOrdinalIgnoreCaseHelper by removing return from loop

Commit migrated from https://github.com/dotnet/coreclr/commit/d2eed087d4e74361ef7fe71bc7b10e1d8a3edc26

7 years agoStrongly type StringComparer static comparer fields
Stephen Toub [Thu, 23 Feb 2017 16:37:23 +0000 (11:37 -0500)]
Strongly type StringComparer static comparer fields

Commit migrated from https://github.com/dotnet/coreclr/commit/4e85fdd61991a898f2bd208df929a005c26b8805

7 years agoSplit OrdinalIgnoreCaseComparer from OrdinalComparer
Stephen Toub [Thu, 23 Feb 2017 14:28:30 +0000 (09:28 -0500)]
Split OrdinalIgnoreCaseComparer from OrdinalComparer

They're both used very frequently, and we can eliminate the branches on checking _ignoreCase from every operation.

Commit migrated from https://github.com/dotnet/coreclr/commit/a15b54477fb9503d2787b751e2c0b25c12becf37

7 years agoReject byref-like object in FormatterServices.GetUninitializedObject (dotnet/coreclr...
Jan Kotas [Fri, 24 Feb 2017 02:51:03 +0000 (18:51 -0800)]
Reject byref-like object in FormatterServices.GetUninitializedObject (dotnet/coreclr#9754)

Fixes dotnet/coreclr#9739

Commit migrated from https://github.com/dotnet/coreclr/commit/5957f2dde0f90c2bdaa4f0a83339c87140cc657b

7 years ago[x86/Linux] Enable FEATURE_ARRAYSTUB_AS_IL (dotnet/coreclr#9752)
Jonghyun Park [Fri, 24 Feb 2017 02:01:10 +0000 (11:01 +0900)]
[x86/Linux] Enable FEATURE_ARRAYSTUB_AS_IL (dotnet/coreclr#9752)

* [x86/Linux] Enable FEATURE_ARRAYSTUB_AS_IL
* Move FeatureStubsAsIL into Windows-specific block

Commit migrated from https://github.com/dotnet/coreclr/commit/70b21c84b90aa2c37bb7366ea175f59a03512ae4

7 years agoFix build break for !FEATURE_FIXED_OUT_ARGS
SaeHie Park [Fri, 24 Feb 2017 01:03:26 +0000 (10:03 +0900)]
Fix build break for !FEATURE_FIXED_OUT_ARGS

Commit migrated from https://github.com/dotnet/coreclr/commit/3f21d76a5466838accb8e15cfa9c55a89743adf2

7 years agoMerge pull request dotnet/coreclr#9681 from mskvortsov/ryujit-arm32-reload
Bruce Forstall [Fri, 24 Feb 2017 01:03:58 +0000 (17:03 -0800)]
Merge pull request dotnet/coreclr#9681 from mskvortsov/ryujit-arm32-reload

[RyuJIT/ARM32] Fix helper kill mask and call target consuming

Commit migrated from https://github.com/dotnet/coreclr/commit/f9749b431bf74c00b7e346a1f2e80e2032fd2b21

7 years agoUse GetSystemTimePreciseAsFileTime if available in DateTime.UtcNow (dotnet/coreclr...
Stephen Toub [Fri, 24 Feb 2017 00:43:58 +0000 (19:43 -0500)]
Use GetSystemTimePreciseAsFileTime if available in DateTime.UtcNow (dotnet/coreclr#9736)

Commit migrated from https://github.com/dotnet/coreclr/commit/5ec5c2f859f8ff1dc99a2bb95b640b82d2937cc8

7 years agoMerge pull request dotnet/coreclr#9717 from tannergooding/math-intrinsics2
Tanner Gooding [Fri, 24 Feb 2017 00:36:20 +0000 (16:36 -0800)]
Merge pull request dotnet/coreclr#9717 from tannergooding/math-intrinsics2

Updating codegenxarch to support single-precision CORINFO_INTRINSIC_Sqrt

Commit migrated from https://github.com/dotnet/coreclr/commit/6e494d0068d17b3692c88ab4247ca3c607a9b618

7 years agoMerge pull request dotnet/coreclr#9742 from sivarv/singleField
Sivarv [Fri, 24 Feb 2017 00:08:41 +0000 (16:08 -0800)]
Merge pull request dotnet/coreclr#9742 from sivarv/singleField

Enable promotion of structs containing fields of structs with a single pointer-sized scalar type field.

Commit migrated from https://github.com/dotnet/coreclr/commit/d3ee9301e88c6fea43072ac59fc451c7685a872a

7 years agoMerge pull request dotnet/coreclr#9748 from AndyAyersMS/FixJitTestDir
Andy Ayers [Fri, 24 Feb 2017 00:08:23 +0000 (16:08 -0800)]
Merge pull request dotnet/coreclr#9748 from AndyAyersMS/FixJitTestDir

Move jit tests to directory with proper casing

Commit migrated from https://github.com/dotnet/coreclr/commit/4def9e5bd59029fe9f84a260268ba12c25b5fb83

7 years agoMerge pull request dotnet/coreclr#9726 from alexperovich/codeFormat
Alex Perovich [Thu, 23 Feb 2017 23:20:04 +0000 (17:20 -0600)]
Merge pull request dotnet/coreclr#9726 from alexperovich/codeFormat

Run dotnet/codeformatter on S.P.CoreLib sources.

Commit migrated from https://github.com/dotnet/coreclr/commit/68f72dd2587c3365a9fe74d1991f93612c3bc62a

7 years agoAdd jit test project checker as jit test (dotnet/coreclr#9721)
Andy Ayers [Thu, 23 Feb 2017 22:53:00 +0000 (14:53 -0800)]
Add jit test project checker as jit test (dotnet/coreclr#9721)

Add the tool used to fix/repair projects as a test case. It will
fail with an error code if any project file in the jit test subtree
needs fixing.

This test requires CORE_ROOT to point at the test overlay and
that directory be rooted under the repo (other test cases already
have similar requirements).

CodeGenBringUp tests are noted as needing fixes, but are accounted
for under the category of "deferred fixes".

Commit migrated from https://github.com/dotnet/coreclr/commit/cdea3db0927e279c6d9bd6531bff84e4cbd94eaa

7 years agoJIT: defer setting outgoing args size until after optimization (dotnet/coreclr#9683)
Andy Ayers [Thu, 23 Feb 2017 22:52:10 +0000 (14:52 -0800)]
JIT: defer setting outgoing args size until after optimization (dotnet/coreclr#9683)

For fixed out args ABIs, the jit currently computes the size of the
out arg area during morph, as it encounters calls that must pass arguments
via the stack.

Subsequently, the optimizer may delete calls, either because they are
pure and the results are unused, or because they are conditional and the
guarding predicates are resolved by the optimizer in such a way that
the call is no longer reachable.

In particular if all the calls seen by morph are subsequently removed by
the optimizer, the jit may generate a stack frame that it never uses and
doesn't need. If only some calls are removed then the stack frame may end
up larger than necessary.

One motivating example is the inlining of a shared generic method that
ignores its generic context parameter. The caller typically must invoke a pure
helper to determine the proper argument to pass. Post inline the call's result
is unused, and the helper call is deleted by the optimizer.

This change defers the outgoing arg size computation until fgSimpleLowering,
which runs after optimization. The code in morph now simply records the
needed size for each call in the associated fgArgInfo.

As before, the outgoing arg size computation ignores fast tail calls, since
they can use the caller-supplied scratch area for memory arguments.

The jit may introduce helper calls after optimization which could seemingly
invalidate the out args area size. The presumption here is that these calls
are carefully designed not to use the caller-supplied scratch area. The
current code makes the same assumption.

This change introduces some unanticipated diffs. Optcse estimates the
frame size to decide how aggressive it should be about cses of local
variable references. This size estimate included the out args area, which
appears to be something of an oversight; there are no cse opportunities
in this area and the offsets of the other local variables are not impacted
by the size of this area. With this change the out args area size is seen
as zero during optimization and so the cse strategy for a method may be
different.

Commit migrated from https://github.com/dotnet/coreclr/commit/eaf5835d6a0e914edfdbb6ad1a8af2660e87a08c

7 years agoMerge pull request dotnet/coreclr#9582 from pgavlin/vzeroupper_x86_epilog
Pat Gavlin [Thu, 23 Feb 2017 22:20:45 +0000 (14:20 -0800)]
Merge pull request dotnet/coreclr#9582 from pgavlin/vzeroupper_x86_epilog

Do not report FP restores in x86 epilogs.

Commit migrated from https://github.com/dotnet/coreclr/commit/0abb98f1dc88845c82722bd48b4127ed1c728534

7 years agoMerge pull request dotnet/coreclr#9454 from mikedn/cgtun-to-cne
Brian Sullivan [Thu, 23 Feb 2017 21:56:09 +0000 (13:56 -0800)]
Merge pull request dotnet/coreclr#9454 from mikedn/cgtun-to-cne

Morph (x GT_GT.unsigned 0) into (x GT_NE 0)

Commit migrated from https://github.com/dotnet/coreclr/commit/f47c6fd43ba50cd59fa77e523dbc562df7f98c2c

7 years agoMove jit tests to directory with proper casing
Andy Ayers [Thu, 23 Feb 2017 21:46:20 +0000 (13:46 -0800)]
Move jit tests to directory with proper casing

Closes dotnet/coreclr#9747.

Commit migrated from https://github.com/dotnet/coreclr/commit/891773bc76162439e8fe8fd06f3bb7227879548a

7 years agoRun codeformatter on S.P.CoreLib sources
Alex Perovich [Wed, 22 Feb 2017 23:23:44 +0000 (15:23 -0800)]
Run codeformatter on S.P.CoreLib sources

Commit migrated from https://github.com/dotnet/coreclr/commit/ea9bee5ac2f96a1ea6b202dc4094b8d418d9209c

7 years agoManual change to make codeformatter work
Alex Perovich [Wed, 22 Feb 2017 23:23:25 +0000 (15:23 -0800)]
Manual change to make codeformatter work

Commit migrated from https://github.com/dotnet/coreclr/commit/2ace58ac2bba14ffd469ecb89f972b8e9b8fd61d

7 years agoRewrite Is4ByteAVXInstruction() and Is4ByteSSE4Instruction()
Fei Peng [Wed, 22 Feb 2017 18:38:52 +0000 (10:38 -0800)]
Rewrite Is4ByteAVXInstruction() and Is4ByteSSE4Instruction()

Commit migrated from https://github.com/dotnet/coreclr/commit/d14d26a8ef2b8c46b14c9f6be7e61be5438e1083

7 years agoEnable promotion of structs containing fields of structs with a single pointer-sized...
sivarv [Thu, 23 Feb 2017 18:59:28 +0000 (10:59 -0800)]
Enable promotion of structs containing fields of structs with a single pointer-sized scalar type field.

Commit migrated from https://github.com/dotnet/coreclr/commit/cc35e361b1c1ddeb9e36dbb293f1456a211f5216

7 years agoMerge pull request dotnet/coreclr#9743 from weshaggard/UpdateUsingYourBuildDocs
Wes Haggard [Thu, 23 Feb 2017 21:23:53 +0000 (13:23 -0800)]
Merge pull request dotnet/coreclr#9743 from weshaggard/UpdateUsingYourBuildDocs

Update UsingYourBuildDocs to use .NET Core 2.0 SDK

Commit migrated from https://github.com/dotnet/coreclr/commit/45d14be87c2ca02c6d190ca38fe0d8c585d56c5e

7 years agoUpdate UsingYourBuild docs to use .NET Core 2.0 SDK
Wes Haggard [Thu, 23 Feb 2017 19:13:59 +0000 (11:13 -0800)]
Update UsingYourBuild docs to use .NET Core 2.0 SDK

Commit migrated from https://github.com/dotnet/coreclr/commit/53d0f39ba6784397ce95399fe2e99ba093f0b0be

7 years agoMerge pull request dotnet/coreclr#9741 from brianrob/issue-9733
Brian Robbins [Thu, 23 Feb 2017 20:12:00 +0000 (12:12 -0800)]
Merge pull request dotnet/coreclr#9741 from brianrob/issue-9733

Disable Test Broken By CoreFX PR # 15767

Commit migrated from https://github.com/dotnet/coreclr/commit/0a95e4ece8cb415b3cd3a7c10a0ce1a9ac6d2873

7 years agoMerge pull request dotnet/coreclr#9655 from sdmaclea/PR-ARM64-JITGC-WIP3
Brian Sullivan [Thu, 23 Feb 2017 19:22:03 +0000 (11:22 -0800)]
Merge pull request dotnet/coreclr#9655 from sdmaclea/PR-ARM64-JITGC-WIP3

[Arm64] Correct CORINFO_HELP_ASSIGN_BYREF killed mask

Commit migrated from https://github.com/dotnet/coreclr/commit/f78bf7d393501c279821bb0e7fa4c26550cc898c

7 years agoFormat code.
Pat Gavlin [Thu, 23 Feb 2017 18:48:25 +0000 (10:48 -0800)]
Format code.

Commit migrated from https://github.com/dotnet/coreclr/commit/187255c281084156bbc103d2c17729a0ab0c96b6

7 years agoAddress PR feedback.
Pat Gavlin [Thu, 23 Feb 2017 18:39:10 +0000 (10:39 -0800)]
Address PR feedback.

Commit migrated from https://github.com/dotnet/coreclr/commit/bd4028154190a245f322d859484fd39375201d00

7 years agoDisable broken tests.
Brian Robbins [Thu, 23 Feb 2017 18:27:58 +0000 (10:27 -0800)]
Disable broken tests.

Commit migrated from https://github.com/dotnet/coreclr/commit/4c760c55ae357aa3e78b33ac497f05edc3d0ce54

7 years agoMerge pull request dotnet/coreclr#9727 from BruceForstall/DontBuildJitLib
Bruce Forstall [Thu, 23 Feb 2017 17:26:55 +0000 (09:26 -0800)]
Merge pull request dotnet/coreclr#9727 from BruceForstall/DontBuildJitLib

Speed up JIT builds

Commit migrated from https://github.com/dotnet/coreclr/commit/5932d885cb60427c895aca7bceae83a34e36be3a

7 years agoSimplified MinOpts GC ref tracking. (dotnet/coreclr#9231)
Peter Kukol [Thu, 23 Feb 2017 16:13:34 +0000 (09:13 -0700)]
Simplified MinOpts GC ref tracking. (dotnet/coreclr#9231)

Simplified MinOpts GC ref tracking - when a method is compiled with MinOpts for targets with the 64-bit GC info encoder we mark all GC slots as untracked and we omit encoding call sites with no live tracked GC refs explicitly in the GC tables; this can be controlled using the new COMPlus_JitMinOptsTrackGCrefs environment flag.

Commit migrated from https://github.com/dotnet/coreclr/commit/d7509df9635ca92c1a3cf75dc2516ae51b0e03d6

7 years agoAndroid: workaround absence of getcontext/setcontext (dotnet/coreclr#9725)
Frederik Carlier [Thu, 23 Feb 2017 10:09:24 +0000 (02:09 -0800)]
Android: workaround absence of getcontext/setcontext (dotnet/coreclr#9725)

* Android: workaround absence of getcontext/setcontext
use RtlCaptureContext and RtlRestoreContext

Commit migrated from https://github.com/dotnet/coreclr/commit/08581d8e9515ef1a348e7509785ea29195a9de37

7 years agoRyuJIT/ARM32: Fix helper kill mask and call target consuming
Mikhail Skvortcov [Mon, 20 Feb 2017 14:56:54 +0000 (17:56 +0300)]
RyuJIT/ARM32: Fix helper kill mask and call target consuming

Commit migrated from https://github.com/dotnet/coreclr/commit/79817a4110f0fcf016f44432dc47fb56d7891b0c

7 years agoReduce code in SafeHandleAddRef (dotnet/coreclr#9724)
Stephen Toub [Thu, 23 Feb 2017 07:22:43 +0000 (02:22 -0500)]
Reduce code in SafeHandleAddRef (dotnet/coreclr#9724)

If DangerousAddRef returns rather than throws, its argument will be true, so there's no need to branch on it.

Commit migrated from https://github.com/dotnet/coreclr/commit/6af4182d058df3520103d81c3912899e8d29f884

7 years agoPorting the CoreMangLib/cti/system/math tests to CoreMangLib/cti/system/mathf
Tanner Gooding [Thu, 23 Feb 2017 03:07:32 +0000 (19:07 -0800)]
Porting the CoreMangLib/cti/system/math tests to CoreMangLib/cti/system/mathf

Commit migrated from https://github.com/dotnet/coreclr/commit/74057cb5df9a3bcf31cfe72ab0fc7f45ce95f09c

7 years agoFaster List Add (dotnet/coreclr#9539)
Ben Adams [Thu, 23 Feb 2017 03:15:57 +0000 (03:15 +0000)]
Faster List Add (dotnet/coreclr#9539)

Commit migrated from https://github.com/dotnet/coreclr/commit/7d9e01719d29b9dda2d1f53fe15461f9b371e604

7 years ago[Arm64] Fix genCodeForCpObj()
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Wed, 22 Feb 2017 22:11:45 +0000 (22:11 +0000)]
[Arm64] Fix genCodeForCpObj()

CORINFO_HELP_ASSIGN_BYREF is the functional equivalent to

   *dst = *src;
   ++dst;
   ++src;

Note: Description ignores barriers.

Since src and dst are incremented the registers are marked dead.

In genCodeForCpObj(), the incremented values are will be reused
and therefore must be treated as live.  Add code to explicitly
force them live for this use case.

Commit migrated from https://github.com/dotnet/coreclr/commit/a5d464837248bae64845fb3e8207821d29f316d8

7 years agoUpdating codegenxarch to support single-precision CORINFO_INTRINSIC_Sqrt
Tanner Gooding [Mon, 6 Feb 2017 01:58:28 +0000 (01:58 +0000)]
Updating codegenxarch to support single-precision CORINFO_INTRINSIC_Sqrt

Commit migrated from https://github.com/dotnet/coreclr/commit/59d834e4711c351cf9f7326b636294ece42675eb

7 years agoMerge pull request dotnet/coreclr#9363 from tannergooding/math-intrinsics
Tanner Gooding [Thu, 23 Feb 2017 01:36:12 +0000 (17:36 -0800)]
Merge pull request dotnet/coreclr#9363 from tannergooding/math-intrinsics

Updating jit/valuenum to properly handle the single-precision versions of the math intrinsics.

Commit migrated from https://github.com/dotnet/coreclr/commit/116752f4138f9e26237c9435bdcde129d4aa3398

7 years agoDo not report FP restores in x86 epilogs.
Pat Gavlin [Wed, 22 Feb 2017 19:05:25 +0000 (11:05 -0800)]
Do not report FP restores in x86 epilogs.

The x86 unwinder neither needs nor expects to see these restores (which
right now consist solely of a `vzeroupper` instruction that is emitted
to eliminate AVX <-> SSE transition penalties), which was causing unwind
failures under GC stress. This change stops reporting these restores as
part of a function epilog.

Fixes dotnet/coreclr#9452.

Commit migrated from https://github.com/dotnet/coreclr/commit/ce70f4c2acae22fd8eaee1588c3f54596e521c8a

7 years agoSpeed up JIT builds
Bruce Forstall [Wed, 22 Feb 2017 23:43:18 +0000 (15:43 -0800)]
Speed up JIT builds

We don't need to build the static lib and crossgen static lib
versions of the JIT unless FEATURE_MERGE_JIT_AND_ENGINE is set.
And, since we currently don't set it, this means doing two
fewer JIT builds.

Commit migrated from https://github.com/dotnet/coreclr/commit/91681810db13a23fa7fc0437340946bf8cfe140b

7 years agoMerge pull request dotnet/coreclr#9654 from sdmaclea/PR-ARM64-JITGC-WIP2
Jarret Shook [Wed, 22 Feb 2017 23:30:14 +0000 (15:30 -0800)]
Merge pull request dotnet/coreclr#9654 from sdmaclea/PR-ARM64-JITGC-WIP2

[WIP] [Arm64] Fix GC liveness for CodeGen::genPutArgStk()

Commit migrated from https://github.com/dotnet/coreclr/commit/989bf9e101e072c185b58aed175d4ae181c4f57b

7 years agoMerge pull request dotnet/coreclr#9653 from sdmaclea/PR-ARM64-JITGC-WIP1
Jarret Shook [Wed, 22 Feb 2017 23:30:03 +0000 (15:30 -0800)]
Merge pull request dotnet/coreclr#9653 from sdmaclea/PR-ARM64-JITGC-WIP1

[WIP] [Arm64] Fix GC hole in CodeGen::genCodeForCpObj()

Commit migrated from https://github.com/dotnet/coreclr/commit/bbfa7f72292f7dd26993fb108e5eeb1b573c580f

7 years agoImprove stack overflow reporting (dotnet/coreclr#9650)
Jan Vorlicek [Wed, 22 Feb 2017 22:18:01 +0000 (23:18 +0100)]
Improve stack overflow reporting (dotnet/coreclr#9650)

* Improve stack overflow reporting

This change modifies the SIGSEGV handling to use an alternate stack so that
we can safely detect and report stack overflow even in case when we are
really out of stack. Before, we were able to detect stack overflow and report
it only when JIT inserted stack probes (for functions with frames larger than
4kB) and so there was still space on the stack to run the sigsegv handler.
It brings in some additional complexity, since we need to switch to the original
stack of the thread once we figure out the sigsegv is not a stack overflow and
if we return from the hardware exception handler, we need to switch back to the
alternate stack before returning from the sigsegv handler.
Also, the alternate stack is created per thread and so we need to correctly destroy
it when a thread terminates and also install it on foreign threads that enter PAL.
This also requires creating fake stack frames to enable the libunwind to walk
the stack from the exception handler to the sigsegv location.

* Fix stack unwinding in CallDescrWorkerInternal

While testing the change to enable stack overflow handling, I've noticed that
the PROLOG_SAVE_REG_PAIR and PROLOG_SAVE_REG_PAIR_INDEXED macros are missing
.cfi_def_cfa_register fp. That resulted in inability to unwind through the
CallDescrWorkerInternal, since this function dynamically allocates stack slots
and so the default sp based frame doesn't work.

Commit migrated from https://github.com/dotnet/coreclr/commit/f193024a5ef8f277f08bed3721e2e8e730aabdb9

7 years agoCMake configuration for cross building for Android (dotnet/coreclr#9174)
Frederik Carlier [Wed, 22 Feb 2017 22:17:01 +0000 (14:17 -0800)]
CMake configuration for cross building for Android (dotnet/coreclr#9174)

* Configuration files for cross building for Android arm64

* Simplify toolchain script

* Fix trymake values for Android

Commit migrated from https://github.com/dotnet/coreclr/commit/09fd5fbd08d376aa0d7b2602e5115aaabcd7b352

7 years agoMerge pull request dotnet/coreclr#9712 from AndyAyersMS/FixSomeTestProjFiles
Andy Ayers [Wed, 22 Feb 2017 20:20:08 +0000 (12:20 -0800)]
Merge pull request dotnet/coreclr#9712 from AndyAyersMS/FixSomeTestProjFiles

Fix jit test projects to specify debug type and optimization flags

Commit migrated from https://github.com/dotnet/coreclr/commit/d2f85611eaf2560282c420731428d7204d169317

7 years agoAdd test coverage for ldtoken with members (dotnet/coreclr#9713)
Michal Strehovský [Wed, 22 Feb 2017 20:04:37 +0000 (12:04 -0800)]
Add test coverage for ldtoken with members (dotnet/coreclr#9713)

The test coverage for `ldtoken field X` and `ldtoken method X` in the
repo is very small - this test tries to improve things a little.

In particular, it tests that we get the right reflection objects, and
that we can do this from shared and unshared code.

Commit migrated from https://github.com/dotnet/coreclr/commit/4ae7ce48780c2db9ca8b4208c89b0db6aae97187

7 years agoMerge pull request dotnet/coreclr#9714 from BruceForstall/FixRegMasks
Bruce Forstall [Wed, 22 Feb 2017 19:29:58 +0000 (11:29 -0800)]
Merge pull request dotnet/coreclr#9714 from BruceForstall/FixRegMasks

Fix non-Windows amd64 register mask initialization

Commit migrated from https://github.com/dotnet/coreclr/commit/27d5d92f6a07f515dff2074a77f4ee63477e5456

7 years agoMerge pull request dotnet/coreclr#9702 from adiaaida/fixX86PerfTesting
Michelle McDaniel [Wed, 22 Feb 2017 19:00:39 +0000 (11:00 -0800)]
Merge pull request dotnet/coreclr#9702 from adiaaida/fixX86PerfTesting

Fix x86 perf testing

Commit migrated from https://github.com/dotnet/coreclr/commit/4bc6f91f2e86cd6d0e5a1def8f7d57244434764f

7 years ago[Arm64] Fix GC hole in CodeGen::genCodeForCpObj()
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Fri, 3 Feb 2017 01:01:46 +0000 (01:01 +0000)]
[Arm64] Fix GC hole in CodeGen::genCodeForCpObj()

Update tempreg liveness

Commit migrated from https://github.com/dotnet/coreclr/commit/35243a54053787ed6d6cccc9e67571a2bed0c0f4

7 years ago[Arm64] Fix GC liveness for CodeGen::genPutArgStk()
Steve MacLean, Qualcomm Datacenter Technologies, Inc [Fri, 3 Feb 2017 22:24:07 +0000 (22:24 +0000)]
[Arm64] Fix GC liveness for CodeGen::genPutArgStk()

Commit migrated from https://github.com/dotnet/coreclr/commit/5f7b37f5220ac7d14ca75a7dd01da0665a3b13e7

7 years agoUpdating ValueNumStore to no longer upcast float to double when performing evaluations.
Tanner Gooding [Wed, 22 Feb 2017 15:25:26 +0000 (07:25 -0800)]
Updating ValueNumStore to no longer upcast float to double when performing evaluations.

Commit migrated from https://github.com/dotnet/coreclr/commit/8f05f425d0e3dbdf70ccc2cf4bb6e9886def0019

7 years agoSeparate Comparer and EqualityComparer creation logic into a non-generic class (dotne...
James Ko [Wed, 22 Feb 2017 18:01:40 +0000 (13:01 -0500)]
Separate Comparer and EqualityComparer creation logic into a non-generic class (dotnet/coreclr#9640)

Commit migrated from https://github.com/dotnet/coreclr/commit/84092471c678da00bb59d86fb5fcd0890a524472

7 years agoFix projects that specified DebugType incorrectly
Andy Ayers [Wed, 22 Feb 2017 17:31:14 +0000 (09:31 -0800)]
Fix projects that specified DebugType incorrectly

Make conditional DebugType properties uncondtional. Fix debug type
and optimize settings for _d and _do suffixed tests. Remove conditional
DebugType propery if there is also an unconditonal property.

Commit migrated from https://github.com/dotnet/coreclr/commit/e36c46a2e53dabb008e89b10ed138f0ccf7f192a

7 years agoMerge pull request dotnet/coreclr#9704 from pgavlin/corefx15913
Pat Gavlin [Wed, 22 Feb 2017 17:29:58 +0000 (09:29 -0800)]
Merge pull request dotnet/coreclr#9704 from pgavlin/corefx15913

Correctly pass 12-byte GT_SIMD nodes on x86.

Commit migrated from https://github.com/dotnet/coreclr/commit/749180a3799da8a495981ba85734dfffd09115f3

7 years agoMerge pull request dotnet/coreclr#9660 from dotnet-bot/master-UpdateDependencies
Gaurav Khanna [Wed, 22 Feb 2017 16:58:43 +0000 (08:58 -0800)]
Merge pull request dotnet/coreclr#9660 from dotnet-bot/master-UpdateDependencies

Update CoreClr, CoreFx to beta-25021-03, beta-25022-02, respectively (master)

Commit migrated from https://github.com/dotnet/coreclr/commit/fbe12daf0cd0f9911fa50f07adb5149aac7f360c

7 years agoUpdate CoreClr, CoreFx to beta-25021-03, beta-25022-02, respectively
dotnet-bot [Wed, 22 Feb 2017 15:16:14 +0000 (15:16 +0000)]
Update CoreClr, CoreFx to beta-25021-03, beta-25022-02, respectively

Commit migrated from https://github.com/dotnet/coreclr/commit/c0edf93600bc6ab39ec484177c129ebf178e8d2e

7 years agoClean up ClrUnwindEx (dotnet/coreclr#9482)
Jonghyun Park [Wed, 22 Feb 2017 14:43:30 +0000 (23:43 +0900)]
Clean up ClrUnwindEx (dotnet/coreclr#9482)

* Clean up ClrUnwindEx

Commit migrated from https://github.com/dotnet/coreclr/commit/1f5cae07e65d646fd57fdca7376d4b2f1dccad00

7 years agoDropping some unnecessary conditional statements in jit\valuenum.cpp
Tanner Gooding [Wed, 22 Feb 2017 14:09:37 +0000 (06:09 -0800)]
Dropping some unnecessary conditional statements in jit\valuenum.cpp

Commit migrated from https://github.com/dotnet/coreclr/commit/9f69d1f0dd82d1452d82080aabfbc751fdc2886d

7 years agoUpdating jit/valuenum to properly handle the single-precision versions of the math...
Tanner Gooding [Mon, 6 Feb 2017 06:44:14 +0000 (06:44 +0000)]
Updating jit/valuenum to properly handle the single-precision versions of the math intrinsics.

Commit migrated from https://github.com/dotnet/coreclr/commit/43ea736713dd1bf83957c8685a2f8a8a6d2ff88d

7 years agoFix non-Windows amd64 register mask initialization
Bruce Forstall [Wed, 22 Feb 2017 01:06:46 +0000 (17:06 -0800)]
Fix non-Windows amd64 register mask initialization

The arrays were being initialized with register numbers, not
register masks. The arrays are only used on non-Windows amd64
for homing circular incoming argument conflicts. Perhaps we
never saw this happen?

Commit migrated from https://github.com/dotnet/coreclr/commit/f8646043219a5367b2090e9e9a0f504734c8e6e3

7 years agoFix jit test projects to specify debug type and optimization flags
Andy Ayers [Wed, 22 Feb 2017 02:13:25 +0000 (18:13 -0800)]
Fix jit test projects to specify debug type and optimization flags

This partially addresses the issues raised in dotnet/coreclr#4124 and dotnet/coreclr#4724 by explicitly
and unconditionally setting DebugType and Optimize flags for various test
project files.

The projects that were fixed are those that did not specify any debug
flag settings at all.  The fix is to set DebugType to PdbOnly and to set
Optimization to true, unless the test has an _r or _rel suffix, in which
case Optimization is set false.

This impacts 1497 projects, skipping over 311 projects flagged as needing
fixes. The projects that remain are the CodeGenBringUp set (for which we plan
to clone projects to test the various flag combinations), projects that
specify flags but do so in ways where the effective flag settings may vary
from DBG to RET, projects that specify the flags redundantly, or projects
where the flags are not consistent with the "test case name suffix" rules.

The edits were done by a tool using linq-to-xml and so some incidental
reformatting has happened.

Commit migrated from https://github.com/dotnet/coreclr/commit/f60e421e3cc6c6c7160bc3b679e8a08530ae275a

7 years agoFix x86 perf testing
Michelle McDaniel [Tue, 21 Feb 2017 19:35:04 +0000 (11:35 -0800)]
Fix x86 perf testing

We did not use a different architecture in run-xunit-perf.cmd, so all the
x86 runs were uploading to the same architecture. This change fixes it so
x86jit32 runs upload to their own architecture. Also fixes the delayed
expansion issue for testenv.

Commit migrated from https://github.com/dotnet/coreclr/commit/be7cd4d6b59d65b5a74feb8a698b90b641732cec

7 years agoUse CORINFO_CALLCONV to check for unmanaged calls (dotnet/coreclr#9697)
Michal Strehovský [Wed, 22 Feb 2017 00:37:04 +0000 (16:37 -0800)]
Use CORINFO_CALLCONV to check for unmanaged calls (dotnet/coreclr#9697)

`GTF_CALL_UNMANAGED` is a member of the wrong enum and it's something
that would be set on `call->gtFlags` except that at this point it isn't.
Check against the actual unmanaged calling conventions.

Commit migrated from https://github.com/dotnet/coreclr/commit/0b4e58ac7a455640a5410b6f647ca3044426ea56

7 years ago[x86/Linux] Fix framepointer while unwinding (dotnet/coreclr#9678)
SaeHie Park [Wed, 22 Feb 2017 00:26:21 +0000 (09:26 +0900)]
[x86/Linux] Fix framepointer while unwinding (dotnet/coreclr#9678)

Use pCallerContext when getting frame pointer

Commit migrated from https://github.com/dotnet/coreclr/commit/2d7eedbbfd0d259659517ca68de05b82ec7f87a5

7 years agoAdd a regression test.
Pat Gavlin [Tue, 21 Feb 2017 23:15:22 +0000 (15:15 -0800)]
Add a regression test.

Commit migrated from https://github.com/dotnet/coreclr/commit/ea0a3cd0967abdfd0ab6392a82cae45568d14503

7 years agoMerge pull request dotnet/coreclr#9703 from wtgodbe/CrossgenCode
Gaurav Khanna [Tue, 21 Feb 2017 22:07:58 +0000 (14:07 -0800)]
Merge pull request dotnet/coreclr#9703 from wtgodbe/CrossgenCode

Have Crossgen Failures exit in a dedicated exit routine

Commit migrated from https://github.com/dotnet/coreclr/commit/ccd082706fb108fe813b98a12da46fe551983c71

7 years agoCorrectly pass 12-byte GT_SIMD nodes on x86.
Pat Gavlin [Tue, 21 Feb 2017 21:29:34 +0000 (13:29 -0800)]
Correctly pass 12-byte GT_SIMD nodes on x86.

During lowering, all TYP_SIMD12 GT_SIMD nodes are retyped to TYP_SIMD16.
This is correct except in the case that the GT_SIMD node is going to be
passed by-value on x86, in which case this retyping causes us to push 16
bytes rather than 12. This change recognizes a GT_SIMD node that has
been retyped by checking the value of gtSIMDSize during LowerArg and
uses TYP_SIMD12 for the putarg instead of TYP_SIMD16 (aside from
differences in detecting retyped nodes, this is the same transformation
we already do when passing TYP_SIMD12 lclVars that are being used as
TYP_SIMD16 on x86).

Fixes https://github.com/dotnet/corefx/issues/15913.

Commit migrated from https://github.com/dotnet/coreclr/commit/57c83fb63d8d8f442f9c7d0c93cb4f722eead545

7 years agoHave Crossgen Failures exit in a dedicated exit routine
wtgodbe [Tue, 21 Feb 2017 20:38:46 +0000 (12:38 -0800)]
Have Crossgen Failures exit in a dedicated exit routine

Commit migrated from https://github.com/dotnet/coreclr/commit/13ffcc4fcfc3220e4fdf47878ff4be8297361201

7 years agoMerge pull request dotnet/coreclr#9695 from jashook/up_timeout_for_arm64_gcstress
Jarret Shook [Tue, 21 Feb 2017 19:23:09 +0000 (11:23 -0800)]
Merge pull request dotnet/coreclr#9695 from jashook/up_timeout_for_arm64_gcstress

Up the timeout for gcstress arm64 jobs.

Commit migrated from https://github.com/dotnet/coreclr/commit/8fa99f1cd6fcf4323ee71ab0202b40fb125c5014

7 years agoUp the timeout for gcstress arm64 jobs.
jashook [Tue, 21 Feb 2017 18:05:10 +0000 (10:05 -0800)]
Up the timeout for gcstress arm64 jobs.

Commit migrated from https://github.com/dotnet/coreclr/commit/ff4806c00a6e687fe26dfea47c703982865dea32

7 years agoFix compilation on macOS with case sensitive FS (dotnet/coreclr#9693)
Mikhail Filippov [Tue, 21 Feb 2017 17:26:58 +0000 (20:26 +0300)]
Fix compilation on macOS with case sensitive FS (dotnet/coreclr#9693)

Commit migrated from https://github.com/dotnet/coreclr/commit/a3af468e2f731e2d7b071fb82bd2eeb62cd8db0d

7 years agoImprove string.Equals OrdinalIgnoreCase performance for matching chars (dotnet/corecl...
Bruce Bowyer-Smyth [Tue, 21 Feb 2017 17:25:18 +0000 (03:25 +1000)]
Improve string.Equals OrdinalIgnoreCase performance for matching chars (dotnet/coreclr#9213)

* Improve string.Equals OrdinalIgnoreCase performance for matching chars

* Added code comment

Commit migrated from https://github.com/dotnet/coreclr/commit/2f9cfd3778e91c57f5fec482e873e2569a505c3e

7 years agoAdd --xunitOutputPath option to runtest.sh (dotnet/coreclr#9646)
Jonghyun Park [Tue, 21 Feb 2017 14:33:55 +0000 (23:33 +0900)]
Add --xunitOutputPath option to runtest.sh (dotnet/coreclr#9646)

Commit migrated from https://github.com/dotnet/coreclr/commit/6fbc4b8484c8259a4a8ff1ca985a52c9ab559e69

7 years agoClean up FixupDispatcherContext (dotnet/coreclr#9685)
Jonghyun Park [Tue, 21 Feb 2017 14:01:29 +0000 (23:01 +0900)]
Clean up FixupDispatcherContext (dotnet/coreclr#9685)

Commit migrated from https://github.com/dotnet/coreclr/commit/889a3f148ed3f056f2653cef0c6400a533b7e72c

7 years agoUse ADJUST_PC_UNWOUND_TO_CALL instead of _TARGET_XXX_ (dotnet/coreclr#9686)
Jonghyun Park [Tue, 21 Feb 2017 13:47:11 +0000 (22:47 +0900)]
Use ADJUST_PC_UNWOUND_TO_CALL instead of _TARGET_XXX_ (dotnet/coreclr#9686)

Commit migrated from https://github.com/dotnet/coreclr/commit/e825dc96cf9ad32134bbaac4d1fbd2008f025ed2

7 years agoMerge pull request dotnet/coreclr#9676 from parjong/fix/issue_9576
Andy Ayers [Mon, 20 Feb 2017 15:53:14 +0000 (07:53 -0800)]
Merge pull request dotnet/coreclr#9676 from parjong/fix/issue_9576

Fix bogus assert in flowgraph and update related ilproj

Commit migrated from https://github.com/dotnet/coreclr/commit/a188cca37c0ff413dfbdbac81b7cb0374be15ce1

7 years agoRewrite assert using bbInTryRegions
Jonghyun Park [Mon, 20 Feb 2017 05:38:40 +0000 (14:38 +0900)]
Rewrite assert using bbInTryRegions

Commit migrated from https://github.com/dotnet/coreclr/commit/401f6422475c54c78b57de7509333b1c529bfb9b

7 years agoUpdate related .ilproj
Jonghyun Park [Mon, 20 Feb 2017 01:40:26 +0000 (10:40 +0900)]
Update related .ilproj

Commit migrated from https://github.com/dotnet/coreclr/commit/4781a16001529e9b918c5af51520ad8153c2e719

7 years agoFix formatting error
Jonghyun Park [Mon, 20 Feb 2017 01:31:43 +0000 (10:31 +0900)]
Fix formatting error

Commit migrated from https://github.com/dotnet/coreclr/commit/2b21ed84563e545373fa5a91903815c8085096fb

7 years agoComment out bogus assert in flowgraph
Jonghyun Park [Mon, 20 Feb 2017 01:13:33 +0000 (10:13 +0900)]
Comment out bogus assert in flowgraph

Commit migrated from https://github.com/dotnet/coreclr/commit/6415ab2205d01589de035616ef849ecf135b274b

7 years agoMerge pull request dotnet/coreclr#9672 from jashook/arm64_regression
Jarret Shook [Sun, 19 Feb 2017 19:03:31 +0000 (11:03 -0800)]
Merge pull request dotnet/coreclr#9672 from jashook/arm64_regression

Add new regression.

Commit migrated from https://github.com/dotnet/coreclr/commit/b957f8c3e3b11f0d77464befc185ce15d366adaf

7 years agoMerge pull request dotnet/coreclr#9671 from benaadams/revert-encoding
Andy Ayers [Sun, 19 Feb 2017 06:39:31 +0000 (22:39 -0800)]
Merge pull request dotnet/coreclr#9671 from benaadams/revert-encoding

Revert "Fast-path for ASCII & UTF8 Encoding ASCII data (dotnet/coreclr#9187)"

Commit migrated from https://github.com/dotnet/coreclr/commit/10f5043c4887abaaaff61ec0f3071a2113923876

7 years agoMerge pull request dotnet/coreclr#9670 from stephentoub/cs_random
Dan Moseley [Sun, 19 Feb 2017 05:47:48 +0000 (21:47 -0800)]
Merge pull request dotnet/coreclr#9670 from stephentoub/cs_random

Delay Random allocation in ConcurrentStack

Commit migrated from https://github.com/dotnet/coreclr/commit/89f9727eb48519349bbc5579fe632177c1dd60ae

7 years agoAdd new regression.
jashook [Sun, 19 Feb 2017 05:28:45 +0000 (21:28 -0800)]
Add new regression.

Commit migrated from https://github.com/dotnet/coreclr/commit/b48f393f063108a13087bc62670048c4a6f4e4de

7 years agoRevert "Fast-path for ASCII & UTF8 Encoding ASCII data (dotnet/coreclr#9187)"
Ben Adams [Sun, 19 Feb 2017 05:03:51 +0000 (05:03 +0000)]
Revert "Fast-path for ASCII & UTF8 Encoding ASCII data (dotnet/coreclr#9187)"

This reverts commit dotnet/coreclr@77e676be9fab34471c4ae9f16a7a51a06bd470ee.

Commit migrated from https://github.com/dotnet/coreclr/commit/16bdf3f073496a2c52dd76eb4c85bcd9a89b21a1

7 years agoMerge pull request dotnet/coreclr#9661 from AndyAyersMS/FixTailCallStress1
Andy Ayers [Sun, 19 Feb 2017 01:42:43 +0000 (17:42 -0800)]
Merge pull request dotnet/coreclr#9661 from AndyAyersMS/FixTailCallStress1

JIT: tolerate GT_COMMA in tail call position

Commit migrated from https://github.com/dotnet/coreclr/commit/33bed49911bb2b86e0b2fa685e345319be10080e

7 years agoRemove a few explicit static cctors (dotnet/coreclr#9669)
Stephen Toub [Sun, 19 Feb 2017 01:17:34 +0000 (20:17 -0500)]
Remove a few explicit static cctors (dotnet/coreclr#9669)

Commit migrated from https://github.com/dotnet/coreclr/commit/3a6af9d433115c6d84cb7bc8028aabd55aef8b1c

7 years agoMerge pull request dotnet/coreclr#9665 from sdmaclea/PR-ARM64-PT_KNONVOLATILE
Gaurav Khanna [Sun, 19 Feb 2017 00:09:12 +0000 (16:09 -0800)]
Merge pull request dotnet/coreclr#9665 from sdmaclea/PR-ARM64-PT_KNONVOLATILE

[ARM64] Use PT_KNONVOLATILE... for cross

Commit migrated from https://github.com/dotnet/coreclr/commit/c023b234a65afa62fd6c602fb50208490ffeb976

7 years agoDelay Random allocation in ConcurrentStack
Stephen Toub [Sat, 18 Feb 2017 23:32:20 +0000 (15:32 -0800)]
Delay Random allocation in ConcurrentStack

Commit migrated from https://github.com/dotnet/coreclr/commit/f81185ff4cc3c06224f49e696257c2e4f52e4c35

7 years agoFast-path for ASCII & UTF8 Encoding ASCII data (dotnet/coreclr#9187)
Ben Adams [Sat, 18 Feb 2017 18:47:36 +0000 (18:47 +0000)]
Fast-path for ASCII & UTF8 Encoding ASCII data (dotnet/coreclr#9187)

Commit migrated from https://github.com/dotnet/coreclr/commit/77e676be9fab34471c4ae9f16a7a51a06bd470ee

7 years ago[Arm64/Unix] Fix cmake race condition (dotnet/coreclr#9666)
Steve MacLean [Sat, 18 Feb 2017 09:15:26 +0000 (04:15 -0500)]
[Arm64/Unix] Fix cmake race condition (dotnet/coreclr#9666)

On a clean build SET(REQUIRE_LLDBPLUGIN false) was being ignored because the cmake
cache variable had not been created

Change order of cmake file to be more natural and to resolve

Commit migrated from https://github.com/dotnet/coreclr/commit/f8200ab5d2c1a76458f76e1724f3d760eb2a6ecd