platform/upstream/coreclr.git
6 years agoGeneralize runtest.sh test exclusion files
Bruce Forstall [Fri, 2 Mar 2018 02:10:55 +0000 (18:10 -0800)]
Generalize runtest.sh test exclusion files

Allow leading '#' as a comment character for all testsUnsupported and
testsFailing files.

Generalize testsFailingOnArm64.txt to testsFailing.$ARCH.txt

Generalize testsUnsupportedOnARM32.txt to testsUnsupported.$ARCH.txt

6 years agoDisable tiered compilation for collectible assemblies (#16437)
Koundinya Veluri [Wed, 21 Feb 2018 19:31:07 +0000 (11:31 -0800)]
Disable tiered compilation for collectible assemblies (#16437)

Disable tiered compilation for collectible assemblies

- An assembly can be marked collectible with methods not marked as dynamic
- The method desc and code can be deleted and a new method desc reallocated in the same location, code versioning doesn't handle this at the moment

6 years agoDial back aggressive checks in Path (#16447)
Jeremy Kuhne [Wed, 21 Feb 2018 18:44:44 +0000 (10:44 -0800)]
Dial back aggressive checks in Path (#16447)

* Dial back aggressive checks in Path

Aggressive checks are preventing crossplat and extended Windows solutions. This change:

- Doesn't throw on empty paths fro GetDirectoryName, GetPathRoot
- Doesn't consider colon when looking at path segments on Windows
- Moves non-shared code out of PathInternal
- Fix span GetDirectoryName to handle multiple separators

* Comment updates

* Check for valid drive letter with PathRoot
Remove other usages of PathSkip (related to #16311)

6 years agoMoved extensions.cs to shared folder in coreclr (#16459)
Anirudh Agnihotry [Wed, 21 Feb 2018 05:01:39 +0000 (21:01 -0800)]
Moved extensions.cs to shared folder in coreclr (#16459)

* Moved extensions.cs to shared folder

* added to shared to projItems

* Added new constructor

* Parameter Named Changed

6 years agoRevert TLS model change of the gCurrentThreadInfo
Jan Vorlicek [Wed, 21 Feb 2018 01:02:30 +0000 (02:02 +0100)]
Revert TLS model change of the gCurrentThreadInfo

This change causes crashes due to incorrect TLS variable initialization
on Alpine Linux. The initial-exec model that the variable was modified
to use recently cannot be safely used in shared libraries.

6 years agoAdd TryGetOwnedMemory (#16455)
Ben Adams [Wed, 21 Feb 2018 01:56:02 +0000 (01:56 +0000)]
Add TryGetOwnedMemory (#16455)

* Add TryGetOwnedMemory

* Feedback

* spelling

6 years agoAdd CI perf repro script (#16414)
Noah Falk [Wed, 21 Feb 2018 01:40:10 +0000 (17:40 -0800)]
Add CI perf repro script (#16414)

* Add CI perf repro script

There wasn't any good way to reproduce what happens in CI for perf jobs because groovy can't be directly run. As a first step to solving this I created a python script that reproduces the perf leg I needed.

6 years agoMerge pull request #16408 from fiigii/sse4load
Carol Eidt [Tue, 20 Feb 2018 20:44:55 +0000 (12:44 -0800)]
Merge pull request #16408 from fiigii/sse4load

Implement SSE4.1 LoadAlignedVector128NonTemporal

6 years agoPrevent memory allocation in signal handler (#16384)
mlabiuk [Tue, 20 Feb 2018 20:35:26 +0000 (23:35 +0300)]
Prevent memory allocation in signal handler (#16384)

* Do not allocate exception for signal from non managed code

If the signal occurs in not managed code we cannot use heap.
We should call signal-safe functions only from signal handler.

Create exception object on stack for checking source of signal.
If signal is from managed code we can use memory allocation to create
persistent exception on heap as copy of volatile exception on stack.

If signal from unmanaged code we do nothing and call base signal handler.

fix https://github.com/dotnet/coreclr/issues/16338

6 years agoReplace ValueStringBuilder.set_Length with indexer (dotnet/corefx#27274)
Jan Kotas [Tue, 20 Feb 2018 16:14:57 +0000 (08:14 -0800)]
Replace ValueStringBuilder.set_Length with indexer (dotnet/corefx#27274)

Indexer that let's you see and edit the content of the pending string is more efficient and flexible.

Fixes #26643

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
6 years agoMerge pull request #16436 from brunotag/patch-1
Wes Haggard [Tue, 20 Feb 2018 16:59:33 +0000 (08:59 -0800)]
Merge pull request #16436 from brunotag/patch-1

Update UsingYourBuild.md

6 years agoUpdate CoreClr to preview2-26220-01 (#16445)
dotnet-maestro-bot [Tue, 20 Feb 2018 05:13:42 +0000 (23:13 -0600)]
Update CoreClr to preview2-26220-01 (#16445)

6 years agoMerge pull request #16444 from mikedn/vec2load
Carol Eidt [Tue, 20 Feb 2018 02:08:20 +0000 (18:08 -0800)]
Merge pull request #16444 from mikedn/vec2load

Handle TYP_SIMD8 correctly in genCodeForLclFld

6 years agoUpdate CoreClr, PgoData to preview2-26219-05, master-20180219-0044, respectively...
dotnet-maestro-bot [Mon, 19 Feb 2018 20:11:05 +0000 (14:11 -0600)]
Update CoreClr, PgoData to preview2-26219-05, master-20180219-0044, respectively (#16439)

6 years agoHandle TYP_SIMD8 correctly in genCodeForLclFld
Mike Danes [Mon, 19 Feb 2018 19:41:59 +0000 (21:41 +0200)]
Handle TYP_SIMD8 correctly in genCodeForLclFld

When loading a TYP_SIMD8 local field movsd should be used, not movups. Unlike ins_Move_Extend, ins_Load does the right thing and it's consistent with indirs.

6 years agoInline String->ReadOnlySpan (#16440)
Ben Adams [Sun, 18 Feb 2018 22:28:21 +0000 (22:28 +0000)]
Inline String->ReadOnlySpan (#16440)

6 years agoMerge pull request #16422 from CarolEidt/Fix15037
Carol Eidt [Sun, 18 Feb 2018 17:28:16 +0000 (09:28 -0800)]
Merge pull request #16422 from CarolEidt/Fix15037

Don't set delayRegFree if no target

6 years agoDelete workaround for #16197 (#16433)
Jan Kotas [Sun, 18 Feb 2018 15:46:34 +0000 (07:46 -0800)]
Delete workaround for #16197 (#16433)

6 years agoUpdate CoreClr, PgoData to preview2-26218-01, master-20180217-0048, respectively...
dotnet-maestro-bot [Sun, 18 Feb 2018 08:55:12 +0000 (02:55 -0600)]
Update CoreClr, PgoData to preview2-26218-01, master-20180217-0048, respectively (#16430)

6 years agoDelete some more dead code related to #16304 (#16432)
Jan Kotas [Sun, 18 Feb 2018 08:47:03 +0000 (00:47 -0800)]
Delete some more dead code related to #16304 (#16432)

6 years agoUpdate UsingYourBuild.md
Bruno Tagliapietra [Sun, 18 Feb 2018 03:41:08 +0000 (16:41 +1300)]
Update UsingYourBuild.md

amend

6 years agoInlinable MulticastDelegate == (#16431)
Ben Adams [Sat, 17 Feb 2018 19:24:53 +0000 (19:24 +0000)]
Inlinable MulticastDelegate == (#16431)

6 years agodelete unused mirror files (#16423)
Sergey Andreenko [Sat, 17 Feb 2018 17:46:47 +0000 (09:46 -0800)]
delete unused mirror files (#16423)

6 years agoFix #16402 (#16406)
Steve MacLean [Sat, 17 Feb 2018 16:15:34 +0000 (11:15 -0500)]
Fix #16402 (#16406)

* Handle matching null binder

* Early out HashMap::Rehash()

6 years agoMerge pull request #16413 from briansull/more-vso-566984
Brian Sullivan [Sat, 17 Feb 2018 04:27:06 +0000 (20:27 -0800)]
Merge pull request #16413 from briansull/more-vso-566984

Fix for assert(sideEffList) in clr\src\jit\optcse.cpp, Line: 2151

6 years agoUpdate CoreClr to preview2-26217-01 (#16426)
dotnet-maestro-bot [Sat, 17 Feb 2018 02:53:31 +0000 (20:53 -0600)]
Update CoreClr to preview2-26217-01 (#16426)

6 years agoUpdate CoreClr to preview2-26216-09 (#16420)
dotnet-maestro-bot [Sat, 17 Feb 2018 00:44:25 +0000 (18:44 -0600)]
Update CoreClr to preview2-26216-09 (#16420)

6 years agoUpdating the JIT to take EnableSSE3_4 into account when setting the supported instruc...
Tanner Gooding [Thu, 15 Feb 2018 04:10:09 +0000 (20:10 -0800)]
Updating the JIT to take EnableSSE3_4 into account when setting the supported instruction sets

6 years agoCode Review - Removed unnecessary assert.
Brian Sullivan [Fri, 16 Feb 2018 23:39:52 +0000 (15:39 -0800)]
Code Review - Removed unnecessary assert.

6 years agoFix whitespace formatting
Brian Sullivan [Fri, 16 Feb 2018 23:32:35 +0000 (15:32 -0800)]
Fix whitespace formatting

6 years agoAdded new tree walker helper optHasCSEdefWithSideeffect to determine up front if...
Brian Sullivan [Fri, 16 Feb 2018 23:20:07 +0000 (15:20 -0800)]
Added new tree walker helper optHasCSEdefWithSideeffect to determine up front if we have
a nested CSE def with side effects.  The refs counts will be wrong when we start unmarking
some CSE uses and then later abandon the replacement operation.
So now we decide upfront if we have a CSE def with side effects before we call optUnmarkCSEs.

6 years agoDon't set delayRegFree if no target
Carol Eidt [Fri, 16 Feb 2018 23:01:44 +0000 (15:01 -0800)]
Don't set delayRegFree if no target

The `delayRegFree` flag on a use indicates that it interferes with the target register of the same node. This doesn't make sense if there is no def, and will cause the register to unnecessarily be kept alive until after the next actual reference.
This led to an assert in the verification pass on arm64. Checking and asserting for this case exposed another case for x86/x64.

Fix #15037

6 years agoMerge pull request #16364 from CarolEidt/FixDD543057a
Carol Eidt [Fri, 16 Feb 2018 22:48:07 +0000 (14:48 -0800)]
Merge pull request #16364 from CarolEidt/FixDD543057a

Correctly handle check for busy double reg

6 years agoMerge pull request #16393 from BruceForstall/CleanupRunTest
Bruce Forstall [Fri, 16 Feb 2018 18:58:13 +0000 (10:58 -0800)]
Merge pull request #16393 from BruceForstall/CleanupRunTest

Clean up runtest.cmd

6 years agoCorrectly handle check for busy double reg
Carol Eidt [Tue, 13 Feb 2018 22:35:34 +0000 (14:35 -0800)]
Correctly handle check for busy double reg

Fixes the second case in DevDev bug 543057

6 years agoUpdate BuildTools, CoreClr, CoreFx, PgoData to preview2-02516-02, preview2-26214...
dotnet-maestro-bot [Fri, 16 Feb 2018 17:34:19 +0000 (11:34 -0600)]
Update BuildTools, CoreClr, CoreFx, PgoData to preview2-02516-02, preview2-26214-07, preview2-26216-03, master-20180216-0045, respectively (#16339)

6 years agoFix dlStack test (#16410)
Sergey Andreenko [Fri, 16 Feb 2018 17:21:03 +0000 (09:21 -0800)]
Fix dlStack test (#16410)

6 years agodelete liveness workarond. (#16416)
Sergey Andreenko [Fri, 16 Feb 2018 17:18:48 +0000 (09:18 -0800)]
delete liveness workarond. (#16416)

6 years agoFix regression & enable ClearInitLocals in System.Text.RegularExpressions (#27146)
Viktor Hofer [Thu, 15 Feb 2018 22:32:19 +0000 (23:32 +0100)]
Fix regression & enable ClearInitLocals in System.Text.RegularExpressions (#27146)

* Fix bug in RegexWriter ref struct change

* Remove duplicate ValueListBuilder implementation

* Enable ILLinkClearInitLocals

* Rename concrete ValueListBuilder impl to Pop

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
6 years agoFix impl of ReadOnlySpan StartsWith/EndsWith for Unix. (#16418)
Ahson Khan [Fri, 16 Feb 2018 08:44:20 +0000 (00:44 -0800)]
Fix impl of ReadOnlySpan StartsWith/EndsWith for Unix. (#16418)

6 years agoreenable readytorun\tests\mainv* for arm jitstress (#16417)
Sergey Andreenko [Fri, 16 Feb 2018 08:22:25 +0000 (00:22 -0800)]
reenable readytorun\tests\mainv* for arm jitstress (#16417)

6 years agoFix coreOverlayDir in Unix test instructions (#16415)
Sung Yoon Whang [Fri, 16 Feb 2018 03:43:01 +0000 (19:43 -0800)]
Fix coreOverlayDir in Unix test instructions (#16415)

6 years agoAdd ReadOnlySpan string-like ToLower/ToUpper API with globalization support (#16379)
Ahson Khan [Fri, 16 Feb 2018 02:43:43 +0000 (18:43 -0800)]
Add ReadOnlySpan string-like ToLower/ToUpper API with globalization support (#16379)

* Add ReadOnlySpan string-like ToLower/ToUpper API with globalization support

* Address PR feedback.

6 years agoFix for assert(sideEffList) in clr\src\jit\optcse.cpp, Line: 2151
Brian Sullivan [Fri, 16 Feb 2018 01:15:59 +0000 (17:15 -0800)]
Fix for assert(sideEffList) in clr\src\jit\optcse.cpp, Line: 2151

If we return WALK_ABORT this assert will fire when the side effect list 'keepList' is empty.
With this fix we don't return WALK_ABORT when the keepList is empty, instead we just place
the CSE def into the keepList

6 years agoImplement SSE4.1 LoadAlignedVector128NonTemporal
Fei Peng [Thu, 15 Feb 2018 23:25:09 +0000 (15:25 -0800)]
Implement SSE4.1 LoadAlignedVector128NonTemporal

6 years agoaddress GT_ADDR(GT_HWIntrinsic) nodes
Fei Peng [Thu, 15 Feb 2018 01:21:07 +0000 (17:21 -0800)]
address GT_ADDR(GT_HWIntrinsic) nodes

6 years agoFix importer and morph with HWIntrinsic SIMD types
Fei Peng [Wed, 14 Feb 2018 22:01:09 +0000 (14:01 -0800)]
Fix importer and morph with HWIntrinsic SIMD types

6 years agoFix typo in GC log (#16398)
Kevin Gosse [Thu, 15 Feb 2018 20:08:15 +0000 (21:08 +0100)]
Fix typo in GC log (#16398)

6 years agoMerge pull request #16160 from sdmaclea/PR-ARM64-SIMD-INSERT
Carol Eidt [Thu, 15 Feb 2018 15:30:29 +0000 (07:30 -0800)]
Merge pull request #16160 from sdmaclea/PR-ARM64-SIMD-INSERT

[Arm64] Implement Simd.Insert

6 years agoImplement RuntimeHelpers.PrepareMethod/PrepareDelegate for CoreCLR (#16382)
Jan Kotas [Thu, 15 Feb 2018 06:19:16 +0000 (20:19 -1000)]
Implement RuntimeHelpers.PrepareMethod/PrepareDelegate for CoreCLR (#16382)

* Implement RuntimeHelpers.PrepareMethod/PrepareDelegate for CoreCLR

CoreCLR implementation of this method triggers jiting of the given method only.
It does not walk a subset of callgraph to provide CER guarantees because of CERs
are not supported by CoreCLR.

Fixes #15522

6 years agoTypos (dotnet/corert#5386)
John Doe [Wed, 14 Feb 2018 16:08:24 +0000 (08:08 -0800)]
Typos (dotnet/corert#5386)

* acces -> access

* accesss -> access

* acknowleges -> acknowledges

* actitivy -> activity

* Additonally -> Additionally

* Activable -> Activatable

* adjustting -> adjusting

* Aggresive -> Aggressive

* agressively -> aggressively

* agressive -> aggressive

* Aleady -> Already

* alernate -> alternate

* aligh -> align

* Alloctor -> Allocator

* allready -> already

* Althought -> Although

* Amonst -> Amongst

* anthing -> anything

* Anthyhing -> Anything

* Aquired -> Acquired

* aquire -> acquire

* Architecure -> Architecture

* Arthimatic -> Arithmetic

* artiface -> artifact

* artifical -> artificial

* Arugment -> Argument

* assigining -> assigning

* atomicly -> atomically

* auxillary -> auxiliary

* avilability -> availability

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
6 years agoStringComparer Create(culture, CompareOptions) overload (#16334)
Anirudh Agnihotry [Thu, 15 Feb 2018 01:47:14 +0000 (17:47 -0800)]
StringComparer Create(culture, CompareOptions) overload (#16334)

* String Create options overlaod

* Minor Change

* Feedback

* validation on options

* obsolete removed

* Implementing Iserializable and removing ignorecase

* HashCode and serialization changes

* made inline

* Space Corrected

6 years agosigsegv_handler: handle case when it is called on original stack (#16276)
Konstantin Baladurin [Thu, 15 Feb 2018 01:25:32 +0000 (04:25 +0300)]
sigsegv_handler: handle case when it is called on original stack (#16276)

* CatchHardwareExceptionHolder: use GetCurrentPalThread instead of
InternalGetCurrentThread in IsEnabled method.

InternalGetCurrentThread tries to create pal thread if it doesn't
exist for the current thread. It's unnecessary because in this case
there are no hardware exception handlers for such thread.

Also CatchHardwareExceptionHolder::IsEnable is called from signal
handlers and during pal thread creation non-async-signal-safe
function are called.

* vm/threads: change tls model for gCurrentThreadInfo variable

We should use initial-exec tls model to avoid memory allocations
during first access to this variable because it may ocuur in
signal handlers.

* sigsegv_handler: handle case when it is called on original stack

If sigsegv_handler is called on original stack (for example, if segmentation
fault occurs in native application's thread that hasn't alternate signal stack)
we should call common_signal_handler directly othersize sigsegv_handler's
stackframe will be corrupted.

6 years agoAdding Argument name to the Exception (#16372)
Anirudh Agnihotry [Wed, 14 Feb 2018 23:54:18 +0000 (15:54 -0800)]
Adding Argument name to the Exception (#16372)

6 years ago[RyuJit] Stack level setter (#15597)
Sergey Andreenko [Wed, 14 Feb 2018 23:38:58 +0000 (15:38 -0800)]
[RyuJit] Stack level setter (#15597)

* create a new phase: StackLevelSetter

* add repro

* Fix grammar mistakes

* use the default hash

* delete values from the map.

* create gentree::OperIsPutArgStkOrSplit

* fix more comments

* delete an extra condition that is always true

* use GTSTRUCT_2_SPECIAL for PutArgStk

* extract fgUseThrowHelperBlocks

* optimize memory for amd64 and additional checks for x86

* change checks

The previous version was wrong, because morph can call fgAddCodeRef several times for the same instruction during different phases.

* fix comments

* fix genJumpToThrowHlpBlk

* small ref in genJumpToThrowHlpBlk

* fix rebase problems.

* use fgUseThrowHelperBlocks instead of !opts.compDbgCode

* add throwHelperBlocksUsed for throughput.

6 years agoClean up runtest.cmd
Bruce Forstall [Wed, 14 Feb 2018 21:31:03 +0000 (13:31 -0800)]
Clean up runtest.cmd

Don't do NI and LOCK deletion (which is slow) if doing
GenerateLayoutOnly.

Plus, other smaller changes to make the file easier to read,
such as adding more comments.

6 years ago[armel tizen] Fixed dynamic code allocation and code pitching for ARM (#16352)
sergey ignatov [Wed, 14 Feb 2018 22:35:21 +0000 (01:35 +0300)]
[armel tizen] Fixed dynamic code allocation and code pitching for ARM (#16352)

* [armel tizen] Fixed dynamic code allocation for ARM

* Added comment

* Used ThumbCodeToDataPointer

* Changed to PCODEToPINSTR

6 years agoMerge pull request #16367 from briansull/vso-566984
Brian Sullivan [Wed, 14 Feb 2018 22:03:27 +0000 (14:03 -0800)]
Merge pull request #16367 from briansull/vso-566984

Fix for CSE - Assertion failed '!"Badly linked tree"'

6 years agoMark sharedgenerics test as GCStressIncompatible (#16391)
Michal Strehovský [Wed, 14 Feb 2018 21:04:47 +0000 (22:04 +0100)]
Mark sharedgenerics test as GCStressIncompatible (#16391)

6 years agoMerge pull request #16380 from kbaladurin/fix-uaf
Bruce Forstall [Wed, 14 Feb 2018 20:11:49 +0000 (12:11 -0800)]
Merge pull request #16380 from kbaladurin/fix-uaf

Histogram: doesn't allocate additional memory to store counts

6 years agoFix the fired asset in CompareInfo.IndexOf (#16373)
Tarek Mahmoud Sayed [Wed, 14 Feb 2018 18:54:14 +0000 (10:54 -0800)]
Fix the fired asset in CompareInfo.IndexOf (#16373)

6 years agoImplement WaitHandle.SignalAndWait on Unix (#16383)
Koundinya Veluri [Wed, 14 Feb 2018 18:27:32 +0000 (10:27 -0800)]
Implement WaitHandle.SignalAndWait on Unix (#16383)

Part of fix for https://github.com/dotnet/coreclr/issues/10441

6 years agoAdd VSD additional param for DIRECT calls. (#16267)
Sergey Andreenko [Wed, 14 Feb 2018 17:39:21 +0000 (09:39 -0800)]
Add VSD additional param for DIRECT calls. (#16267)

* add a virtualStubParamInfo as an argument

* try to delete duplicates

expect many failures for arm in lower because we delete: // Change the call type, so we can add the extra indirection here, rather than in codegen

* Revert legacy workaround from lower.

* Fix GetNonStandardAddedArgCount

6 years ago[Arm64] Additional Insert comments
Steve MacLean [Wed, 14 Feb 2018 17:06:59 +0000 (12:06 -0500)]
[Arm64] Additional Insert comments

6 years agoHistoram: doesn't allocate additional memory to store counts
Konstantin Baladurin [Wed, 14 Feb 2018 07:46:19 +0000 (10:46 +0300)]
Historam: doesn't allocate additional memory to store counts

It allows to remove deallocation in destuctor that can lead to uaf
for static Historgam's objects during shutdown.

6 years agoFix for issue #13153 - change SetGCConcurrent to TemporaryDisableConcurrentGC for...
David Mason [Wed, 14 Feb 2018 10:18:39 +0000 (02:18 -0800)]
Fix for issue #13153 - change SetGCConcurrent to TemporaryDisableConcurrentGC for profiler startup path. (#16314)

6 years agoHandle ELEMENT_TYPE_PTR in ILCodeStream::EmitLDIND/EmitSTIND (#16381)
Michal Strehovský [Wed, 14 Feb 2018 10:16:09 +0000 (11:16 +0100)]
Handle ELEMENT_TYPE_PTR in ILCodeStream::EmitLDIND/EmitSTIND (#16381)

Fixes #16371.

6 years agoFix ARM/ARM64 hijacking in tail calls (#16039)
Jan Vorlicek [Wed, 14 Feb 2018 09:15:19 +0000 (10:15 +0100)]
Fix ARM/ARM64 hijacking in tail calls (#16039)

* Fix ARM/ARM64 hijacking in tail calls

This change fixes an issue that can happen when a function that has tail
calls is hijacked. There are two potential issues:

1. When a function that tail calls another one is hijacked, the LR may be
stored at a different location in the stack frame of the tail call
target.
So just by performing tail call, the hijacked location becomes invalid and
unhijacking would corrupt stack by writing to that location.

2. There is a small window after the caller pops LR from the stack in its
epilog and before the tail called function pushes LR in its prolog when
the hijacked return address would not be not on the stack and so we would
not be able to unhijack.

The fix is to prevent hijacking of functions that contain tail calls.

* Enable the tailcall hijacking test for ARM64

The test JIT/Methodical/tailcall_v4/hijacking should be passing now on
ARM64.

6 years agoAdd ReadOnlySpan string-like StartsWith and EndsWith API with globalization support...
Ahson Khan [Wed, 14 Feb 2018 02:18:46 +0000 (18:18 -0800)]
Add ReadOnlySpan string-like StartsWith and EndsWith API with globalization support (#16223)

* Add ReadOnlySpan string-like StartsWith API with globalization support

* Add ReadOnlySpan string-like EndsWith API with globalization support

* Fix nits from PR feedback.

* Address PR feedback

* Add unsafe keyword in CompareInfo.Unix methods.

* Address PR feedback and fix signature of Interop.Globalization.EndsWith

* Code formatting cleanup as suggested by VS.

* Revert "Code formatting cleanup as suggested by VS."

This reverts commit 20931fbf1ae113c6acaa3a4b2c0789b46d7ab06b.

* Creating Span specific methods and working around use of IsFastSort

* Code cleanup

* Improve performance by avoiding slicing and fix impl bug

* Remove commented out code and revert some calls to FindString

* Updating checks for Unix to mimic what IsFastSort does.

* Add length checks and include IsFastSort check within the loop

* Fix bounds checks to not include 0x80

* Call correct method when StringComparison is IgnoreCase.

* Update exception type in string compare to remain consistent

6 years agoFix clang format warnings
Brian Sullivan [Wed, 14 Feb 2018 00:17:43 +0000 (16:17 -0800)]
Fix clang format warnings

6 years agoCheck for the very uncommon case where when we are replacing a CSE use
Brian Sullivan [Tue, 13 Feb 2018 23:48:38 +0000 (15:48 -0800)]
Check for the very uncommon case where when we are replacing a CSE use
and it contains a CSE def which itself has persistent side effects.
For such a case we simply abandon the replacement of the CSE use.

6 years agoAdd Sse2 scalar hardware intrinsics tests
Jacek Blaszczynski [Tue, 6 Feb 2018 20:24:59 +0000 (21:24 +0100)]
Add Sse2 scalar hardware intrinsics tests

6 years agoImplement scalar Sse2 hardware intrinsics
Jacek Blaszczynski [Sat, 27 Jan 2018 21:18:05 +0000 (22:18 +0100)]
Implement scalar Sse2 hardware intrinsics

6 years agoFix registry path for ETW argument lookup. (#16347)
Brian Robbins [Tue, 13 Feb 2018 22:34:31 +0000 (14:34 -0800)]
Fix registry path for ETW argument lookup. (#16347)

6 years agoMerge pull request #16344 from brunotag/patch-1
Wes Haggard [Tue, 13 Feb 2018 19:16:50 +0000 (11:16 -0800)]
Merge pull request #16344 from brunotag/patch-1

Update UsingYourBuild.md

6 years agoMerge pull request #16351 from fiigii/fixcont
Carol Eidt [Tue, 13 Feb 2018 15:42:38 +0000 (07:42 -0800)]
Merge pull request #16351 from fiigii/fixcont

Remove an incorrect assertion in containment analysis

6 years agoMerge pull request #15950 from dotnetrt/isafix
Carol Eidt [Tue, 13 Feb 2018 15:34:34 +0000 (07:34 -0800)]
Merge pull request #15950 from dotnetrt/isafix

On all platforms first member of InstructionSet enum is InstructionSet_ILLEGAL

6 years agoFix an incorrect assertion in containment analysis
Fei Peng [Tue, 13 Feb 2018 07:42:34 +0000 (23:42 -0800)]
Fix an incorrect assertion in containment analysis

6 years agoFix ambiguous interface method error message (#16341)
Michal Strehovský [Tue, 13 Feb 2018 07:19:30 +0000 (08:19 +0100)]
Fix ambiguous interface method error message (#16341)

Fixes #15864.

6 years agoDefine type initialization semantics for interface instance methods (#16340)
Michal Strehovský [Tue, 13 Feb 2018 04:08:29 +0000 (05:08 +0100)]
Define type initialization semantics for interface instance methods (#16340)

* Define type initialization semantics for interface instance methods

Accessing an instance method on an interface should trigger non-beforefieldinit class constructors (same as it does for valuetypes).

Fixes #15650.

6 years agoImprove perf of DelegateConstruct (#16345)
Andy Ayers [Tue, 13 Feb 2018 03:31:51 +0000 (19:31 -0800)]
Improve perf of DelegateConstruct (#16345)

Remove a range lookup that's no longer needed.

See related issue #12438.

6 years agoFix SSE4.1 encoding
Fei Peng [Mon, 12 Feb 2018 21:51:32 +0000 (13:51 -0800)]
Fix SSE4.1 encoding

6 years agoImplement SSE4.2 CompareGreaterThan
Fei Peng [Mon, 12 Feb 2018 20:51:31 +0000 (12:51 -0800)]
Implement SSE4.2 CompareGreaterThan

6 years agoImplement SSE4.1 CompareEqual
Fei Peng [Mon, 12 Feb 2018 20:50:51 +0000 (12:50 -0800)]
Implement SSE4.1 CompareEqual

6 years agoreenable AVX2 compareEqual.Int64
Fei Peng [Mon, 12 Feb 2018 20:49:59 +0000 (12:49 -0800)]
reenable AVX2 compareEqual.Int64

6 years agoMerge pull request #16181 from Buyduck/arm-memory-barrier
Bruce Forstall [Tue, 13 Feb 2018 00:26:25 +0000 (16:26 -0800)]
Merge pull request #16181 from Buyduck/arm-memory-barrier

[RyuJIT/arm32] Support GTF_IND_VOLATILE and GTF_BLK_VOLATILE

6 years agoMerge pull request #16008 from sdmaclea/PR-ARM64-TEST-SIMD-HWINTRINSIC
Carol Eidt [Mon, 12 Feb 2018 23:00:30 +0000 (15:00 -0800)]
Merge pull request #16008 from sdmaclea/PR-ARM64-TEST-SIMD-HWINTRINSIC

[Arm64] Add Simd HWIntrinsic test

6 years agoInsert contain extract
Steve MacLean [Mon, 12 Feb 2018 18:08:54 +0000 (13:08 -0500)]
Insert contain extract

6 years agoMerge pull request #16309 from MattGal/eol-some-linuxes
Matt Galbraith [Mon, 12 Feb 2018 20:56:46 +0000 (12:56 -0800)]
Merge pull request #16309 from MattGal/eol-some-linuxes

Remove EOL OSes and add new / missing ones

6 years agoUpdate UsingYourBuild.md
Bruno Tagliapietra [Mon, 12 Feb 2018 19:35:22 +0000 (08:35 +1300)]
Update UsingYourBuild.md

Apparently it needs a PlatformTarget to be specified as well when targeting x64 architecture

6 years agoJIT: Allow struct promotion in GS frames (#16220)
Andy Ayers [Mon, 12 Feb 2018 19:30:45 +0000 (11:30 -0800)]
JIT: Allow struct promotion in GS frames (#16220)

Enable struct promotion in methods where the jit is also emtting a stack guard.
Not allowing promotion seems like an unnecessary limitation and leads to poor
performance in methods with both Span and stackalloc.

Closes #16197.

6 years agoUse DateTime.ToFileTimeUtc to generate serializable DateTime for TraceLogging events...
Brian Robbins [Mon, 12 Feb 2018 19:15:40 +0000 (11:15 -0800)]
Use DateTime.ToFileTimeUtc to generate serializable DateTime for TraceLogging events. (#16317)

6 years agoAdd TestInsert
Steve MacLean [Thu, 1 Feb 2018 17:37:30 +0000 (12:37 -0500)]
Add TestInsert

6 years agoImprove diagnostics
Steve MacLean [Thu, 8 Feb 2018 17:26:47 +0000 (12:26 -0500)]
Improve diagnostics

6 years ago[Arm64] Add Simd HWIntrinsic test
Steve MacLean [Sat, 16 Dec 2017 01:04:06 +0000 (20:04 -0500)]
[Arm64] Add Simd HWIntrinsic test

6 years agoJIT: look for escaping byrefs (#16305)
Andy Ayers [Mon, 12 Feb 2018 17:16:53 +0000 (09:16 -0800)]
JIT: look for escaping byrefs (#16305)

If a byref is passed to a call or used in an assign, assume it escapes and
that subsequent dereferences may be made at arbitrary offsets.

This handles cases where a user takes the address of one field of a struct,
then uses that byref that to access other fields or non-field content within
the struct, and the byref formation and use are split across statements or
across caller-callee contexts.

Closes #16210.

6 years agoUpdate CoreClr, CoreFx, PgoData to preview2-26212-01, preview2-26212-01, master-20180...
dotnet-maestro-bot [Mon, 12 Feb 2018 12:26:26 +0000 (06:26 -0600)]
Update CoreClr, CoreFx, PgoData to preview2-26212-01, preview2-26212-01, master-20180212-0035, respectively (#16335)

6 years agoImprove CMake detection on Windows when not in PATH (#16328)
Jan Kotas [Mon, 12 Feb 2018 07:00:55 +0000 (23:00 -0800)]
Improve CMake detection on Windows when not in PATH (#16328)

Port dotnet/corert#5372

curl https://github.com/dotnet/corert/commit/b723f90c611a2c79a0921f95c7299ebb7325eb59.patch | git am -p 3 --directory='src/pal/tools/' --reject

In CMake v10.2, the key `hklm:\SOFTWARE\Kitware` returns:

```powershell
    Hive: HKEY_LOCAL_MACHINE\SOFTWARE\Kitware

Name                           Property
----                           --------
CMake                          InstallDir : C:\Program Files\CMake\
```

with no space after `CMake` and property name `InstallDir`,
instead of `'(default)'`.

6 years agoFix stack trace population to get proper source/line info for tier 1 methods (#16302)
Koundinya Veluri [Mon, 12 Feb 2018 00:57:09 +0000 (16:57 -0800)]
Fix stack trace population to get proper source/line info for tier 1 methods (#16302)

Fixes https://github.com/dotnet/coreclr/issues/16224

6 years agoUpdate CoreClr, CoreFx to preview2-26211-03, preview2-26211-04, respectively (#16327)
dotnet-maestro-bot [Sun, 11 Feb 2018 16:34:54 +0000 (10:34 -0600)]
Update CoreClr, CoreFx to preview2-26211-03, preview2-26211-04, respectively (#16327)