platform/upstream/coreclr.git
5 years agoUpdating Buffer.ZeroMemory to call SpanHelpers.ClearWithoutReferences
Tanner Gooding [Mon, 17 Sep 2018 22:23:13 +0000 (15:23 -0700)]
Updating Buffer.ZeroMemory to call SpanHelpers.ClearWithoutReferences

5 years agoMerge pull request #15657 from mikedn/fp-divmul-binary
Carol Eidt [Tue, 18 Sep 2018 00:46:46 +0000 (17:46 -0700)]
Merge pull request #15657 from mikedn/fp-divmul-binary

Move FP DIV/MUL handling to genCodeForBinary

5 years agoFix spmi environment reset. (#19943)
Sergey Andreenko [Mon, 17 Sep 2018 21:59:07 +0000 (14:59 -0700)]
Fix spmi environment reset. (#19943)

* Dump spmi string environment variables with -d key.

Sometimes it is not clear which environment variables are set during a replay. Add a possibility to dump all active string environment variables with "-v d" key.

It is especially useful when you debug one method and can't get output that you want (for example JitDump) because altJit was set during the collection.

* Dump int spmi environment variables with -d key.

The same change but for int variables that need an additional parsing.

* Fix environment reset in spmi.

The previous changes revealed that we have a problem with environment reset. The reset was added in #13596 to support a correct replay of mch files with mc that had different env variables during the collection.

It was based on Environment that was later deprecated by #13110.

That caused the environment to be reset for each mc file. The fix updates env only when it is necessary and decreases the replay time of an mch file with 200000 methods from 500s to 370s.

* Fix dumpHelp.

Fix formating and adds note that all keys and values are case sensetive.

* Delete retired packages logic.

These packages were retired a long time ago and there is no value to have a special logic for them.

5 years agoMerge pull request #19949 from fiigii/fixhwapis
Carol Eidt [Mon, 17 Sep 2018 20:54:41 +0000 (13:54 -0700)]
Merge pull request #19949 from fiigii/fixhwapis

Fix inconsistent Intel hardware intrinsic APIs

5 years agoJit: ensure objp properly updated by SpillRetExprHelper (#19974)
Andy Ayers [Mon, 17 Sep 2018 17:44:38 +0000 (10:44 -0700)]
Jit: ensure objp properly updated by SpillRetExprHelper (#19974)

We need to arrange to actually update the call objp in the SpillRetExprHelper,
otherwise the changes don't propagate back into the tree.

5 years agoSystem.Private.CoreLib: Move ResoureReader/ResourceSet to shared. (#19994)
Filip Navara [Sun, 16 Sep 2018 03:51:28 +0000 (05:51 +0200)]
System.Private.CoreLib: Move ResoureReader/ResourceSet to shared. (#19994)

* Move ResoureReader/ResourceSet to shared.

* Remove unnecessary cast to RuntimeType from ResoureReader.

5 years agoCorrectly disable varargsupport for windows x86 (#19981)
Jarret Shook [Sat, 15 Sep 2018 21:37:00 +0000 (14:37 -0700)]
Correctly disable varargsupport for windows x86 (#19981)

5 years agoMerge pull request #19988 from BruceForstall/Disable18989
Bruce Forstall [Sat, 15 Sep 2018 18:12:38 +0000 (11:12 -0700)]
Merge pull request #19988 from BruceForstall/Disable18989

Disable arm64 float_cs_ro.cmd

5 years agoDisable arm64 float_cs_ro.cmd
Bruce Forstall [Sat, 15 Sep 2018 18:11:06 +0000 (11:11 -0700)]
Disable arm64 float_cs_ro.cmd

Tracked by #18989

5 years agoLayout native test components correctly on unix (#19918)
Jarret Shook [Sat, 15 Sep 2018 15:57:22 +0000 (08:57 -0700)]
Layout native test components correctly on unix (#19918)

* Enable native test build and add skipmanaged

* Fix adding native components to test dir

* Clean pri1/pri0 builds with native lib copy

This change disables the build of several tests which have native
dependencies; however, would not build the native dependencies on
unix. At copy time this would result in a build-test failure. In
addition, it fixes, adding executables and dynamic/static libraries
to the test's location.

It has been tested with build-test.sh priority1.

* Fix comment wording

* Remove buildagainstpackage arg

* Fix default clang version

* Clean pri1 run OSX

* Correct test count on unix

* Address typo

* Merge runtest.proj

5 years agoFix build break in P1 tests (#19975)
Vitek Karas [Sat, 15 Sep 2018 04:18:21 +0000 (21:18 -0700)]
Fix build break in P1 tests (#19975)

5 years agoAdd short guide for using tiered compilation and how to provide feedback (#19773)
Koundinya Veluri [Sat, 15 Sep 2018 04:00:04 +0000 (21:00 -0700)]
Add short guide for using tiered compilation and how to provide feedback (#19773)

* Add short guide for using tiered compilation and how to provide feedback

* Suggested changes

* Update to say that it's enabled by default

* Add info about target framework/runtime

5 years agoconvert HandleStore::_underlyingBucket to a pointer (#19935)
David Mason [Sat, 15 Sep 2018 03:44:58 +0000 (20:44 -0700)]
convert HandleStore::_underlyingBucket to a pointer (#19935)

* convert HandleStore::_underlyingBucket to a pointer

* undo _underlyingBucket pointer change and delete Ref_CreateHandleTableBucket

* update comment

5 years agoMerge pull request #19125 from mikedn/cse-extract
Brian Sullivan [Fri, 14 Sep 2018 23:58:03 +0000 (16:58 -0700)]
Merge pull request #19125 from mikedn/cse-extract

[WIP] Fix CSE side effect and definition extraction

5 years agoExpand CrossGen Comparison script to able to run on DotNetSdk archive (#19929)
Egor Chesakov [Fri, 14 Sep 2018 22:41:30 +0000 (15:41 -0700)]
Expand CrossGen Comparison script to able to run on DotNetSdk archive (#19929)

* Set platform_assemblies_paths_sep based on OS
* Add crossgen_dotnet_sdk command in tests/scripts/crossgen_comparison.py
* Add example for running crossgen_dotnet_sdk command
* Add OutputFileSizeInBytes property
* Improve crossgen_comparison "compare" command reporting

5 years agoMerge pull request #19845 from briansull/vn-enhancements
Brian Sullivan [Fri, 14 Sep 2018 20:01:37 +0000 (13:01 -0700)]
Merge pull request #19845 from briansull/vn-enhancements

Value Number Enhancements:

5 years agodon't force float->double->int cast for x86 (#19833)
Clinton Ingram [Fri, 14 Sep 2018 17:47:06 +0000 (10:47 -0700)]
don't force float->double->int cast for x86 (#19833)

5 years agoMerge pull request #19951 from vitek-karas/MoveAssertionsToCommon
Vitek Karas [Fri, 14 Sep 2018 14:40:40 +0000 (07:40 -0700)]
Merge pull request #19951 from vitek-karas/MoveAssertionsToCommon

Move Assert class from Interop into the CoreCLRTestLibrary

5 years agoFixed TimeoutHelper typos (#19956)
Joseph Musser [Fri, 14 Sep 2018 11:36:07 +0000 (07:36 -0400)]
Fixed TimeoutHelper typos (#19956)

5 years agoFixed typo ‘defualt’ (#19955)
Joseph Musser [Fri, 14 Sep 2018 11:35:26 +0000 (07:35 -0400)]
Fixed typo ‘defualt’ (#19955)

5 years agoMerge pull request #19745 from CarolEidt/Fix19448
Carol Eidt [Fri, 14 Sep 2018 00:17:14 +0000 (17:17 -0700)]
Merge pull request #19745 from CarolEidt/Fix19448

Arm: Correctly handle multi-reg COPY

5 years agotemporarily disable some hw intrinsic tests
Fei Peng [Thu, 13 Sep 2018 23:53:15 +0000 (16:53 -0700)]
temporarily disable some hw intrinsic tests

5 years agoFix inconsistent Intel hardware intrinsic APIs
Fei Peng [Thu, 13 Sep 2018 23:52:42 +0000 (16:52 -0700)]
Fix inconsistent Intel hardware intrinsic APIs

5 years agoMerge pull request #19945 from echesakovMSFT/EnableCrossBitnessCrossGenTesting
Egor Chesakov [Thu, 13 Sep 2018 23:44:48 +0000 (16:44 -0700)]
Merge pull request #19945 from echesakovMSFT/EnableCrossBitnessCrossGenTesting

Run both Hostx86/arm and Hostx64/arm CrossGens in CI

5 years agoDev16 removed the static_cast<> in a std::basic_string constructor so need to explici...
Aaron Robinson [Thu, 13 Sep 2018 23:23:12 +0000 (16:23 -0700)]
Dev16 removed the static_cast<> in a std::basic_string constructor so need to explicit convert string to wstring to avoid warning. (#19947)

5 years agoReplace fgMarkAddressExposedLocals (#19621)
mikedn [Thu, 13 Sep 2018 23:00:10 +0000 (02:00 +0300)]
Replace fgMarkAddressExposedLocals (#19621)

* Add test for 16472

* Replace fgMarkAddressExposedLocals

* CR: Move fgAddFieldSeqForZeroOffset to improve diff

* CR: Improve comments and various other small issues

* CR: Delete gtCheckQuirkAddrExposedLclVar

* Revert "disable tests\src\JIT\Methodical\fp\exgen\10w5d_cs_do (#19465)"

This reverts commit b0686a29be2eff059f080a66b7aa4febe55a01bc.

5 years agoRun both Hostx86/arm32 and Hostx64/arm32 crossgens in crossgen_comparison scenario
Egor Chesakov [Thu, 13 Sep 2018 19:02:38 +0000 (12:02 -0700)]
Run both Hostx86/arm32 and Hostx64/arm32 crossgens in crossgen_comparison scenario

5 years agowhitespace fixes
Brian Sullivan [Thu, 13 Sep 2018 22:37:03 +0000 (15:37 -0700)]
whitespace fixes

5 years agoValue Number Enhancements:
Brian Sullivan [Wed, 5 Sep 2018 22:58:10 +0000 (15:58 -0700)]
Value Number Enhancements:

Revise the exeception gernerating value number functions:
VNF_OverflowEXc, VNF_CastOvf, VNF_ARithmeticExc, VNF_DivideByZeroExc and ConvertOverflowExc
added support methods for VNNormalValue
Extended GetVNGuncForOper to support overflow operations and additional unsigned operations:
And added value number functions for
- unsigned comparisons, unsigned add, sub and mul
- overflow add, sub, mul
New method: VMCheckAscending to validate that exception sets maintain the ascending ordfer property.
New method: VMExcSetIntersection and VMExcIsSubset
Changed the constant folding logic in VNForFunc to avoid folding when the operation will unconditionally throw when folded.
Explicitly specialize some EvalOp<> calls
Added several new method headers comments in ValueNum.cpp
Clear the unsigned flag when bashing nodes into GT_COMMA or GT_NOP nodes
Removed GT_NOP and GT_COMMA cases from GetVNFuncForOper
Added enum VNOperKind
Added support for the unsigned multiply VNFunc used on 32-bit target

5 years agoFix xplat debugging perf problem. (#19911)
Mike McLaughlin [Thu, 13 Sep 2018 22:05:37 +0000 (15:05 -0700)]
Fix xplat debugging perf problem. (#19911)

Issue #18705

Add threadId to DebuggerIPCEvent so we don't need to use the
slow DAC functions (because of extra memory reads) to get it.

Fixed CorDBIPC_BUFFER_SIZE on arm builds.

5 years agoMerge pull request #19933 from echesakovMSFT/PublishCrossBitnessCrossGenAsWell
Egor Chesakov [Thu, 13 Sep 2018 22:03:43 +0000 (15:03 -0700)]
Merge pull request #19933 from echesakovMSFT/PublishCrossBitnessCrossGenAsWell

Publish both Hostx86 and Hostx64 arm32 CrossGens on Linux

5 years agoUpdate ChineseLunisolarCalendar.cs (#19946)
elyoh [Thu, 13 Sep 2018 21:58:27 +0000 (22:58 +0100)]
Update ChineseLunisolarCalendar.cs (#19946)

Corrects an issue with the conversion table for Gregorian to Chinese lunisolar dates.
See: #19480.

Issue: data discrepancy in year 2057, 2089, and 2097.
Table entry for these years have incorrect days per month for some months.  See #19480 for full details.

Notes
The DaysPerMonth flag uses the binary literal for ease of readability.

5 years agoMove Assert class from Interop into the CoreCLRTestLibrary
vitek-karas [Thu, 13 Sep 2018 20:32:32 +0000 (13:32 -0700)]
Move Assert class from Interop into the CoreCLRTestLibrary

Moving the Assert class to the common library so that it can be used
by tests outside of the Interop tree.

5 years agoMerge pull request #19927 from adityamandaleeka/fix_arm64_emitIns
Aditya Mandaleeka [Thu, 13 Sep 2018 19:12:03 +0000 (12:12 -0700)]
Merge pull request #19927 from adityamandaleeka/fix_arm64_emitIns

Fix emitIns_S_S_R_R not to encode SP to ZR before an add may be emitted

5 years agoAdding the ARM floating point registers to the cordebug.idl file (#19934)
Andrew Au [Thu, 13 Sep 2018 15:19:58 +0000 (08:19 -0700)]
Adding the ARM floating point registers to the cordebug.idl file (#19934)

5 years agoPublish Hostx64/arm32 crossgen and libclrjit.so on Linux
Egor Chesakov [Thu, 13 Sep 2018 03:39:39 +0000 (20:39 -0700)]
Publish Hostx64/arm32 crossgen and libclrjit.so on Linux

5 years agoAddress msbuild issues with cross compiled tests in helix (#19901)
Aaron Robinson [Thu, 13 Sep 2018 02:34:46 +0000 (19:34 -0700)]
Address msbuild issues with cross compiled tests in helix (#19901)

* Address msbuild issues with cross compiled tests in helix

* Fix test warning about duplicate types

5 years agoFix emitIns_S_S_R_R not to encode SP to ZR before an add may be emitted.
Aditya Mandaleeka [Wed, 12 Sep 2018 22:20:09 +0000 (15:20 -0700)]
Fix emitIns_S_S_R_R not to encode SP to ZR before an add may be emitted.

5 years agoImplement Thread.GetApartmentState/TrySetApartmentState (#6323)
Jan Kotas [Wed, 12 Sep 2018 18:17:41 +0000 (11:17 -0700)]
Implement Thread.GetApartmentState/TrySetApartmentState (#6323)

Fixes #5776

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoRevert changes that are causing buildbreaks of OOB packages
Jan Kotas [Wed, 12 Sep 2018 15:12:53 +0000 (08:12 -0700)]
Revert changes that are causing buildbreaks of OOB packages

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoArm: Correctly handle multi-reg COPY
Carol Eidt [Wed, 29 Aug 2018 21:58:10 +0000 (14:58 -0700)]
Arm: Correctly handle multi-reg COPY

Fix #19448

5 years agoUpdate AsyncMethodBuilder.cs (#19909)
Nick Kotov [Wed, 12 Sep 2018 14:14:14 +0000 (17:14 +0300)]
Update AsyncMethodBuilder.cs (#19909)

Changed commentary for range of AsyncCache Tasks with Int32 type.

5 years agoFix GC for collectible classes (#19892)
Jan Vorlicek [Wed, 12 Sep 2018 11:32:31 +0000 (13:32 +0200)]
Fix GC for collectible classes (#19892)

There is a subtle bug in the GC that causes access violation when a
LoaderAllocator of a collectible class is pushed to the mark stack and
that class also has partial sub-objects. One example is an array of byte
arrays. In that case, the mark stack is supposed to have the reference
to the instance of the class stored right before the related partial
sub-objects references. But due to the bug, the slot where the instance
of the class was expected to be located was not set to anything.

5 years agoCallSites for MemoryExtensions.Contains (CoreCLR) (#19874)
Grant [Wed, 12 Sep 2018 10:19:37 +0000 (03:19 -0700)]
CallSites for MemoryExtensions.Contains (CoreCLR) (#19874)

* Update additional callsites for MemoryExtensions.Contains

* One more callsite

* More callsites

* CR fixes

5 years agoFix optimization of CAST(int)(LSH(long)<<CNS_INT 32+ with side effects). (#19899)
Sergey Andreenko [Wed, 12 Sep 2018 03:32:35 +0000 (20:32 -0700)]
Fix optimization of CAST(int)(LSH(long)<<CNS_INT 32+ with side effects). (#19899)

* add a repro test

* Fix

5 years agoMove more registry files to shared partition
Jan Kotas [Tue, 11 Sep 2018 06:33:05 +0000 (23:33 -0700)]
Move more registry files to shared partition

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoMerge pull request #19885 from brianrob/runtimeeventsource_tests
Adam Sitnik [Tue, 11 Sep 2018 14:34:42 +0000 (16:34 +0200)]
Merge pull request #19885 from brianrob/runtimeeventsource_tests

Fix Intermittent RuntimeEventSource Test

5 years agoJIT: use bit vector for identifying jump targets (#19884)
Andy Ayers [Tue, 11 Sep 2018 07:09:48 +0000 (00:09 -0700)]
JIT: use bit vector for identifying jump targets (#19884)

When doing the initial IL scan to locate block boundaries the jit really
only needs to track one bit per offset.

5 years agoMerge pull request #19867 from echesakovMSFT/BuildCrossBitnessCrossGenAsWell
Egor Chesakov [Tue, 11 Sep 2018 05:44:29 +0000 (22:44 -0700)]
Merge pull request #19867 from echesakovMSFT/BuildCrossBitnessCrossGenAsWell

  Build both Hostx86 and Hostx64 arm32 CrossGens on Linux

5 years agoMove registry interop to shared CoreLib partition (#19886)
Jan Kotas [Tue, 11 Sep 2018 05:39:45 +0000 (22:39 -0700)]
Move registry interop to shared CoreLib partition (#19886)

5 years agoBasic implementation for testing of COM activation of a .NET class (#19760)
Aaron Robinson [Tue, 11 Sep 2018 00:24:49 +0000 (17:24 -0700)]
Basic implementation for testing of COM activation of a .NET class (#19760)

* Rough outline of managed implementation for COM activation in SPCL

* Add property for finding interop common
Add property to exclude default assertion file
Display exe ExeLaunchProgram class is going to launch

* Add a native client for the NETServer
Consume the ExeLauncherProgram.cs file as a wrapper for the native test

* Update COM Server contracts to use 'int' instead of 'long'

* Complete symmetric testing coverage for .NET server and native client.

* Block EXE launch from running on non-Windows machines

* Disable COM testing in helix since it has issues on Windows Nano and there
is no way to determine that is the platform.

* Update tests based on CLSID mapping manifest approach.

5 years agoMerge pull request #19276 from CarolEidt/FixUxArgSize
Carol Eidt [Mon, 10 Sep 2018 23:44:26 +0000 (16:44 -0700)]
Merge pull request #19276 from CarolEidt/FixUxArgSize

Fix Unix preallocatedArgCount

5 years agoFix intermitted RuntimeEventSource test.
Brian Robbins [Mon, 10 Sep 2018 22:50:27 +0000 (15:50 -0700)]
Fix intermitted RuntimeEventSource test.

5 years agoBuild both Hostx86 and Hostx64 arm32 crossgens. Continue to use Hostx86 crossgen...
Egor Chesakov [Fri, 7 Sep 2018 19:07:17 +0000 (12:07 -0700)]
Build both Hostx86 and Hostx64 arm32 crossgens. Continue to use Hostx86 crossgen to crossgen System.Private.CoreLib.dll

5 years agoBuild Hostx86/arm32 coreclrpal when CROSSCOMPILE is "1" and Hostx64/arm32 coreclrpal...
Egor Chesakov [Tue, 21 Aug 2018 18:55:58 +0000 (11:55 -0700)]
Build Hostx86/arm32 coreclrpal when CROSSCOMPILE is "1" and Hostx64/arm32 coreclrpal otherwise in configurecompiler.cmake

5 years agoBuild Hostx86/arm32 crossgen when CROSSCOMPILE is "1" and Hostx64/arm32 crossgen...
Egor Chesakov [Fri, 17 Aug 2018 20:52:14 +0000 (13:52 -0700)]
Build Hostx86/arm32 crossgen when CROSSCOMPILE is "1" and Hostx64/arm32 crossgen otherwise in configurecompiler.cmake

5 years agoAllow Hostx64/arm32 combination in configurecompiler.cmake
Egor Chesakov [Fri, 17 Aug 2018 20:47:07 +0000 (13:47 -0700)]
Allow Hostx64/arm32 combination in configurecompiler.cmake

5 years agoToPointerFix - VS debugger needs the ToPointer() methods to inspect a pointer, markin...
Andrew Au [Fri, 7 Sep 2018 23:52:42 +0000 (16:52 -0700)]
ToPointerFix - VS debugger needs the ToPointer() methods to inspect a pointer, marking it as DependencyReductionRoot to make sure it is not optimized away.

[tfs-changeset: 1713493]

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoAdd test cases for Pclmulqdq intrinsic
Fei Peng [Wed, 5 Sep 2018 22:40:51 +0000 (15:40 -0700)]
Add test cases for Pclmulqdq intrinsic

5 years agoImplement PCLMULQDQ intrinsic
Fei Peng [Wed, 5 Sep 2018 22:37:59 +0000 (15:37 -0700)]
Implement PCLMULQDQ intrinsic

5 years agoAdd GetCacheSizePerLogicalCpu and GetCurrentProcessCpuCount to gcenv for windows...
David Mason [Mon, 10 Sep 2018 19:33:34 +0000 (12:33 -0700)]
Add GetCacheSizePerLogicalCpu and GetCurrentProcessCpuCount to gcenv for windows (#19879)

* Add GetCacheSizePerLogicalCpu and GetCurrentProcessCpuCount to gcenv for windows

* Remove dead code, switch to __cpuid instaed of asm helper

* code review feedback

5 years agoFix Unix preallocatedArgCount
Carol Eidt [Mon, 10 Sep 2018 18:22:20 +0000 (11:22 -0700)]
Fix Unix preallocatedArgCount

This has been an existing ToDo for some time.
This results in 19 bytes reduction in code size for pmi diffs of tests and frameworks.

5 years agoMerge pull request #19881 from vitek-karas/EventSouceCommentTypos
Vance Morrison [Mon, 10 Sep 2018 17:08:15 +0000 (10:08 -0700)]
Merge pull request #19881 from vitek-karas/EventSouceCommentTypos

Fix multiple typos in the EventSource.cs design comment.

5 years agoMerge pull request #19844 from CarolEidt/Enable19397Arm64
Carol Eidt [Mon, 10 Sep 2018 16:57:21 +0000 (09:57 -0700)]
Merge pull request #19844 from CarolEidt/Enable19397Arm64

Re-enable GitHub_19397 test

5 years agoFix multiple typos in the EventSource.cs design comment.
vitek-karas [Mon, 10 Sep 2018 12:23:07 +0000 (05:23 -0700)]
Fix multiple typos in the EventSource.cs design comment.

5 years agoMerge pull request #19870 from nattress/debuginfo
Simon Nattress [Sat, 8 Sep 2018 21:38:42 +0000 (14:38 -0700)]
Merge pull request #19870 from nattress/debuginfo

Add DebugInfo dumping support to r2rdump

5 years agoUpdate BuildTools, CoreClr, CoreFx, CoreSetup, PgoData to preview1-03207-02, preview1...
dotnet-maestro-bot [Fri, 7 Sep 2018 20:25:20 +0000 (13:25 -0700)]
Update BuildTools, CoreClr, CoreFx, CoreSetup, PgoData to preview1-03207-02, preview1-26907-04, preview1-26907-04, preview1-26907-05, master-20180907-0057, respectively

5 years agoAdd DebugInfo dumping support to r2rdump
Simon Nattress [Fri, 7 Sep 2018 20:41:30 +0000 (13:41 -0700)]
Add DebugInfo dumping support to r2rdump

Display formatted debug info for each runtime function

5 years agoFix AVX2 Gather Intrinsic failture with JITStress
Fei Peng [Fri, 7 Sep 2018 21:45:37 +0000 (14:45 -0700)]
Fix AVX2 Gather Intrinsic failture with JITStress

5 years agodelete superpmi-shared/compileresult.cpp assert on x86. (#19841)
Sergey Andreenko [Fri, 7 Sep 2018 23:59:10 +0000 (16:59 -0700)]
delete superpmi-shared/compileresult.cpp  assert on x86. (#19841)

* fix emitOutputAM for x86.

* Revert "fix emitOutputAM for x86."

This reverts commit fe5ade83e7c8e1ac1cb4442defdfee1d3a3be3f0.

* delete an assert

* add an assert about slotNum

5 years agoMemoryExtensions.Contains (#19863)
Grant [Fri, 7 Sep 2018 22:25:42 +0000 (15:25 -0700)]
MemoryExtensions.Contains (#19863)

5 years agoFixes towards making the runtime compiled without FEATURE_PREJIT defined (#19864)
Jan Kotas [Fri, 7 Sep 2018 22:22:40 +0000 (15:22 -0700)]
Fixes towards making the runtime compiled without FEATURE_PREJIT defined (#19864)

5 years agoMerge pull request #19866 from dotnetrt/fix-generatetests-script
Carol Eidt [Fri, 7 Sep 2018 22:11:58 +0000 (15:11 -0700)]
Merge pull request #19866 from dotnetrt/fix-generatetests-script

Remove all Sse2 Pack* and Unpack* tests from GneerateTests.csx script

5 years agoMove FP DIV/MUL handling to genCodeForBinary
Mike Danes [Thu, 28 Dec 2017 14:03:22 +0000 (16:03 +0200)]
Move FP DIV/MUL handling to genCodeForBinary

Floating point (SSE) MUL/DIV instructions have the same formats as ADD/SUB but they're handled by genCodeForMul and genCodeForDivMod. At least in the case of division this results in duplicated logic being required in genCodeForDivMod.

5 years agoImport signature parsing and general improvements in R2RDump (#19813)
Tomáš Rylek [Fri, 7 Sep 2018 20:56:05 +0000 (22:56 +0200)]
Import signature parsing and general improvements in R2RDump (#19813)

* Import signature parsing and general improvements in R2RDump

GcInfo - fixed a bug where the machine architecture was stored in
the instance field later than it was used in the calculation of
SlotTable which subsequently ended up with the wrong register set
(ARM64 instead of AMD64).

GcTransition - changed register set selector to a switch as the
previous implementation was incorrect for AMD64.

UnwindInfo - bug fix: the 4-alignment padding should come before
the personality routine, not after it. I have also slightly
simplified the calculation of the padding size.

CoreDisTools - added support for annotating indirect calls with
symbol information for the import cells; fixed formatting of
short relative jumps and added some code comments.

DisassemblingTypeProvider - bumped up some visibilities and made
a few generalizations letting me use this helper in the general
signature parser.

R2RImportSection - replaced binary signature samples with the
actual parsed representation.

R2RReader - I removed special-casing for eager import signatures
that seems wrong - I don't see any equivalent code in the
CoreCLR runtime. Please let me know if anyone is aware of a reason
why this was put here in the first place.

TextDumper and elsewhere - I have removed all tabs from the
R2RDump tool output.

R2RConstants - I have merged the various CoreCLR and R2R constants
in this file - previously they were interspersed in multiple
classes - and I added a bunch of new stuff needed by the signature
parser.

R2RSignature - comprises the newly added R2R signature parser.

Thanks

Tomas

* Slight modification in signature formatting to make it easier to read

I have swapped the ordering of the signature content with the
signature name - based on analyzing actual disassembly produced
by the code I came to the conclusion that the parsed signature
is generally more important than the cell fixup type which is
often obvious just based on the code context.

Thanks

Tomas

* Add dump of unwind info and RVA translation for near jumps / calls

* Add code comment on GetInstruction return value per PR feedback

5 years agoMerge pull request #19857 from CarolEidt/Fix19674
Carol Eidt [Fri, 7 Sep 2018 20:49:17 +0000 (13:49 -0700)]
Merge pull request #19857 from CarolEidt/Fix19674

Morph ByRef args of SIMD field assign

5 years agoAdd Basic Out-of-Process EventPipe Control and Heap Snapshot Capture (#19720)
Brian Robbins [Fri, 7 Sep 2018 20:48:21 +0000 (13:48 -0700)]
Add Basic Out-of-Process EventPipe Control and Heap Snapshot Capture (#19720)

5 years agoFix the slashes when setting the ZapBBInstrDir (#19858)
Michelle McDaniel [Fri, 7 Sep 2018 20:08:25 +0000 (13:08 -0700)]
Fix the slashes when setting the ZapBBInstrDir (#19858)

In OpenMethodProfileDataLogFile, we try to set the directory and path for the .ibc files using windows slashes (\). This causes this code to fail on Linux, which uses forward slashes. This is particularly a problem when setting COMPlus_ZapBBInstrDir, which takes that environment variable and attempts to find the name of the file using wcsrchr(assemblyPath, '\'). This causes a crash on linux when collecting IBC counts. The fix is to ifdef it for linux to use the correct path separator.

This change also includes a fix to change the code for checking if IbcTuning is set to use == instead of -eq which was causing a failure in the build that was ignored.

5 years agoRemove all Sse2 Pack* and Unpack* tests from GneerateTests.csx script
Jacek Blaszczynski [Fri, 7 Sep 2018 17:57:16 +0000 (19:57 +0200)]
Remove all Sse2 Pack* and Unpack* tests from GneerateTests.csx script

Due te earlier error data for initiating generation of Sse2 Pack*
and Unpack* HW intrinsics tests were left in the file. Code generated
from this script will not compile as several required changes are missing.
Removal of this tests data restores full functionality of script.

5 years agoFix for bug 12398: Lowering is inconsistent in checking safety of RegOptional. (...
Eugene Rozenfeld [Fri, 7 Sep 2018 17:48:06 +0000 (10:48 -0700)]
Fix for bug 12398: Lowering is inconsistent in checking safety of RegOptional. (#19740)

This fixes an inconsistency in lowering where it fails to make an
operand contained because IsSafeToContainMem() returns false yet
it marks it regOptional, which may cause a problem if the operand
will be loaded at the point of use.

I also fixed a case where an operand was marked RegOptional even though
there is a type size mismatch.

There are 7 places that are affected, I added repro cases for 4 of them.
I wasn't able to construct repros for the 3 places that deal with
floating point operands but decided to fix those places anyway.

Fixes #12398.

5 years agoMerge pull request #19748 from briansull/evalop-specialized
Brian Sullivan [Fri, 7 Sep 2018 17:40:48 +0000 (10:40 -0700)]
Merge pull request #19748 from briansull/evalop-specialized

Rework the EvalOp generic-template methods

5 years agoMerge pull request #19823 from echesakovMSFT/CrossBitnessValueNumbering
Egor Chesakov [Fri, 7 Sep 2018 16:16:21 +0000 (09:16 -0700)]
Merge pull request #19823 from echesakovMSFT/CrossBitnessValueNumbering

5 years agoMerge pull request #19830 from echesakovMSFT/CrossGenAllocateMethodDescChunkPerMethodDesc
Egor Chesakov [Fri, 7 Sep 2018 16:15:13 +0000 (09:15 -0700)]
Merge pull request #19830 from echesakovMSFT/CrossGenAllocateMethodDescChunkPerMethodDesc

During CrossGen allocate MethodDescChunk per MethodDesc

5 years agoMerge pull request #19855 from dotnetrt/fix-arm-tstlst
Carol Eidt [Fri, 7 Sep 2018 14:49:25 +0000 (07:49 -0700)]
Merge pull request #19855 from dotnetrt/fix-arm-tstlst

Remove deleted Sse2 tests from Test.lst files for arm and arm64 Windows targets

5 years agoFix ICU load on OpenSUSE Tumbleweed (#19812)
Jan Vorlicek [Fri, 7 Sep 2018 08:44:47 +0000 (10:44 +0200)]
Fix ICU load on OpenSUSE Tumbleweed (#19812)

For some reason, OpenSUSE Tumbleweed has decided to prefix the
version number in the SO name of the ICU libraries by "suse".
That prevents our ICU version detection code from working.

This change adds scanning for SO names that contain that prefix too.

5 years agoEnable IJW Native calling managed (#19750)
Morgan Brown [Fri, 7 Sep 2018 02:37:30 +0000 (19:37 -0700)]
Enable IJW Native calling managed (#19750)

* Adds back code required to make IJW native->managed calls (if the runtime is already started) and includes a simple test.

5 years agoMorph ByRef args of SIMD field assign
Carol Eidt [Thu, 6 Sep 2018 21:26:58 +0000 (14:26 -0700)]
Morph ByRef args of SIMD field assign

Fix #19674

5 years agoMerge pull request #19296 from mikedn/cast-cg
Carol Eidt [Fri, 7 Sep 2018 00:39:16 +0000 (17:39 -0700)]
Merge pull request #19296 from mikedn/cast-cg

Refactor integer cast codegen

5 years agoAdd logging to file when CrossGen System.Private.CoreLib.dll on Unix (#19848)
Egor Chesakov [Fri, 7 Sep 2018 00:11:44 +0000 (17:11 -0700)]
Add logging to file when CrossGen System.Private.CoreLib.dll on Unix (#19848)

5 years agoDisabling the failing CoreFX tests related to ToString for negative zero
Tanner Gooding [Thu, 6 Sep 2018 18:28:45 +0000 (11:28 -0700)]
Disabling the failing CoreFX tests related to ToString for negative zero

5 years agoRemoving i386/fptext.asm in favor of using the shared implementation in number.cpp
Tanner Gooding [Thu, 6 Sep 2018 04:24:59 +0000 (21:24 -0700)]
Removing i386/fptext.asm in favor of using the shared implementation in number.cpp

5 years agoUpdating Number.Formatting to properly print -0
Tanner Gooding [Thu, 30 Aug 2018 17:09:59 +0000 (10:09 -0700)]
Updating Number.Formatting to properly print -0

5 years agoClean CodeGen::genEmitCall (#19804)
Sergey Andreenko [Thu, 6 Sep 2018 23:03:09 +0000 (16:03 -0700)]
Clean CodeGen::genEmitCall (#19804)

* delete isProfLeaveCB from arm signature

The previous implementation was done many years ago and I do not why it was done that way.

* extract GetSavedSet

* add isNoGCHelper

* delete isNoGC arg

* move declarations closer to their uses

* delete isGc from genEmitCall

* delete unused method declaration.

* add emitNoGChelper that accepts CORINFO_METHOD_HANDLE

* fix missed switch cases

* add function headers

* Fix feedback

* Fix feedback2

5 years agoAdd native vararg test (#17707)
Jarret Shook [Thu, 6 Sep 2018 22:55:52 +0000 (15:55 -0700)]
Add native vararg test (#17707)

* Add native vararg testing

This is a desktop test. It will be excluded for coreclr; however, decided it is worth adding
to the test tree in case we ever need the coverage.

* Fix several errors, and address feedback

* Split long lines

* Update vararg test

* Fix excludes

* Refernce private_corelib

* Correctly build vararg test

* Fix incorrect addition

* Fix build break unix

* Fix native build on unix

* Fix entry point

* Correctly pass doubles instead of floats

* Correct vararg test, pass double to pinvoke methods

* Remove printf tests

* Fix cmake for varargnative.c

* Fix cdel calling convention

* Correctly pass success back to the main method

* Explicitely undef cdecl

* Fix some excludes and exclude the new test on x86

* Add unix exclude

* Disable echo_short and correct header

5 years agoRemove deleted Sse2 tests from Test.lst files for arm and arm64 Windows targets
Jacek Blaszczynski [Thu, 6 Sep 2018 20:49:27 +0000 (22:49 +0200)]
Remove deleted Sse2 tests from Test.lst files for arm and arm64 Windows targets

Fixes #19853

5 years agoRemove unused GenTree flags (#19840)
mikedn [Thu, 6 Sep 2018 20:28:15 +0000 (23:28 +0300)]
Remove unused GenTree flags (#19840)

GTF_IND_ARR_LEN was set by the importer in minopts/debug mode and used only by value numbering, which does not run in minopts/debug mode.

GTF_FLD_NULLCHECK was also set by the importer and not used anywhere. fgMorphField has its own opinion about when an explicit null check is needed.

5 years agoadd a regression test for Linux GC segfault. (#19820)
Sergey Andreenko [Thu, 6 Sep 2018 20:25:52 +0000 (13:25 -0700)]
add a regression test for Linux GC segfault. (#19820)

* add test

* move the test to pri1 and reduce number of iterations

5 years agoMake cast classification arch independent
Mike Danes [Tue, 7 Aug 2018 19:16:51 +0000 (22:16 +0300)]
Make cast classification arch independent

5 years agoGet rid of Lowering::getCastDescription
Mike Danes [Sun, 5 Aug 2018 16:53:50 +0000 (19:53 +0300)]
Get rid of Lowering::getCastDescription

5 years agoCleanup LinearScan::BuildCast
Mike Danes [Sun, 5 Aug 2018 07:33:27 +0000 (10:33 +0300)]
Cleanup LinearScan::BuildCast