platform/upstream/coreclr.git
7 years agoAdd IsValidYear/Day overrides to GregorianCalendar
Stephen Toub [Fri, 8 Sep 2017 13:57:55 +0000 (09:57 -0400)]
Add IsValidYear/Day overrides to GregorianCalendar

The base implementation makes several virtual calls that the derived implementation can avoid.

7 years agoAvoid slicing/extra method call while tokenizing in common case
Stephen Toub [Fri, 8 Sep 2017 14:05:22 +0000 (10:05 -0400)]
Avoid slicing/extra method call while tokenizing in common case

7 years agoMove DateTimeParse to use spans internally
Stephen Toub [Fri, 8 Sep 2017 13:52:05 +0000 (09:52 -0400)]
Move DateTimeParse to use spans internally

So that we can reuse the same implementation for the public span-based APIs.

7 years agoDisable PGO optimization on linux (#14290)
Michelle McDaniel [Fri, 6 Oct 2017 12:15:16 +0000 (05:15 -0700)]
Disable PGO optimization on linux (#14290)

With the update to llvm 3.9, the pgo data is incompatible since it was
generated with llvm 3.6. Currently, both the pgo data generation builds
and the automatic updates of counts are currently down, so pgo data is
not being updated. Until these problems are fixed, disable pgo
optimization for release builds on linux.

7 years ago enable lttng for FreeBSD. (#14342)
Tomas Weinfurt [Fri, 6 Oct 2017 08:43:54 +0000 (01:43 -0700)]
 enable lttng for FreeBSD. (#14342)

*  enable lttng for FreeBSD. it is supported for user space

* unify Linux and FreeBSD branches for lttng. At lest for now, they are identical

7 years agoMerge pull request #14253 from wateret/fix-14251
Bruce Forstall [Fri, 6 Oct 2017 05:31:17 +0000 (22:31 -0700)]
Merge pull request #14253 from wateret/fix-14251

[RyuJIT/armel] Fix regression

7 years agoUpdate Microsoft.NETCore.Native package (dotnet/corert#4646)
Jan Kotas [Tue, 3 Oct 2017 04:28:12 +0000 (21:28 -0700)]
Update Microsoft.NETCore.Native package (dotnet/corert#4646)

Partial port of https://github.com/dotnet/coreclr/pull/10264

Fixes #4640

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoUpdate CentOS 6 and 7 docker images (#14349)
Jan Vorlicek [Fri, 6 Oct 2017 01:12:04 +0000 (03:12 +0200)]
Update CentOS 6 and 7 docker images (#14349)

The images now contains clang 3.9 with PGO support

7 years agoFix new deadlock possibility in ReaderWriterLockSlim from a recent change (#14337)
Koundinya Veluri [Thu, 5 Oct 2017 19:06:07 +0000 (12:06 -0700)]
Fix new deadlock possibility in ReaderWriterLockSlim from a recent change (#14337)

Fix new deadlock possibility in ReaderWriterLockSlim from a recent change

Fixed the following scenario that would lead to deadlock (rare, but frequently reproducible if code is changed):
- Thread T0 signals the write waiter event or the upgradeable read waiter event to wake a waiter
- There are no threads waiting on the event, but T1 is in WaitOnEvent() after exiting the spin lock and before actually waiting on the event (that is, it's recorded that there is one waiter for the event). It remains in this region for a while, in the repro case it typically gets context-switched out.
- T2 acquires the RW lock in some fashion that blocks T0 or T3 from acquiring the RW lock
- T0 or T3 fails to acquire the RW lock enough times for it to enter WaitOnEvent for the same event as T1
- T0 or T3 resets the event
- T2 releases the RW lock and does not wake a waiter because the reset at the previous step lost a signal but _waiterStates was not updated to reflect that
- T1 and other threads begin waiting on the event, but there's no longer any thread that would wake them

7 years agoJIT: More type equality opts (#14317)
Andy Ayers [Thu, 5 Oct 2017 18:31:58 +0000 (11:31 -0700)]
JIT: More type equality opts (#14317)

* JIT: Wrap some runtime lookups in new node type

Work based on the plan outlined in #14305.

Introduce a new unary node type GT_RUNTIMELOOKUP that wraps existing
runtime lookup trees created in `impLookupToTree` and holds onto the
handle that inspired the lookup.

Note there are other importer paths that create lookups directly that
we might also want to wrap, though wrapping is not a requirement for
correctness.

Keep this node type around through morph, then unwrap and just use
the wrapped node after that.

* JIT: More enhancements to type equality testing

The jit is now able to optimize some type equality checks in shared
method instances where one or both of the types require runtime lookup,
for instance comparing `T` to a value type, or comparing two different
value types `V1<T>` and `V2<T>`.

Add two new jit interface methods, one for testing for type equality and
the other for type casting.

These return Must/MustNot/Maybe results depending on whether or not
the equality or cast can be resolved at jit time.

Implement the equality check. Use this to enhance the type equality opts
in the jit for both direct comparison and the checking done by unbox.any.

7 years agofix gtDispTree (#14326)
Sergey Andreenko [Thu, 5 Oct 2017 18:21:19 +0000 (11:21 -0700)]
fix gtDispTree (#14326)

* fix gtDispTree

It is legal situation when we pass ILNone (for example for local stores:
gtDispChild(tree->gtOp.gtOp1, indentStack, IINone);). In this code we
poped value and didn't push anything back, it ended with the stack
underflow.

7 years ago[RyuJIT/armel] Fix regression
Hanjoung Lee [Fri, 29 Sep 2017 09:50:16 +0000 (18:50 +0900)]
[RyuJIT/armel] Fix regression

Fix calling a function passing double-type stack arguments.

Fix #14251

7 years ago[SOS] Fix address types inconsistency (#14188)
Konstantin Baladurin [Thu, 5 Oct 2017 10:07:31 +0000 (13:07 +0300)]
[SOS] Fix address types inconsistency (#14188)

GetObjFieldOffset function expects that cdaObj and cdaMT arguments
have CLRDATA_ADDRESS type (sign-extended) but in some cases we
use TADDR instead of CLRDATA_ADDRESS that isn't sign-extended.

Due to it some SOS commands (for example DumpRuntimeTypes) don't
work on x86 and ARM32.

7 years ago[x86/Linux][SOS] Fix clrstack command of lldb sosplugin on x86 (#13973)
Konstantin Baladurin [Thu, 5 Oct 2017 08:31:44 +0000 (11:31 +0300)]
[x86/Linux][SOS] Fix clrstack command of lldb sosplugin on x86 (#13973)

* [x86/Linux][SOS] Add support for x86 in GetContextFromFrame

It's need for 'clrstack -f' command of SOS plugin on x86.

* [x86/Linux] Fix RtlpGetFunctionEndAddress function

We should use PTR_UNWIND_INFO instead of PUNWIND_INFO for pointer to
UNWIND_INFO structure because it's pointer from other process and
we need to use DAC to read data using it.

* [x86/Linux][SOS] Define DEBUG_STACK_CONTEXT for x86

It's needed for 'clrstack -f' command in libsosplugin.

* [x86/Linux] Fix undefined references in libmscordbi.so on x86

Asm block like following:
__asm fnsave currentFPUState

where currentFPUState is structure works with MSVC but leads to
undefined reference currentFPUState in the binary with other
compilers. So rewrite such asm blocks for them.

This patch fixes error "Unable to load 'libmscordbi.so'" during
execution of 'clrstack -f' command of SOS plugin on x86.

* [x86/Linux] Fix calling convention inconsistency

WINAPI and STDAPI are defined as __cdecl but in some cases functions
with these attributes are called using stdcall calling convention.

It leads to crashes during execution of 'clrstack -i' command of
SOS plugin on x86.

7 years agoFix condition flags reuse optimization (#14323)
mikedn [Thu, 5 Oct 2017 05:04:26 +0000 (08:04 +0300)]
Fix condition flags reuse optimization (#14323)

This optimization is not valid for unsigned LT/LE/GT/GE relops. Using the Carry flag this way indicates that the operation overflowed, not that the result is less than 0, that's impossible for unsigned integers.

This is also not valid for signed LT/LE/GT/GE relops due to integer overflow.

7 years agofgDebugCheckFlags should use OperMayThrow for all nodes. (#14330)
Sergey Andreenko [Thu, 5 Oct 2017 04:34:26 +0000 (21:34 -0700)]
fgDebugCheckFlags should use OperMayThrow for all nodes. (#14330)

GT_CATCH_ARG should not be marled as MayThrow.

7 years agoTweaks for arm/arm64 altjit CI jobs (#14306)
Bruce Forstall [Wed, 4 Oct 2017 23:29:46 +0000 (16:29 -0700)]
Tweaks for arm/arm64 altjit CI jobs (#14306)

1. Make trigger phrase for default job include "Build And Test". Otherwise,
triggering a stress mode also causes the default job to be triggered.
2. Change the SetStressModes.bat creation command to be a single Jenkins
executed command, not multiple separate commands.
3. To aid debugging, display the resulting SetStressModes.bat script so it
gets captured in the run output log.

7 years agoMerge pull request #14328 from crummel/cmakeDocUpdate
Chris Rummel [Wed, 4 Oct 2017 22:02:48 +0000 (17:02 -0500)]
Merge pull request #14328 from crummel/cmakeDocUpdate

Update official version of CMake.

7 years agoMerge pull request #14315 from adiaaida/addPerfPipeline
Michelle McDaniel [Wed, 4 Oct 2017 21:50:47 +0000 (14:50 -0700)]
Merge pull request #14315 from adiaaida/addPerfPipeline

Change name of perf-pipelinejobs to perf_pipelinejobs

7 years agoUpdate official version of CMake.
Chris Rummel [Wed, 4 Oct 2017 21:43:10 +0000 (16:43 -0500)]
Update official version of CMake.

7 years agoMerge pull request #14307 from fiigii/removeavxflag
Bruce Forstall [Wed, 4 Oct 2017 21:09:03 +0000 (14:09 -0700)]
Merge pull request #14307 from fiigii/removeavxflag

[RyuJIT] Remove FEATURE_AVX_SUPPORT flag

7 years agoMerge pull request #14294 from sdmaclea/PR-ARM64-EMIT-Exclusives
Brian Sullivan [Wed, 4 Oct 2017 20:52:18 +0000 (13:52 -0700)]
Merge pull request #14294 from sdmaclea/PR-ARM64-EMIT-Exclusives

[Arm64] Add LD/ST exclusive emitters

7 years agoMerge pull request #14318 from sdmaclea/PR-Fix-jump-bind-typo
Brian Sullivan [Wed, 4 Oct 2017 20:51:50 +0000 (13:51 -0700)]
Merge pull request #14318 from sdmaclea/PR-Fix-jump-bind-typo

[Arm64] Fix emitJumpDistBind typo

7 years agoMerge pull request #14293 from sdmaclea/PR-ARM64-SMUL-DIS
Brian Sullivan [Wed, 4 Oct 2017 20:51:10 +0000 (13:51 -0700)]
Merge pull request #14293 from sdmaclea/PR-ARM64-SMUL-DIS

[Arm64] Fix smul[lh] disassembly

7 years agoMove String.Searching.cs to shared CoreLib partition (dotnet/corert#4673)
Jan Kotas [Wed, 4 Oct 2017 15:39:18 +0000 (08:39 -0700)]
Move String.Searching.cs to shared CoreLib partition (dotnet/corert#4673)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoMerge pull request #14325 from dotnet-bot/from-tfs
Brian Sullivan [Wed, 4 Oct 2017 19:18:02 +0000 (12:18 -0700)]
Merge pull request #14325 from dotnet-bot/from-tfs

Merge changes from TFS

7 years agoAllow X86 Hardware intrinsics for non-Legacy 32-bit x86
Brian Sullivan [Wed, 4 Oct 2017 17:15:26 +0000 (10:15 -0700)]
Allow X86 Hardware intrinsics for non-Legacy 32-bit x86
Unit tests exisist for this functionality on x86 CoreCLR

[tfs-changeset: 1677287]

7 years ago[Arm64] Fix emitJumpDistBind typo
Steve MacLean [Sat, 23 Sep 2017 05:10:20 +0000 (01:10 -0400)]
[Arm64] Fix emitJumpDistBind typo

7 years ago[Arm64] Fix IF_LS_3D emitter
Steve MacLean [Tue, 3 Oct 2017 20:23:35 +0000 (16:23 -0400)]
[Arm64] Fix IF_LS_3D emitter

7 years agoMerge pull request dotnet/corert#4663 from dotnet/nmirror
Jan Kotas [Tue, 3 Oct 2017 23:25:20 +0000 (16:25 -0700)]
Merge pull request dotnet/corert#4663 from dotnet/nmirror

Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoMerge pull request #14298 from stephentoub/stringconcat_char
Stephen Toub [Wed, 4 Oct 2017 02:14:26 +0000 (22:14 -0400)]
Merge pull request #14298 from stephentoub/stringconcat_char

Special-case T==char in string.Concat(IEnumerable<T>)

7 years agoMake CancellationTokenRegistration.Token public (#14310)
Stephen Toub [Wed, 4 Oct 2017 02:13:53 +0000 (22:13 -0400)]
Make CancellationTokenRegistration.Token public (#14310)

7 years agoFix broken ARM64 build (#14313)
Jan Vorlicek [Wed, 4 Oct 2017 01:35:12 +0000 (03:35 +0200)]
Fix broken ARM64 build (#14313)

The std::max was being passed arguments of different types (int and DWORD).

7 years agoremove FEATURE_AVX_SUPPORT flag
Fei Peng [Tue, 3 Oct 2017 23:37:56 +0000 (16:37 -0700)]
remove FEATURE_AVX_SUPPORT flag

7 years agoFew build changes to support Freebsd (#14121)
Tomas Weinfurt [Tue, 3 Oct 2017 23:42:14 +0000 (16:42 -0700)]
Few build changes to support Freebsd (#14121)

* also look for python27

* add more locations to search for lldb.h so it just work on FreeBSD

* add adm64 to ARCH selection. This is mostly cosmetic to avoild warning on FreeBSD

* add support for -osgroup=XXX - this is mostly for conistency. -OSGroup=FreeBSD is similar to freebsdmscorlib in build.cmd

* fix typo adm->amd

* add back fi removed by mistake

* add __HostDistroRid for FreeBSD

* adress fedback from review: make python lookup consistent - starting with most specific version. uddate warning message about lldb.h and remove composite flag

* feedback from review: type and small change on OSGroup syntax

* few more minor fixes

7 years agoChange name of perf-pipelinejobs to perf_pipelinejobs
Michelle McDaniel [Tue, 3 Oct 2017 22:55:38 +0000 (15:55 -0700)]
Change name of perf-pipelinejobs to perf_pipelinejobs

7 years agoUpdate Buildtools and Roslyn (#14228)
Jose Perez Rodriguez [Tue, 3 Oct 2017 22:21:52 +0000 (15:21 -0700)]
Update Buildtools and Roslyn (#14228)

* Update Buildtools and Roslyn

* Fixing importing of the roslyn files on msbuild 14.0

* Correctly looking for the latest VS Installation

7 years agoFix for x86 JIT build break
Brian Sullivan [Tue, 3 Oct 2017 21:58:17 +0000 (14:58 -0700)]
Fix for x86 JIT build break

[tfs-changeset: 1677224]

7 years agoMerge pull request #14312 from adiaaida/addPerfPipeline
Michelle McDaniel [Tue, 3 Oct 2017 21:53:56 +0000 (14:53 -0700)]
Merge pull request #14312 from adiaaida/addPerfPipeline

Add empty perf pipeline job

7 years agoMerge pull request #14295 from BruceForstall/FixArm64FastTailcallGSCookie
Bruce Forstall [Tue, 3 Oct 2017 21:06:59 +0000 (14:06 -0700)]
Merge pull request #14295 from BruceForstall/FixArm64FastTailcallGSCookie

Put JIT64 compat assert under `_TARGET_AMD64_` ifdef

7 years agoAdd empty perf pipeline job
Michelle McDaniel [Tue, 3 Oct 2017 21:00:41 +0000 (14:00 -0700)]
Add empty perf pipeline job

This is step one of adding the pipeline job for performance runs. In
this change, we add perf-pipelinejobs.groovy, which defines what Jenkins
will see in the UI. perf-pipeline.groovy is basically an empty job, so
we can test the actual perf-pipeline work after this is checked in,
which is step two.

7 years agoOptimize Memory<T> to ReadOnlyMemory<T> cast (#14309)
Stephen Toub [Tue, 3 Oct 2017 20:59:31 +0000 (16:59 -0400)]
Optimize Memory<T> to ReadOnlyMemory<T> cast (#14309)

They have the same layout; we can just use Unsafe.As.  In a microbenchmark that just repeatedly reads from a `Memory<byte>` field and writes it to a `ReadOnlyMemory<byte>` field, this doubles throughput.

7 years agoFix IsSafeToContained. (#14268)
Sergey Andreenko [Tue, 3 Oct 2017 20:38:02 +0000 (13:38 -0700)]
Fix IsSafeToContained. (#14268)

When AliasSet adds a node, it should also add all its nodes that are
executed inside it (marked as contained).

7 years agoJIT: run type equality optimizations earlier (#14244)
Andy Ayers [Tue, 3 Oct 2017 20:29:00 +0000 (13:29 -0700)]
JIT: run type equality optimizations earlier (#14244)

Refactor the type equality optimizations embedded in morph so that they can
also be invoked earlier, in particular, during importation. This allows the
importer to short-circut importing blocks that are provably unreachable. For
instance in generic methods with type specialization (via equality) the jit
will now selectively import just the applicable regions of the method. In some
cases this means the jit may avoid importing EH regions and so remove EH from
a specialized method all together.

Also, generalize the handle compare pattern to look through the handle indirs
that can arise when prejitting.

Running the type opts early also improves jit throughput a little.

Mark the embedded handle indirs as nonfaulting. Would also like to mark
them as invariant, but CSE gets overly enthusiastic and we see bad diffs.

7 years agoEnable CLR Thread Pool via a MSBuild flag (default enabled on Unix)
t-jekor [Wed, 5 Jul 2017 17:44:15 +0000 (10:44 -0700)]
Enable CLR Thread Pool via a MSBuild flag (default enabled on Unix)

This PR completes, adds tests for, and enables the CLR Thread Pool on Unix. It also adds Windows implementations for the low level primitives used in the CLR Thread Pool.

The thread pool is enabled by setting the MSBuild property FeaturePortableThreadPool to true, which is the default on Unix.

Supersedes #4039.
Rebased and squashed replacement for original PR #4124.

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoFix build with latest Xcode on OSX (#14282)
Jan Vorlicek [Tue, 3 Oct 2017 20:09:43 +0000 (22:09 +0200)]
Fix build with latest Xcode on OSX (#14282)

* Fix build with latest Xcode on OSX

The latest Xcode 9 cannot successfully build CoreCLR PAL. There are
several issues. First, it complains that min / max macros cannot be defined
in C++ code, since they would collide with the std::min and std::max
functions. Second, some of the headers that PAL includes pull in declarations
of several template classes that we explicitly define in PAL and also
the new operator declaration.

To fix that, I have undefined the min and max macros for PAL and replaced
their usage by the std::min / max functions. I have also removed the manual
declaration of the colliding template classes and new operator and added
inclusion of the proper C++ headers instead.

The PAL was including non-pal safemath.h and to make this change compatible
with it, I have added definition of USE_STL that makes safemath.h include
type_trait from STL instead of our local trimmed copy.

I have also removed some dead code that I have discovered during the process.

Fixes #14279

* Fix build on ARM32 and very recent GLIBCXX

7 years agoMerge pull request #14292 from sdmaclea/PR-ARM64-Unreached
Carol Eidt [Tue, 3 Oct 2017 19:24:49 +0000 (12:24 -0700)]
Merge pull request #14292 from sdmaclea/PR-ARM64-Unreached

[Arm64] Fix TODO-Cleanup add unreached

7 years agoMerge pull request #14027 from mikedn/simd-eq-opt
Carol Eidt [Tue, 3 Oct 2017 19:07:20 +0000 (12:07 -0700)]
Merge pull request #14027 from mikedn/simd-eq-opt

Simplify some relop/jtrue related optimizations

7 years ago[Arm64] Fix smul[lh] disassembly
Steve MacLean [Mon, 2 Oct 2017 22:30:01 +0000 (18:30 -0400)]
[Arm64] Fix smul[lh] disassembly

7 years ago[SOS] Use addresses without sign extension in lldb plugin (#14009)
Konstantin Baladurin [Tue, 3 Oct 2017 18:28:06 +0000 (21:28 +0300)]
[SOS] Use addresses without sign extension in lldb plugin (#14009)

lldb doesn't expect sign-extended addresses so we need to convert
them before using with lldb API.

This patch allows to use SOS plugin for core files in lldb on 32-bit
platforms and also fixes output of the 'clrstack -f' command.

7 years agoSpecial-case T==char in string.Concat(IEnumerable<T>)
Stephen Toub [Tue, 3 Oct 2017 15:29:06 +0000 (11:29 -0400)]
Special-case T==char in string.Concat(IEnumerable<T>)

This allows string.Concat to be used as an efficient mechanism for creating a `string` from an `IEnumerable<char>`.  The JIT specializes the implementation for char vs non-char, so there's minimal impact on the non-char case, and for the char case, we a) avoid creating a string for each individual char, and b) use StringBuilder's fast path for adding individual chars.  This can result in a massive allocation savings for long enumerations (for <= 1 char, there's no difference, but each character after that is an allocation saved), and for more than a few characters can yield up to a 2x increase in throughput.

7 years ago[x86/Linux] Fix regdisplay initialization in case of WIN64EXCEPTIONS (#14296)
Konstantin Baladurin [Tue, 3 Oct 2017 11:08:06 +0000 (14:08 +0300)]
[x86/Linux] Fix regdisplay initialization in case of WIN64EXCEPTIONS (#14296)

Method Debugger::IsThreadAtSafePlaceWorker for x86 sets values only
for ControlPC and PCTAddr fields of REGDISPLAY but there is assert
in StackFrameIterator::Init that checks that field pCurrentContext
is not NULL if WIN64EXCEPTIONS is defined.

This patch uses FillRegDisplay function to correctly initialize
regdisplay in case of WIN64EXCEPTIONS.

7 years agoPut JIT64 compat assert under `_TARGET_AMD64_` ifdef
Bruce Forstall [Tue, 3 Oct 2017 03:03:00 +0000 (20:03 -0700)]
Put JIT64 compat assert under `_TARGET_AMD64_` ifdef

Fixes #14205

7 years agodelete the old workaround. (#14288)
Sergey Andreenko [Tue, 3 Oct 2017 02:09:01 +0000 (19:09 -0700)]
delete the old workaround. (#14288)

gcc is not supported.

7 years ago[Arm64] Add LD/ST exclusive emitters
Steve MacLean [Mon, 2 Oct 2017 22:19:29 +0000 (18:19 -0400)]
[Arm64] Add LD/ST exclusive emitters

7 years agoMerge pull request #14220 from wateret/ryu-arm-bitcast-cleanup
Bruce Forstall [Mon, 2 Oct 2017 23:29:45 +0000 (16:29 -0700)]
Merge pull request #14220 from wateret/ryu-arm-bitcast-cleanup

[RyuJIT/arm32] Code cleanup

7 years ago[Arm64] Fix TODO-Cleanup add unreached
Steve MacLean [Mon, 2 Oct 2017 22:41:07 +0000 (18:41 -0400)]
[Arm64] Fix TODO-Cleanup add unreached

7 years agoImprove runtest.sh concurrency (#14036)
Hanjoung Lee [Mon, 2 Oct 2017 23:22:48 +0000 (08:22 +0900)]
Improve runtest.sh concurrency (#14036)

* Imporove runtest.sh concurrency

`runtest.sh` runs next tests immediately after any of child processes is done

* Fix runtest.sh getting number of processors

For linux, check if `nproc` or `getconf` exists
when getting number of processors.

* Add tests that fail with OOM to unsupported list

Add several tests that consumes a lot of memory to unsupported test list(arm32).
This change is temporary until we properly handle these test with memory issue.

7 years agoMerge pull request #14274 from fiigii/vexencoding
Carol Eidt [Mon, 2 Oct 2017 20:44:10 +0000 (13:44 -0700)]
Merge pull request #14274 from fiigii/vexencoding

[RyuJIT] Fix VEX.vvvv for cvtss2sd and cvtsd2ss

7 years agoFix a jump over variable initialization (#14286)
Sean Gillespie [Mon, 2 Oct 2017 20:27:31 +0000 (13:27 -0700)]
Fix a jump over variable initialization (#14286)

7 years agoMerge pull request #14181 from ViktorHofer/MutexCodeCleanup
Viktor Hofer [Mon, 2 Oct 2017 19:54:19 +0000 (21:54 +0200)]
Merge pull request #14181 from ViktorHofer/MutexCodeCleanup

Mutex code cleanup and removal of unused types

7 years agoWorkaround GetSystemTimePreciseAsFileTime inaccuracies (#14283)
Stephen Toub [Mon, 2 Oct 2017 19:17:58 +0000 (15:17 -0400)]
Workaround GetSystemTimePreciseAsFileTime inaccuracies (#14283)

* Workaround GetSystemTimePreciseAsFileTime inaccuracies

On misconfigured systems, GetSystemTimePreciseAsFileTime may drift quickly from GetSystemTimeAsFileTime.  We want to use the former, though.  As a workaround/heuristic, when checking whether we have GetSystemTimePreciseAsFileTime, invoke both and ensure they're "close", falling back to GetSystemTimeAsFileTime if it seems like the precise variant has run away.

* Update comment

7 years agoSmall bug fixes on "perf.groovy" (#14259)
José Rivero [Mon, 2 Oct 2017 16:53:20 +0000 (09:53 -0700)]
Small bug fixes on "perf.groovy" (#14259)

- `submission-metadata` option is `--user-email`, not `--user`
- We need to escape user input. On batch, " -> ""

7 years agoThe !DumpArray sos command emits invalid DML for array elements (#13855)
tvass83 [Mon, 2 Oct 2017 13:27:48 +0000 (15:27 +0200)]
The !DumpArray sos command emits invalid DML for array elements (#13855)

Element Methodtable is reported correctly but for individual elements, the generated DML uses the MT of the array, not the element, thus giving incorrect results
Only value types are affected

0:007> !DumpArray /d 02b16574
Name:        WindowsFormsApplication2_SOS_bug.Test[]
MethodTable: 011c82ec
EEClass:     011c8290
Size:        412(0x19c) bytes
Array:       Rank 1, Number of elements 100, Type VALUETYPE
Element Methodtable: 011c824c
[0] 02b1657c => here is the problem

7 years agoMove JCMP transform to LowerJTrue
Mike Danes [Sun, 1 Oct 2017 10:53:42 +0000 (13:53 +0300)]
Move JCMP transform to LowerJTrue

Unlike many other relop transforms we do this one is only triggerred by the presence of a conditional branch (JTRUE) so it makes more sense to do it when lowering JTRUE nodes, avoids unnecessary calls to TryGetUse.

7 years agoExtend flag reuse optimization to all relops
Mike Danes [Fri, 29 Sep 2017 21:34:07 +0000 (00:34 +0300)]
Extend flag reuse optimization to all relops

7 years agoReimplement compare flags reuse using SETCC/JCC
Mike Danes [Sun, 17 Sep 2017 21:26:58 +0000 (00:26 +0300)]
Reimplement compare flags reuse using SETCC/JCC

7 years agoSimplify SIMD EQ/NE optimization
Mike Danes [Sun, 17 Sep 2017 09:49:10 +0000 (12:49 +0300)]
Simplify SIMD EQ/NE optimization

7 years agoAdding a patch to fix coreclr build for VS 15.5 (using older SDKs). (#14272)
Ahson Ahmed Khan [Sat, 30 Sep 2017 01:56:42 +0000 (18:56 -0700)]
Adding a patch to fix coreclr build for VS 15.5 (using older SDKs). (#14272)

7 years agoFix VEX.vvvv for cvtss2sd and cvtsd2ss
Fei Peng [Sat, 30 Sep 2017 00:35:34 +0000 (17:35 -0700)]
Fix VEX.vvvv for cvtss2sd and cvtsd2ss

7 years agoStompWriteBarrier initialization path refactoring (#14105)
Sergey [Fri, 29 Sep 2017 23:16:44 +0000 (02:16 +0300)]
StompWriteBarrier initialization path refactoring (#14105)

* refactored arm, arm64, amd64 and x86 to signal about icache flush and ee restarts

* refactored gc init stage to stomp write barrier (hence flush icache) only once

* review fixes, care taken of icache invalidation during StompResize

* fixed heap boundaries initialization bug introduced after refactoring gc.cpp

* stylistic review fixe

* global variable rename

* global variable rename once more

7 years agoUpdate build clang/llvm/lldb 3.9 (#14096)
Mike McLaughlin [Fri, 29 Sep 2017 22:54:48 +0000 (15:54 -0700)]
Update build clang/llvm/lldb 3.9 (#14096)

Update build scripts, docs and build pipeline docker images to clang/llvm/lldb 3.9

7 years agoFix spelling errors (#14218)
Borislav Ivanov [Fri, 29 Sep 2017 22:52:46 +0000 (01:52 +0300)]
Fix spelling errors (#14218)

Fix some spelling errors and capitalization.

7 years agoAdd info on loading core dumps in lldb. (#13955)
Mike McLaughlin [Fri, 29 Sep 2017 22:50:10 +0000 (15:50 -0700)]
Add info on loading core dumps in lldb. (#13955)

7 years agoEnable hardware intrinsic in debug and reflection
Fei Peng [Sun, 24 Sep 2017 17:54:56 +0000 (10:54 -0700)]
Enable hardware intrinsic in debug and reflection

7 years agoImplement IsSuppoored for all ISA classes
Fei Peng [Fri, 15 Sep 2017 20:01:13 +0000 (13:01 -0700)]
Implement IsSuppoored for all ISA classes

7 years agoMerge pull request #14265 from MattGal/build_def_updates
Matt Galbraith [Fri, 29 Sep 2017 20:54:11 +0000 (13:54 -0700)]
Merge pull request #14265 from MattGal/build_def_updates

Build definition publishing behavior tweaks

7 years agoBuild definition publishing behavior tweaks
Matt Galbraith [Fri, 29 Sep 2017 20:04:55 +0000 (13:04 -0700)]
Build definition publishing behavior tweaks

7 years ago[RyuJIT/ARM32] hotfix for a regression (#14252)
Hyung-Kyu Choi [Fri, 29 Sep 2017 19:01:16 +0000 (04:01 +0900)]
[RyuJIT/ARM32] hotfix for a regression (#14252)

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years ago[x86/Linux] Fix CopyREGDISPLAY for WIN64EXCEPTIONS (#14254)
Konstantin Baladurin [Fri, 29 Sep 2017 17:15:35 +0000 (20:15 +0300)]
[x86/Linux] Fix CopyREGDISPLAY for WIN64EXCEPTIONS (#14254)

When WIN64EXCEPTIONS is defined, fields pCurrentContextPointers,
pCallerContextPointers, pCurrentContext and pCallerContext of the
REGDISPLAY are used. So we need to fix their values after coping.

7 years ago[x86/Linux][SOS] Fix DumpStack command output on x86 (#14189)
Konstantin Baladurin [Fri, 29 Sep 2017 14:03:17 +0000 (17:03 +0300)]
[x86/Linux][SOS] Fix DumpStack command output on x86 (#14189)

On x86 DumpStack command doesn't print symbol information for
caller and callee. This patch fixes it and make output the same
as on AMD64.

7 years agoAllow cross machine re-crossgen (#14241)
Steve MacLean [Fri, 29 Sep 2017 12:10:32 +0000 (08:10 -0400)]
Allow cross machine re-crossgen (#14241)

7 years ago[x86/Linux] Fix assert in HelperMethodFrame::UpdateRegDisplay (#14235)
Konstantin Baladurin [Fri, 29 Sep 2017 08:08:01 +0000 (11:08 +0300)]
[x86/Linux] Fix assert in HelperMethodFrame::UpdateRegDisplay (#14235)

In some cases during execution of the SOS command 'clrstack -i'
portability assert in HelperMethodFrame::UpdateRegDisplay occurs.
This patch removes this assert and adds corresponding implementation.

7 years agoFixing Retain to return MemoryHandle with correct PinnedPointer (#14248)
Ahson Ahmed Khan [Fri, 29 Sep 2017 03:05:35 +0000 (20:05 -0700)]
Fixing Retain to return MemoryHandle with correct PinnedPointer (#14248)

* Fixing Retain to return MemoryHandle with correct PinnedPointer.

* Make MemoryHandle AddOffset internal.

7 years agoMerge pull request #14247 from rartemev/issue_13420
Roman Artemev [Fri, 29 Sep 2017 02:30:36 +0000 (19:30 -0700)]
Merge pull request #14247 from rartemev/issue_13420

Fixed difference between produced code in CHK and REL modes

7 years agoAdded CopyToAsync overload using default buffer size (#14219)
Kristian Hellang [Fri, 29 Sep 2017 01:12:24 +0000 (03:12 +0200)]
Added CopyToAsync overload using default buffer size (#14219)

* Added CopyToAsync overload using default buffer size

* Address feedback

* Added comment about overrides and argument validation

* Renamed helper method to GetCopyBufferSize

To convey that this method should only be used for
getting a buffer size to be passed to CopyTo{Async}.

7 years agoFixed differenece between produced code in CHK and REL modes
Roman Artemev [Fri, 29 Sep 2017 00:22:08 +0000 (17:22 -0700)]
Fixed differenece between produced code in CHK and REL modes

7 years agoignore GT_ARGPLACE before gtUseNum check. (#14233)
Sergey Andreenko [Thu, 28 Sep 2017 23:16:06 +0000 (16:16 -0700)]
ignore GT_ARGPLACE before gtUseNum check. (#14233)

7 years agoAdd the capability to force JIT options on the SPMI command line. (#14209)
Sergey Andreenko [Thu, 28 Sep 2017 17:37:15 +0000 (10:37 -0700)]
Add the capability to force JIT options on the SPMI command line. (#14209)

expand the grammar for jit{,2}option to -jitoption [force] key=value

7 years ago[x86/Linux] Fix typo in SetDebuggerREGDISPLAYFromREGDISPLAY (#14221)
Konstantin Baladurin [Thu, 28 Sep 2017 16:26:39 +0000 (19:26 +0300)]
[x86/Linux] Fix typo in SetDebuggerREGDISPLAYFromREGDISPLAY (#14221)

Fix typo in SetDebuggerREGDISPLAYFromREGDISPLAY: Esi -> Eax.

7 years agoMerge pull request #14225 from fiigii/falsedependency
Carol Eidt [Thu, 28 Sep 2017 16:00:16 +0000 (09:00 -0700)]
Merge pull request #14225 from fiigii/falsedependency

[RyuJIT] Fix bad VEX encoding to avoid false register dependency

7 years agoJIT: have gtClone handle long constants (#14201)
Andy Ayers [Thu, 28 Sep 2017 14:56:24 +0000 (07:56 -0700)]
JIT: have gtClone handle long constants (#14201)

The `Enum.HasFlag` opt needs to clone the enum values, and they
can be long constants. Make sure `gtClone` handles this case.

Closes #14149.

7 years agoMerge pull request #14232 from BruceForstall/Fix14196
Bruce Forstall [Thu, 28 Sep 2017 05:16:27 +0000 (22:16 -0700)]
Merge pull request #14232 from BruceForstall/Fix14196

Fix issue with HFA altjit api

7 years agofix bad VEX.vvvv to avoid false register dependency
Fei Peng [Wed, 27 Sep 2017 17:33:18 +0000 (10:33 -0700)]
fix bad VEX.vvvv to avoid false register dependency

7 years agoMerge pull request #14192 from sdmaclea/PR-ARM64-JCMP
Brian Sullivan [Thu, 28 Sep 2017 00:28:42 +0000 (17:28 -0700)]
Merge pull request #14192 from sdmaclea/PR-ARM64-JCMP

[Arm64] Add GT_JCMP node

7 years ago[RyuJIT/arm32] Code cleanup
Hanjoung Lee [Wed, 27 Sep 2017 11:04:03 +0000 (20:04 +0900)]
[RyuJIT/arm32] Code cleanup

- Add an assertion for double type arg regs for armel
- Merge two if statements that have same body

7 years agoMerge pull request #14231 from fiigii/fixintrinsic
Viktor Hofer [Wed, 27 Sep 2017 23:10:40 +0000 (01:10 +0200)]
Merge pull request #14231 from fiigii/fixintrinsic

fix bugs from #14164

7 years agoMerge pull request #14234 from dotnet/ConditionLoc
William Godbe [Wed, 27 Sep 2017 23:07:07 +0000 (16:07 -0700)]
Merge pull request #14234 from dotnet/ConditionLoc

Move Condition location in dotnet-trusted-publish

7 years agoMove Condition location in dotnet-trusted-publish
William Godbe [Wed, 27 Sep 2017 23:03:35 +0000 (16:03 -0700)]
Move Condition location in dotnet-trusted-publish

7 years agonit pr feedback
Viktor Hofer [Wed, 27 Sep 2017 22:52:49 +0000 (00:52 +0200)]
nit pr feedback