platform/upstream/coreclr.git
7 years agoMerge pull request #13036 from rartemev/tests_build_fix_rest
Roman Artemev [Wed, 26 Jul 2017 02:11:47 +0000 (19:11 -0700)]
Merge pull request #13036 from rartemev/tests_build_fix_rest

Made possible to build all tests on Linux as well.

7 years agoMerge pull request #13035 from pgavlin/VSO468732
Pat Gavlin [Wed, 26 Jul 2017 01:05:20 +0000 (18:05 -0700)]
Merge pull request #13035 from pgavlin/VSO468732

Treat byref-typed uses of int-typed lclVars as type int in LB.

7 years agoCompletelly fix build of tests on Linux
Roman Artemev [Tue, 25 Jul 2017 01:48:03 +0000 (18:48 -0700)]
Completelly fix build of tests on Linux

7 years agoEnable Ubuntu's 1710 BuilsTests
JC Aguilera [Tue, 25 Jul 2017 23:33:22 +0000 (16:33 -0700)]
Enable Ubuntu's 1710 BuilsTests

Enable Ubuntu's 1710 BuilsTests

7 years agoTreat byref-typed uses of int-typed lclVars as type int in LB.
Pat Gavlin [Tue, 25 Jul 2017 22:43:05 +0000 (15:43 -0700)]
Treat byref-typed uses of int-typed lclVars as type int in LB.

This is consistent with the behvaior of both JIT32 and RyuJIT. This
resolves an assertion originating from the following scenario:

1. The input IL contains a lclVar of type `Foo*`, which the JIT imports as
   `TYP_I_IMPL` (which is `TYP_INT` in this case).
2. This lclVar is used as the `this` argument to a number of method calls.
   This is legal as per ECMA-335 section III.3.19 ("Correct CIL also allows
   a native int to be passed as a byref (&); in which case following the
   store the value will be tracked by garbage collection.")
3. All of the method calls to which this lclVar is passed as a byref are
   inlined. This produces many uses of the lclVar as a byref (i.e. we see
   nodes like `lclVar V06 byref` even though V06's varDsc has type int).
4. The lclVar is assigned a register `r`. At its first appearance--which is
   the first occasion in which it is loaded into this register--it is used
   as `TYP_BYREF`. When the code generator processes this appearance, it
   first sets the appropriate bit for `r` in `gcInfo.gcRegByrefSetCur`
   (`gcInfo.gcMarkRegPtrVal`, called by `genCodeForTree_REG_VAR1`) and then
   sets the appropriate bit for `r` in `regSet.rsMaskVars`
   (`genUpdateLife`).
5. The lclVar is used as `TYP_INT` as the operand to a `GT_RETURN` node.
   When the code generator processes this appearance, it attempts to update
   the GC-ness of `r` by calling `gcInfo.gcMarkRegPtrVal` (again via
   `genCodeForTree_REG_VAR1`). This function, though, explicitly excludes
   registers that contain live variables from its update, so `r` remains in
   `gcInfo.gcRegByrefSetCur` after this call. After calling
   `gcMarkRegPtrVal`, `genCodeForTree_REG_VAR1` calls `genUpdateLife`,
   which removes the the lclVar from `regSet.rsMaskVars`.
6. An assertion intended to verify that the only registers that are live
   after processing a statement are registers that contain lclVars fires,
   as `gcRegByrefSetCur` still contains `r`.

Fixes VSO 468732.

7 years agoCleanup GC *_STAT bitrot (#12772)
Steve MacLean [Tue, 25 Jul 2017 22:25:31 +0000 (18:25 -0400)]
Cleanup GC *_STAT bitrot (#12772)

* Cleanup GC *_STAT bitrot

* Fixup per review

7 years agoRevert "Fixes for issue 12982 Android cross-build fails when compiling cee_wks (...
Jan Kotas [Tue, 25 Jul 2017 22:17:31 +0000 (00:17 +0200)]
Revert "Fixes for issue 12982 Android cross-build fails when compiling cee_wks (#12986)" (#13031)

This reverts commit 2e7326df470bea696699cc7c812ee56dd0b470b9.

7 years agoChange after correct version of the file
JC Aguilera [Tue, 25 Jul 2017 22:12:34 +0000 (15:12 -0700)]
Change after correct version of the file

7 years agoMerge branch 'master' into enableUbuntu1710-1
JC Aguilera [Tue, 25 Jul 2017 22:01:31 +0000 (15:01 -0700)]
Merge branch 'master' into enableUbuntu1710-1

7 years agoMerge pull request #13030 from wtgodbe/AddWindowsJobs
William Godbe [Tue, 25 Jul 2017 21:58:56 +0000 (14:58 -0700)]
Merge pull request #13030 from wtgodbe/AddWindowsJobs

Add Helix jobs for Nano, Win7, Win8

7 years agoEnable Ubuntu's 1710 BuilsTests
JC Aguilera [Tue, 25 Jul 2017 21:57:26 +0000 (14:57 -0700)]
Enable Ubuntu's 1710 BuilsTests

After adding Helix Queue for Ubuntu1710 we are enabling BuildTest for this SKU.

This completes: https://github.com/dotnet/core-eng/issues/1307

7 years agoAdd Helix jobs for Nano, Win7, Win8
wtgodbe [Tue, 25 Jul 2017 20:28:49 +0000 (13:28 -0700)]
Add Helix jobs for Nano, Win7, Win8

7 years agoEnable BuildTest in Windows Server Core
JC Aguilera [Tue, 25 Jul 2017 19:55:37 +0000 (12:55 -0700)]
Enable BuildTest in Windows Server Core

Enable BuildTest in Windows Server Core

7 years agoMerge pull request #13011 from BruceForstall/Fix12886
Bruce Forstall [Tue, 25 Jul 2017 17:56:52 +0000 (10:56 -0700)]
Merge pull request #13011 from BruceForstall/Fix12886

Handle error case when looking for reg pair

7 years agotypo (#13026)
github-john-doe [Tue, 25 Jul 2017 17:51:30 +0000 (10:51 -0700)]
typo (#13026)

7 years agoPerfMap instrument stubs (#12437)
Steve MacLean [Tue, 25 Jul 2017 15:57:24 +0000 (11:57 -0400)]
PerfMap instrument stubs (#12437)

* PerfMap instrument stubs

* Perfmap fix segfault

7 years agoIgnore specified signal when using perf (#12436)
Steve MacLean [Tue, 25 Jul 2017 15:54:57 +0000 (11:54 -0400)]
Ignore specified signal when using perf (#12436)

* Ignore SIGRTMAX when using perf

Add a do nothing signal handler to SIGRTMAX
for profiling purposes.  Allows synchronization
point in injection into the profile

* Add COMPlus_PerfMapIgnoreSignal

* Fix nits per review

7 years agoMerge pull request #13017 from benaadams/valuetask
Stephen Toub [Tue, 25 Jul 2017 15:54:19 +0000 (11:54 -0400)]
Merge pull request #13017 from benaadams/valuetask

ValueTask .ctor throw to Helper

7 years agoMerge pull request #13005 from AndyAyersMS/FixPDepSimd12Issue
Andy Ayers [Tue, 25 Jul 2017 15:41:01 +0000 (08:41 -0700)]
Merge pull request #13005 from AndyAyersMS/FixPDepSimd12Issue

Don't map P-DEP SIMD12 local vars to SIMD16 on x64

7 years agoFixes for issue 12982 Android cross-build fails when compiling cee_wks (#12986)
Cyd Haselton [Tue, 25 Jul 2017 13:01:07 +0000 (08:01 -0500)]
Fixes for issue 12982 Android cross-build fails when compiling cee_wks (#12986)

* Fixes for issue 12982 Android cross-build fails when compiling cee_wks

Added conditional (__ANDROID__) to volatile.h
Added compile option to android/arm64/toolchain.cmake

* Changed ANDROID conditional to compiler and __atomic_load

Changed conditional to exclude volatile to __CLANG__ and __has_builtin(__atomic_load)

* Fixed Clang conditional

* Recommended changes to volatile.h and toolchain.cmake

* Added separate conditional for detecting builtin __atomic_load

7 years agoDeleting the non-shared implementation of `System.Single` and `System.Double`.
Tanner Gooding [Fri, 21 Jul 2017 05:45:40 +0000 (22:45 -0700)]
Deleting the non-shared implementation of `System.Single` and `System.Double`.

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoMerge pull request #12193 from noahfalk/tiered_jitting_m2
Noah Falk [Tue, 25 Jul 2017 05:59:47 +0000 (22:59 -0700)]
Merge pull request #12193 from noahfalk/tiered_jitting_m2

7 years agoValueTask .ctor throw to Helper
Ben Adams [Tue, 25 Jul 2017 02:23:50 +0000 (03:23 +0100)]
ValueTask .ctor throw to Helper

7 years agoMerge pull request #13012 from pgavlin/VSO468726
Pat Gavlin [Tue, 25 Jul 2017 02:15:48 +0000 (19:15 -0700)]
Merge pull request #13012 from pgavlin/VSO468726

Fix `fgOrderBlockOps`.

7 years agoAdd the runtime code versioning feature
noahfalk [Tue, 25 Jul 2017 00:38:30 +0000 (17:38 -0700)]
Add the runtime code versioning feature

This makes tiered compilation work properly with profiler ReJIT, and positions the runtime to integrate other versioning related features together in the future. See the newly added code-versioning design-doc in this commit for more information.

Breaking changes for profilers: See code-versioning-profiler-breaking-changes.md for more details.

7 years agoAddressing Will's comments
JC Aguilera [Mon, 24 Jul 2017 23:41:23 +0000 (16:41 -0700)]
Addressing Will's comments

7 years agoMerge pull request #12991 from hseok-oh/ryujit/fix_11783_2
Bruce Forstall [Mon, 24 Jul 2017 23:31:48 +0000 (16:31 -0700)]
Merge pull request #12991 from hseok-oh/ryujit/fix_11783_2

[RyuJIT/ARM32] Morphing 1-field HFA struct argument and fix assertion

7 years agoEnable BuildTest in Windows Server Core
JC Aguilera [Mon, 24 Jul 2017 23:16:08 +0000 (16:16 -0700)]
Enable BuildTest in Windows Server Core

Windows Server Core was just created so now enabling work to be processed in this image

7 years agoMerge pull request #12996 from hseok-oh/ryujit/fix_12626
Bruce Forstall [Mon, 24 Jul 2017 22:53:41 +0000 (15:53 -0700)]
Merge pull request #12996 from hseok-oh/ryujit/fix_12626

[RyuJIT/ARM32] Fix stack overflow on codegen phase

7 years agoFix `fgOrderBlockOps`.
Pat Gavlin [Mon, 24 Jul 2017 22:49:34 +0000 (15:49 -0700)]
Fix `fgOrderBlockOps`.

This function was incorrect when the target was a `DYN_BLK` with
`gtEvalSizeFirst` set to `true`.

Fixes VSO 468726.

7 years agoSimplify SHM-allocator (#12815)
gbalykov [Mon, 24 Jul 2017 22:37:38 +0000 (01:37 +0300)]
Simplify SHM-allocator (#12815)

* Simplify SHM-allocator

* Remove SHMNULL and NULLSharedID

7 years agoHandle error case when looking for reg pair
Bruce Forstall [Mon, 24 Jul 2017 22:31:33 +0000 (15:31 -0700)]
Handle error case when looking for reg pair

When performing unsigned up-cast to long, if needReg was computed
with exactly 2 bits, then rsFindRegPairNo() is called to find the
corresponding reg pair. This can fail if one of the needReg bits
is in the reserved set (rsMaskResvd), as was the case in this test
on ARM for R10.

Add logic to handle this error return. The same logic already existed
in the signed cast case.

Fixes #12886

7 years agoCreate Windows PDBs from Portable PDBs during symbol archive (#12796)
Davis Goodin [Mon, 24 Jul 2017 22:06:44 +0000 (17:06 -0500)]
Create Windows PDBs from Portable PDBs during symbol archive (#12796)

* Update BuildTools to 2.0.0-prerelease-01812-02

* Use "GetAllSymbolFilesToPublish" target

"UnzipSymbolPackagesForPublish" only unzips. "GetAllSymbolFilesToPublish" is a new target that unzips then generates Windows PDBs. This allows us to index Windows PDBs on symweb even when not archiving.

7 years agoDon't call AssemblyResolve event for CoreLib resources (#12999)
Koundinya Veluri [Mon, 24 Jul 2017 20:17:16 +0000 (13:17 -0700)]
Don't call AssemblyResolve event for CoreLib resources (#12999)

* Don't call AssemblyResolve event for CoreLib resources

Part of fix for #12668:
- CoreLib resource lookup should not raise the AssemblyResolve event because a misbehaving handler could cause an infinite recursion check and fail-fast to be triggered when the resource is not found, as the issue would repeat when reporting that error
- A handler could misbehave by returning an assembly that does not match the requested identity or by throwing

* Address feedback

7 years agoMerge pull request #12943 from jashook/fix_8093
Jarret Shook [Mon, 24 Jul 2017 17:17:57 +0000 (10:17 -0700)]
Merge pull request #12943 from jashook/fix_8093

For LEGACY_BACKEND ARM32 do not overwrite 1 element HFA type

7 years agoMerge pull request #13004 from stephentoub/move_valuetask
Stephen Toub [Mon, 24 Jul 2017 16:44:05 +0000 (12:44 -0400)]
Merge pull request #13004 from stephentoub/move_valuetask

Move ValueTask and friends to corelib

7 years agoMerge pull request #12995 from 303248153/170724_fix_comment
Bruce Forstall [Mon, 24 Jul 2017 16:17:10 +0000 (09:17 -0700)]
Merge pull request #12995 from 303248153/170724_fix_comment

[JIT] Fix comment in optimizer.cpp:optOptimizeBools

7 years agoMerge pull request #12975 from alpencolt/ryu-arm-casts-nyi
Bruce Forstall [Mon, 24 Jul 2017 16:15:20 +0000 (09:15 -0700)]
Merge pull request #12975 from alpencolt/ryu-arm-casts-nyi

[RyuJIT/ARM32] Removed int <-> float casts related NYIs.

7 years agoMerge pull request #12963 from BruceForstall/Fix12904
Bruce Forstall [Mon, 24 Jul 2017 16:14:07 +0000 (09:14 -0700)]
Merge pull request #12963 from BruceForstall/Fix12904

Fix a case where a reg is spilled before being freed, leading to assert

7 years agoMerge pull request #12998 from github-john-doe/master
Bruce Forstall [Mon, 24 Jul 2017 16:11:22 +0000 (09:11 -0700)]
Merge pull request #12998 from github-john-doe/master

typo

7 years agoDon't map P-DEP SIMD12 local vars to SIMD16 on x64
Andy Ayers [Mon, 24 Jul 2017 14:54:44 +0000 (07:54 -0700)]
Don't map P-DEP SIMD12 local vars to SIMD16 on x64

P-DEP local vars are logically independent locals, but physically embeded
in some structure with fixed layout. So they cannot be made larger.

We already had safeguards for ths in place for x86 so extend these to kick
in for x64 too.

Also update Lowering's checker to account for the fact that some SIMD12s
can persist in x64.

Fixes #12950.

7 years agoA few minor perf tweaks
Stephen Toub [Mon, 24 Jul 2017 14:16:26 +0000 (10:16 -0400)]
A few minor perf tweaks

- Update ValueTask to use IsCompletedSynchronously: IsCompletedSynchronously is faster/slimmer than Status == RanToCompletion.
- Remove a few readonly's causing unnecessary struct copies

7 years agotypo
John Doe [Mon, 24 Jul 2017 14:15:39 +0000 (07:15 -0700)]
typo

7 years agoAdd ValueTask and friends to corelib
Stephen Toub [Mon, 24 Jul 2017 14:08:38 +0000 (10:08 -0400)]
Add ValueTask and friends to corelib

Files are copied without modification from corefx.

We will subsequently add these to the System.Runtime contract and specialize the System.Threading.Tasks.Extensions package to forward to System.Runtime on netcoreapp.

7 years ago[RyuJIT/ARM32] Fix stack overflow on codegen phase
Hyeongseok Oh [Mon, 24 Jul 2017 09:31:45 +0000 (18:31 +0900)]
[RyuJIT/ARM32] Fix stack overflow on codegen phase

Fix stack overflow on codegen phase
Array size problem for reference map in genPutArgStk()

7 years agofix comment in optimizer.cpp:optOptimizeBools
dudes-come [Mon, 24 Jul 2017 08:04:16 +0000 (16:04 +0800)]
fix comment in optimizer.cpp:optOptimizeBools

7 years ago[RyuJIT/ARM32] Morphing 1-field HFA struct argument and fix assertion
Hyeongseok Oh [Mon, 24 Jul 2017 04:51:13 +0000 (13:51 +0900)]
[RyuJIT/ARM32] Morphing 1-field HFA struct argument and fix assertion

- Morphing 1-field HFA struct argument as local field
- Fix assertion on legacy JIT

7 years agoUpdate android build script with correct package versions (#12985)
Cyd Haselton [Sun, 23 Jul 2017 13:06:45 +0000 (08:06 -0500)]
Update android build script with correct package versions (#12985)

7 years agoMerge pull request #12979 from pgavlin/GitHub12935
Pat Gavlin [Sun, 23 Jul 2017 00:27:05 +0000 (17:27 -0700)]
Merge pull request #12979 from pgavlin/GitHub12935

Lock the the dest reg in `inst_RV_TT` if necessary.

7 years agoMerge pull request #12984 from dotnet/revert-12951-ryujit/fix_11783
Pat Gavlin [Sat, 22 Jul 2017 20:47:26 +0000 (13:47 -0700)]
Merge pull request #12984 from dotnet/revert-12951-ryujit/fix_11783

Revert "[RyuJIT/ARM32] Morphing 1-field HFA struct argument"

7 years agoRevert "[RyuJIT/ARM32] Morphing 1-field HFA struct argument"
Pat Gavlin [Sat, 22 Jul 2017 18:05:32 +0000 (11:05 -0700)]
Revert "[RyuJIT/ARM32] Morphing 1-field HFA struct argument"

7 years ago[RyuJIT/ARM32] Removed int <-> float casts related NYIs.
Alexander Soldatov [Fri, 21 Jul 2017 17:06:20 +0000 (20:06 +0300)]
[RyuJIT/ARM32] Removed int <-> float casts related NYIs.

7 years agoMerge pull request dotnet/corert#4207 from dotnet/nmirror
Jan Kotas [Fri, 21 Jul 2017 14:26:56 +0000 (16:26 +0200)]
Merge pull request dotnet/corert#4207 from dotnet/nmirror

Merge nmirror to master

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
7 years agoLock the the dest reg in `inst_RV_TT` if necessary.
Pat Gavlin [Fri, 21 Jul 2017 23:43:25 +0000 (16:43 -0700)]
Lock the the dest reg in `inst_RV_TT` if necessary.

For ARM32, `inst_RV_TT` may need to load the referenced lclVar into a
temporary register before emitting the requested instruction. The
chosen register *must not* be the instruction's destination register.
The existing code attempted to ensure this by masking the dest register
from the set of pickable registers, but this is not sufficient:
`rsPickReg` must return a valid register and will happily attempt to
spill and return the destination register even if it is not in the
recommended set. To prevent this, this change locks and unlocks the
destination register if necessary (i.e. if it was not locked upon
entry).

Fixes #12935.

7 years agoMerge pull request #12951 from hseok-oh/ryujit/fix_11783
Bruce Forstall [Fri, 21 Jul 2017 22:56:40 +0000 (15:56 -0700)]
Merge pull request #12951 from hseok-oh/ryujit/fix_11783

[RyuJIT/ARM32] Morphing 1-field HFA struct argument

7 years agoUpdated the path to built test binaries in examples
Brian Sullivan [Fri, 21 Jul 2017 19:49:18 +0000 (12:49 -0700)]
Updated the path to built test binaries in examples

7 years agoMerge pull request #12974 from pgavlin/GitHub12909
Pat Gavlin [Fri, 21 Jul 2017 19:20:59 +0000 (12:20 -0700)]
Merge pull request #12974 from pgavlin/GitHub12909

Disable promotion of custom-layout structs for legacy backend.

7 years agoMerge pull request #12946 from BruceForstall/FixArmTempEstimation
Bruce Forstall [Fri, 21 Jul 2017 19:16:21 +0000 (12:16 -0700)]
Merge pull request #12946 from BruceForstall/FixArmTempEstimation

Fix ARM32 spill temp allocation

7 years agoAdded IsPathFullyQualified() method to Path class (#12965)
Stephanie Niu [Fri, 21 Jul 2017 18:11:43 +0000 (11:11 -0700)]
Added IsPathFullyQualified() method to Path class (#12965)

7 years agoDisable promotion of custom-layout structs for legacy backend.
Pat Gavlin [Fri, 21 Jul 2017 16:37:59 +0000 (09:37 -0700)]
Disable promotion of custom-layout structs for legacy backend.

These kinds of structs--particularly structs with holes--are not handled
correctly by argument morphing on ARM.

Promotion of these kinds of structs was already disabled for the x86
legacy backend; this change disables the optimization  for all legacy
backend targets.

Fixes #12909.

7 years agoAssociate last 2 RVAStatics tests with known issue
Russ Keldorph [Thu, 20 Jul 2017 22:48:01 +0000 (15:48 -0700)]
Associate last 2 RVAStatics tests with known issue

7 years agoMerge pull request #12852 from jyoungyun/ryujit/rewrite_the_struct_args_to_be_passed_...
Carol Eidt [Fri, 21 Jul 2017 15:56:43 +0000 (08:56 -0700)]
Merge pull request #12852 from jyoungyun/ryujit/rewrite_the_struct_args_to_be_passed_by_value_on_stack

[RyuJIT/ARM32] Rewrite the stack args to be passed by value on stack

7 years agoMerge pull request #12968 from wateret/fix-gentree-creation
Carol Eidt [Fri, 21 Jul 2017 15:55:33 +0000 (08:55 -0700)]
Merge pull request #12968 from wateret/fix-gentree-creation

[RyuJIT/armel] Fix incorrect GenTree creation

7 years agoAdd CGroup CFS CPU limit support (#12797)
Guillaume B [Fri, 21 Jul 2017 12:08:11 +0000 (14:08 +0200)]
Add CGroup CFS CPU limit support (#12797)

7 years ago[RyuJIT/armel] Fix incorrect GenTree creation
Hanjoung Lee [Fri, 21 Jul 2017 06:03:29 +0000 (15:03 +0900)]
[RyuJIT/armel] Fix incorrect GenTree creation

When we generate a node for GT_PUTARG_REG, it should call gtNewPutArgReg().

7 years agoMoving 'System.Single' and 'System.Double' to the 'System.Private.CoreLib.Shared...
Tanner Gooding [Fri, 21 Jul 2017 05:01:39 +0000 (22:01 -0700)]
Moving 'System.Single' and 'System.Double' to the 'System.Private.CoreLib.Shared' project. (#12967)

7 years ago[Local GC] Refactor usage of GC-internal functions in the DAC (#12458)
Sean Gillespie [Fri, 21 Jul 2017 04:53:46 +0000 (21:53 -0700)]
[Local GC] Refactor usage of GC-internal functions in the DAC (#12458)

* Refactor usage of GC-internal functions in the DAC

* Fix one debugger test failure, one to go

7 years ago[RyuJIT/ARM32] Morphing 1-field HFA struct argument
Hyeongseok Oh [Fri, 21 Jul 2017 03:09:18 +0000 (12:09 +0900)]
[RyuJIT/ARM32] Morphing 1-field HFA struct argument

Morphing 1-field HFA struct argument as local field

7 years ago[RyuJIT/ARM32] Remove unnecessary GT_ADDR and GT_LCL_VAR_ADDR related code
Jiyoung Yun [Fri, 21 Jul 2017 01:43:14 +0000 (10:43 +0900)]
[RyuJIT/ARM32] Remove unnecessary GT_ADDR and GT_LCL_VAR_ADDR related code

7 years agoFix resources lookup to use satellite assembly resouce lookup inside AppX when the...
Santiago Fernandez Madero [Thu, 20 Jul 2017 23:36:15 +0000 (16:36 -0700)]
Fix resources lookup to use satellite assembly resouce lookup inside AppX when the assembly is Private.Corelib (#12954)

7 years agoMerge pull request #12866 from erozenfeld/12761ILRegressionTest
Eugene Rozenfeld [Thu, 20 Jul 2017 22:08:47 +0000 (15:08 -0700)]
Merge pull request #12866 from erozenfeld/12761ILRegressionTest

Add regression tests for #12761.

7 years agoFix a case where a reg is spilled before being freed, leading to an assert
Bruce Forstall [Thu, 20 Jul 2017 22:07:46 +0000 (15:07 -0700)]
Fix a case where a reg is spilled before being freed, leading to an assert

In genRangeCheck(), under stress, the call to the range check helper
might spill the index register. This leads to an assert in rsMarkRegFree():
`rsIsTreeInReg(reg, tree)`. So, instead of calling rsMarkRegFree,
call genReleaseReg(), which handles this case.

This unfortunately reloads the spilled tree, which seems unnecessary, but it
otherwise frees the register fine.

One subtlety that is not obvious to me: the current code calls
`rsMarkRegFree(node->gtRegNum, node)` but `genRangeCheck()`
calls `rsMarkRegFree(genRegMask(node->gtRegNum))`. I'm not 100% sure
these are equivalent.

Fixes #12904.

7 years agoMerge pull request #12961 from jashook/up_arm64_arm_timeouts
Jarret Shook [Thu, 20 Jul 2017 22:02:47 +0000 (15:02 -0700)]
Merge pull request #12961 from jashook/up_arm64_arm_timeouts

Up arm timeout to arm64 timeout

7 years agoUp arm timeout to arm64 timeout
jashook [Thu, 20 Jul 2017 20:55:20 +0000 (13:55 -0700)]
Up arm timeout to arm64 timeout

7 years agoMerge pull request #12960 from jashook/stop_arm64_default_jobs
Jarret Shook [Thu, 20 Jul 2017 20:46:38 +0000 (13:46 -0700)]
Merge pull request #12960 from jashook/stop_arm64_default_jobs

Add the correct job name and regex to arm64 ubuntu flow jobs

7 years agoMerge pull request #12955 from stephentoub/tryderegister
Stephen Toub [Thu, 20 Jul 2017 20:35:36 +0000 (16:35 -0400)]
Merge pull request #12955 from stephentoub/tryderegister

Fix corefx break due to missing internal method

7 years agoMerge pull request #10496 from sergign60/jitdrop
Noah Falk [Thu, 20 Jul 2017 20:30:31 +0000 (13:30 -0700)]
Merge pull request #10496 from sergign60/jitdrop

Jitted Code Pitching Feature implemented

7 years agoAdd the correct job name and regex to arm64 ubuntu flow jobs
jashook [Thu, 20 Jul 2017 18:59:18 +0000 (11:59 -0700)]
Add the correct job name and regex to arm64 ubuntu flow jobs

This will keep the arm64 ubuntu jobs from being default auto triggered.

7 years agoFor lb arm do not overwrite 1 element hfa type
jashoo [Wed, 19 Jul 2017 23:32:16 +0000 (16:32 -0700)]
For lb arm do not overwrite 1 element hfa type

On arm64 we will treat 1 element HFA types as the primitive
type that is contained. On Legacy Backend codegenlegacy will
incorrectly assign these two types. Instead keep the struct
type through the IR correctly to do a blockop.

7 years agoFix IndexOutOfRangeException in PayloadNames property (#12932)
Vance Morrison [Thu, 20 Jul 2017 18:28:25 +0000 (11:28 -0700)]
Fix IndexOutOfRangeException in PayloadNames property (#12932)

If you pass an null payload using Write<T>, and in the EventListener then call PayloadNames, it
will throw an IndexOutOfRangeException.   It should just return null.   This fixes this.

7 years agoMerge pull request #12945 from pgavlin/FixLstFile
Jarret Shook [Thu, 20 Jul 2017 18:15:24 +0000 (11:15 -0700)]
Merge pull request #12945 from pgavlin/FixLstFile

Fix a couple errors in the ARM32 lst file.

7 years agoFix corefx break due to missing internal method
Stephen Toub [Thu, 20 Jul 2017 17:19:46 +0000 (13:19 -0400)]
Fix corefx break due to missing internal method

System.Runtime.WindowsRuntime uses CancellationTokenRegistration.TryDeregister instead of Dispose to avoid a potential deadlock due to blocking waiting for an in-progress cancellation to complete.  Putting back TryDeregister to unblock corefx until a corresponding public API is exposed for this.

7 years agoMerge pull request #12901 from jashook/arm64_ubuntu_changes
Jarret Shook [Thu, 20 Jul 2017 14:07:36 +0000 (07:07 -0700)]
Merge pull request #12901 from jashook/arm64_ubuntu_changes

Fix auto starting arm64 ubuntu jobs

7 years ago[RyuJIT/ARM32] Remove unnecessary isHfaRegArg check routine
Jiyoung Yun [Thu, 20 Jul 2017 09:01:09 +0000 (18:01 +0900)]
[RyuJIT/ARM32] Remove unnecessary isHfaRegArg check routine

7 years ago[RyuJIT/ARM32] Add a case wrapping GT_OBJ on struct arguments
Jiyoung Yun [Thu, 20 Jul 2017 07:13:24 +0000 (16:13 +0900)]
[RyuJIT/ARM32] Add a case wrapping GT_OBJ on struct arguments

If the struct arguments pass by value on the stack, it should be wrapped in GT_OBJ.

7 years ago[RyuJIT/ARM32] Rewrite the stack args to be passed by value on stack
Jiyoung Yun [Mon, 17 Jul 2017 06:48:56 +0000 (15:48 +0900)]
[RyuJIT/ARM32] Rewrite the stack args to be passed by value on stack

7 years agoFix auto starting arm64 ubuntu jobs
jashook [Wed, 19 Jul 2017 16:48:35 +0000 (09:48 -0700)]
Fix auto starting arm64 ubuntu jobs

7 years agoRemove section headers writing to createdump (#12887)
Mike McLaughlin [Thu, 20 Jul 2017 00:53:05 +0000 (17:53 -0700)]
Remove section headers writing to createdump (#12887)

Issue #12853

7 years agoFix a couple errors in the ARM32 lst file.
Pat Gavlin [Thu, 20 Jul 2017 00:42:10 +0000 (17:42 -0700)]
Fix a couple errors in the ARM32 lst file.

- Remove an entry for a test that has been deleted
- Disable ForeignThreadExceptions against its active bug

7 years agoFix ARM32 spill temp allocation
Bruce Forstall [Thu, 20 Jul 2017 00:30:15 +0000 (17:30 -0700)]
Fix ARM32 spill temp allocation

For ARM32 only, lvaAssignVirtualFrameOffsetsToLocals() forced temps
to be allocated high in the frame, with the comment:

```
// On ARM, SP based offsets use smaller encoding. Since temps are relatively
// rarer than lcl usage, allocate them farther from SP.
```

However, lvaFrameAddress(), when estimating the maximum frame offset for a
temp before final frame layout, did not consider this: it always assumed
temps were low on the frame. In addition, lvaTempsHaveLargerOffsetThanVars()
always returns `false` for ARM.

This caused an asserts with JitStress when we had an SP frame with large
locals, and estimated a small offset to a TEMP before final frame layout
but required a very large offset after final frame layout -- an offset that
could not be encoded by the chosen instruction. (These very large non-FP
frames might also exist only because of stress, such as GS stress.)

To fix this, simply remove the optimization, for both RyuJIT and LEGACY_BACKEND.

There is a very small code size regression (242 bytes over 42M) in asm diffs on internal
framework assemblies.

Fixes #12903

7 years agoFix Platform reporting parameters for build pipeline (#12900)
Karthik Rajasekaran [Wed, 19 Jul 2017 22:34:27 +0000 (15:34 -0700)]
Fix Platform reporting parameters for build pipeline (#12900)

7 years agoMerge pull request #12938 from pgavlin/TagGCTests
Pat Gavlin [Wed, 19 Jul 2017 22:04:33 +0000 (15:04 -0700)]
Merge pull request #12938 from pgavlin/TagGCTests

Disable some unreliable GC tests under JIT stress.

7 years agoDisable some unreliable GC tests under JIT stress.
Pat Gavlin [Wed, 19 Jul 2017 21:45:24 +0000 (14:45 -0700)]
Disable some unreliable GC tests under JIT stress.

These tests depend on the JIT not extending lifetimes. This dependency
is frequently unsatisfied when running under JIT stress modes (e.g.
JITStress=1/2 or JITStressRegs=1).

Contributes to #12920, #12923, #12922, and #12921.

7 years agoFix CultureInfo.Parent to avoid throwing and catching (#12916)
Tarek Mahmoud Sayed [Wed, 19 Jul 2017 20:30:36 +0000 (13:30 -0700)]
Fix CultureInfo.Parent to avoid throwing and catching (#12916)

7 years agoMerge pull request #12930 from pgavlin/TagGH11408_ARM32
Pat Gavlin [Wed, 19 Jul 2017 20:23:05 +0000 (13:23 -0700)]
Merge pull request #12930 from pgavlin/TagGH11408_ARM32

Tag the GitHub_11408 test with its bug number.

7 years agoMerge pull request #12928 from pgavlin/TagVerify01Small
Pat Gavlin [Wed, 19 Jul 2017 20:22:48 +0000 (13:22 -0700)]
Merge pull request #12928 from pgavlin/TagVerify01Small

Tag the verify01_small test with its bug number.

7 years agoMerge pull request #12925 from pgavlin/FixScenarioReturnCode
Pat Gavlin [Wed, 19 Jul 2017 20:22:26 +0000 (13:22 -0700)]
Merge pull request #12925 from pgavlin/FixScenarioReturnCode

Fix the SustainedLowLatency/scenario test.

7 years agoMerge pull request #12934 from pgavlin/TagVarargTests
Pat Gavlin [Wed, 19 Jul 2017 20:20:09 +0000 (13:20 -0700)]
Merge pull request #12934 from pgavlin/TagVarargTests

Tag two vararg-related tests with their bug number for ARM.

7 years agoMerge pull request #12931 from jashook/fix_machine_arm32_checked
Jarret Shook [Wed, 19 Jul 2017 20:14:57 +0000 (13:14 -0700)]
Merge pull request #12931 from jashook/fix_machine_arm32_checked

Use the correct machine for arm32 checked jobs

7 years agoTag two vararg-related tests with their bug number for ARM.
Pat Gavlin [Wed, 19 Jul 2017 19:58:49 +0000 (12:58 -0700)]
Tag two vararg-related tests with their bug number for ARM.

These tests are not supported.

Contributes to #12914.