platform/upstream/dotnet/runtime.git
8 years agoAdd missing parameter name to GetEra ArgumentOutOFRangeException
stephentoub [Tue, 8 Mar 2016 04:03:54 +0000 (23:03 -0500)]
Add missing parameter name to GetEra ArgumentOutOFRangeException

The exception's parameter name is incorrectly getting set to the intended message ("Time value was out of era range.").

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

8 years agoMerge pull request dotnet/coreclr#3564 from jashook/x86_lb_excludes
Jarret Shook [Tue, 8 Mar 2016 02:14:00 +0000 (18:14 -0800)]
Merge pull request dotnet/coreclr#3564 from jashook/x86_lb_excludes

x86 lb excludes

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

8 years agoMerge pull request dotnet/coreclr#3556 from AndyAyersMS/InlineRefactorEarlyForce
Andy Ayers [Tue, 8 Mar 2016 01:09:59 +0000 (17:09 -0800)]
Merge pull request dotnet/coreclr#3556 from AndyAyersMS/InlineRefactorEarlyForce

Inline refactoring: revise candidacy determination

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

8 years agoMerge pull request dotnet/coreclr#3441 from ramarag/pal_longfile
Rama krishnan Raghupathy [Tue, 8 Mar 2016 00:58:24 +0000 (16:58 -0800)]
Merge pull request dotnet/coreclr#3441 from ramarag/pal_longfile

Enabling LongFile Support in PAL

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

8 years agoMerge pull request dotnet/coreclr#3553 from dotnet-bot/from-tfs
Pat Gavlin [Tue, 8 Mar 2016 00:57:36 +0000 (16:57 -0800)]
Merge pull request dotnet/coreclr#3553 from dotnet-bot/from-tfs

Merge changes from TFS

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

8 years agoMerge pull request dotnet/coreclr#3477 from DrewScoggins/master
Matt Ellis [Tue, 8 Mar 2016 00:49:05 +0000 (16:49 -0800)]
Merge pull request dotnet/coreclr#3477 from DrewScoggins/master

Update Linux build instructions

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

8 years agox86 lb excludes
Jarret Shook [Tue, 8 Mar 2016 00:10:38 +0000 (16:10 -0800)]
x86 lb excludes

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

8 years agoInline refactoring: revise candidacy determination
Andy Ayers [Mon, 7 Mar 2016 20:23:09 +0000 (12:23 -0800)]
Inline refactoring: revise candidacy determination

Rework the code to determine the key aspects of candidacy up front
rather than figuring it out eventually. In particular this ensures
that the two stages of evaulation for inlines both start at the same
point for candidates.

This will help streamline subsequent work to move the state machine
into the policy, since the state machine is only needed for the
case where the candidate is a discretionary inline, and the policy
now tracks this directly.

For the `LegacyPolicy`, if an inline is both smaller than the always
inline size and marked force inline, attribute its inlining to its
small size.

Remove bulk of the of the "evaluation in progress" candidate
observations since they don't add much value. As a result `noteCandidate`
is not needed as an external API, and can be repurposed internally as
`setCandidate`.

Change how the prejit root case is tracked to make it explicit
from the context rather than a callback to the compiler.

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

8 years agoEnabling LongFile Support in PAL
DDCloud [Tue, 1 Mar 2016 04:24:42 +0000 (20:24 -0800)]
Enabling LongFile Support in PAL

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

8 years agoReapply change 1578859: Add a new set of APIs for JIT configuration.
Pat Gavlin [Mon, 7 Mar 2016 19:41:19 +0000 (11:41 -0800)]
Reapply change 1578859: Add a new set of APIs for JIT configuration.

SuperPMI has been udpated to accommodate this change, and should no
longer crash when run using a JIT built with these changes.

[tfs-changeset: 1582144]

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

8 years agoMerge pull request dotnet/coreclr#2878 from jashook/x86_exclude_update
Jarret Shook [Mon, 7 Mar 2016 18:59:55 +0000 (10:59 -0800)]
Merge pull request dotnet/coreclr#2878 from jashook/x86_exclude_update

Update x86 lb excludes and turn on ci testing for x86 lb.

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

8 years agoMerge pull request dotnet/coreclr#3521 from LLITCHEV/Issue3225
Lubomir Litchev [Mon, 7 Mar 2016 18:26:03 +0000 (10:26 -0800)]
Merge pull request dotnet/coreclr#3521 from LLITCHEV/Issue3225

Remove a duplicate address tree consumption.

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

8 years agoNew x86 excludes and turn on ci testing for x86.
jashook [Wed, 27 Jan 2016 05:46:48 +0000 (21:46 -0800)]
New x86 excludes and turn on ci testing for x86.

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

8 years agoMerge pull request dotnet/coreclr#3543 from leemgs/upstream-cross-arch2
Jan Kotas [Mon, 7 Mar 2016 04:00:52 +0000 (20:00 -0800)]
Merge pull request dotnet/coreclr#3543 from leemgs/upstream-cross-arch2

ARM: Remove Distro/OS that have not been tested

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

8 years agoARM: Remove Distro/OS that have not been tested
Geunsik Lim [Mon, 7 Mar 2016 02:12:36 +0000 (11:12 +0900)]
ARM: Remove Distro/OS that have not been tested

Let's remove rest Distro/OSes to keep only the Distro/OS that have been tested
until someone actually start using/testing CoreCLR on RHEL, Debian, OSX, and so on.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/d1dfd9f1adfd2c76253003adc20dae282b04e674

8 years agoMerge pull request dotnet/coreclr#3470 from erozenfeld/ValueNumbersForR2RHelpers
Jan Kotas [Sun, 6 Mar 2016 03:15:10 +0000 (19:15 -0800)]
Merge pull request dotnet/coreclr#3470 from erozenfeld/ValueNumbersForR2RHelpers

Improvements for ReadyToRun helpers in JIT value numbering.

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

8 years agoMerge pull request dotnet/coreclr#3508 from hughbe/patch-1
Jan Kotas [Sun, 6 Mar 2016 03:11:10 +0000 (19:11 -0800)]
Merge pull request dotnet/coreclr#3508 from hughbe/patch-1

Fix incorrect exception parameter name in GC

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

8 years agoMerge pull request dotnet/coreclr#3538 from vcsjones/fix-3531
Jan Kotas [Sun, 6 Mar 2016 03:00:27 +0000 (19:00 -0800)]
Merge pull request dotnet/coreclr#3538 from vcsjones/fix-3531

Fix compilation errors on tests.

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

8 years agoFix compilation errors on tests.
Kevin Jones [Sat, 5 Mar 2016 23:07:11 +0000 (18:07 -0500)]
Fix compilation errors on tests.

Fix dotnet/coreclr#3531

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

8 years agoMerge pull request dotnet/coreclr#3536 from JohnChen0/master
Jan Kotas [Sat, 5 Mar 2016 19:31:50 +0000 (11:31 -0800)]
Merge pull request dotnet/coreclr#3536 from JohnChen0/master

Modify zaprequire switch to allow Ready-to-Run images

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

8 years agoModify zaprequire switch to allow Ready-to-Run images
John Chen (CLR) [Sat, 5 Mar 2016 03:38:55 +0000 (19:38 -0800)]
Modify zaprequire switch to allow Ready-to-Run images

Address issue dotnet/coreclr#3527.

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

8 years agoMerge pull request dotnet/coreclr#3446 from kyulee1/FixIlasmTool
Kyungwoo Lee [Sat, 5 Mar 2016 16:22:12 +0000 (08:22 -0800)]
Merge pull request dotnet/coreclr#3446 from kyulee1/FixIlasmTool

Fix for not using ilasm from the build binary

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

8 years agoMerge pull request dotnet/coreclr#3528 from leemgs/upstream-pal-linux-macro
Jan Kotas [Sat, 5 Mar 2016 14:16:21 +0000 (06:16 -0800)]
Merge pull request dotnet/coreclr#3528 from leemgs/upstream-pal-linux-macro

Replace all uses of __LINUX__ with the lower case

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

8 years agoMerge pull request dotnet/coreclr#3525 from leemgs/upstream-cross-arch
Jan Kotas [Sat, 5 Mar 2016 14:11:44 +0000 (06:11 -0800)]
Merge pull request dotnet/coreclr#3525 from leemgs/upstream-cross-arch

Add arm[64] to isMSBuildOnNETCoreSupported()

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

8 years agoMerge pull request dotnet/coreclr#3530 from ramarag/fixtest
Rama krishnan Raghupathy [Sat, 5 Mar 2016 09:31:03 +0000 (01:31 -0800)]
Merge pull request dotnet/coreclr#3530 from ramarag/fixtest

Fix syntax error in test code

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

8 years agoFix syntax error in test code
Rama Krishnan Raghupathy [Sat, 5 Mar 2016 09:22:29 +0000 (01:22 -0800)]
Fix syntax error in test code

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

8 years agoReplace all uses of __LINUX__ with the lower case
Geunsik Lim [Sat, 5 Mar 2016 03:05:12 +0000 (12:05 +0900)]
Replace all uses of __LINUX__ with the lower case

According to https://sourceforge.net/p/predef/wiki/OperatingSystems/
(Pre-defined Compiler Macros) and http://www.faqs.org/docs/Linux-HOWTO/GCC-HOWTO.html
(Porting and compiling:Automatically defined symbols), the __linux__ marcro is the
right way to detect systems based on the Linux kernel and is the POSIX compliant.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/6f7aa7967c607b8c667518314ab937c0d7547025

8 years agoImprovements for ReadyToRun helpers in JIT value numbering.
Eugene Rozenfeld [Wed, 2 Mar 2016 06:17:00 +0000 (22:17 -0800)]
Improvements for ReadyToRun helpers in JIT value numbering.

The following ReadyToRun helpers are now treated similarly to their normal
counterparts in value numbering:
CORINFO_HELP_READYTORUN_NEW
CORINFO_HELP_READYTORUN_NEWARR_1
CORINFO_HELP_READYTORUN_ISINSTANCEOF
CORINFO_HELP_READYTORUN_CHKCAST
CORINFO_HELP_READYTORUN_STATIC_BASE

In particular, this allows CSE-ing calls to the last 3 of the above helpers when
possible. dotnet/coreclr#3281 is an issue for CORINFO_HELP_READYTORUN_STATIC_BASE.

Compiler::fgValueNumberHelperCallFunc is refactored to reduce code
duplication.

Closes dotnet/coreclr#3281.

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

8 years agoMerge pull request dotnet/coreclr#3505 from LLITCHEV/Issue3360
Lubomir Litchev [Sat, 5 Mar 2016 01:26:49 +0000 (17:26 -0800)]
Merge pull request dotnet/coreclr#3505 from LLITCHEV/Issue3360

Reenable an assert.

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

8 years agoMerge pull request dotnet/coreclr#3523 from briansull/struct16-fix
Brian Sullivan [Sat, 5 Mar 2016 01:10:32 +0000 (17:10 -0800)]
Merge pull request dotnet/coreclr#3523 from briansull/struct16-fix

Fixes for 16-byte struct argument passing for ARM64

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

8 years agoFixes for 16-byte struct argument passing for ARM64
Brian Sullivan [Fri, 4 Mar 2016 22:39:36 +0000 (14:39 -0800)]
Fixes for 16-byte struct argument passing for ARM64

Workarounds to fix Issue 3151 and Issue 2987
14 additional tests are now passing
When passing two register TYP_STRUCT type suisng PUTARG_REG we add a physical register kill for the second register
When generating code for a 16-byte GT_LDOJ that conbatisn GC references we reverse the instructions when necessary
Added new utility method lvIsMultiregStruct() that returns true for the ARM64 16-byte struct type
Updated Tests.lst file

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

8 years agoAdd arm[64] to isMSBuildOnNETCoreSupported()
Geunsik Lim [Sat, 5 Mar 2016 00:26:17 +0000 (09:26 +0900)]
Add arm[64] to isMSBuildOnNETCoreSupported()

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/be506eb3fadff99ae651fa1565eb59245486dcb1

8 years agoMerge pull request dotnet/coreclr#3513 from mikem8361/soschanges
Mike McLaughlin [Sat, 5 Mar 2016 00:24:42 +0000 (16:24 -0800)]
Merge pull request dotnet/coreclr#3513 from mikem8361/soschanges

Fix two sos issues.

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

8 years agoMerge pull request dotnet/coreclr#3518 from gkhanna79/OSXRepro
Gaurav Khanna [Sat, 5 Mar 2016 00:16:17 +0000 (16:16 -0800)]
Merge pull request dotnet/coreclr#3518 from gkhanna79/OSXRepro

Define Platform and OutputPaths

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

8 years agoMerge pull request dotnet/coreclr#3519 from JohnChen0/longpath
John Chen [Sat, 5 Mar 2016 00:09:22 +0000 (16:09 -0800)]
Merge pull request dotnet/coreclr#3519 from JohnChen0/longpath

Restore linking debug corerun.exe with retail CRT

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

8 years agoMerge pull request dotnet/coreclr#3511 from vcsjones/fix-3506
Jan Kotas [Sat, 5 Mar 2016 00:05:34 +0000 (16:05 -0800)]
Merge pull request dotnet/coreclr#3511 from vcsjones/fix-3506

Improve GetHashCode for IntPtr/UIntPtr on 64-bit.

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

8 years agoMerge pull request dotnet/coreclr#3507 from gkhanna79/OneCore2
Gaurav Khanna [Fri, 4 Mar 2016 22:47:50 +0000 (14:47 -0800)]
Merge pull request dotnet/coreclr#3507 from gkhanna79/OneCore2

Fix CRT linkages for uCRT

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

8 years agoMerge pull request dotnet/coreclr#3452 from fujiy/patch-1
Aditya Mandaleeka [Fri, 4 Mar 2016 22:33:15 +0000 (14:33 -0800)]
Merge pull request dotnet/coreclr#3452 from fujiy/patch-1

Anchor Tag fix

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

8 years agoReenable an assert.
Lubomir Litchev [Fri, 4 Mar 2016 15:34:07 +0000 (07:34 -0800)]
Reenable an assert.

Back in December an assert was commented out in the code (when a big PR
was done).
The issue was that in one case of a tail call test there was a LcLVar with
type of TYP_STRUCT with a single eightbyte.
This should not have happened since in such cses the type of the LclVar is
normalized to the type of the first structs' eightbyte.
Enabling the assert has no effect on the test in question - it passes.
I suspect the issue was resolved sometime back (in January) when we
discovered there were some bad merges in the big PR wiping . As I recall, at least
one was related to a taken out tail call fix.

Fixes issue 3360.

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

8 years agoDefine Platform and OutputPaths before Microsoft.Common.CurrentVersion.targets is...
Gaurav Khanna [Fri, 4 Mar 2016 21:44:36 +0000 (13:44 -0800)]
Define Platform and OutputPaths before Microsoft.Common.CurrentVersion.targets is included.

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

8 years agoRemove a duplicate address tree consumption.
Lubomir Litchev [Fri, 4 Mar 2016 21:44:40 +0000 (13:44 -0800)]
Remove a duplicate address tree consumption.

In void CodeGen::genEmitCallvoid CodeGen::genEmitCall override that takes
a GenTreeIndir AST we consume the indir addr node. Same thing is done in
codegenxarch.cpp just before this method is called. This PR removes the
later and thus leaving one consumption of the indirTree->Addr() tree.

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

8 years agoImprove GetHashCode for IntPtr/UIntPtr on 64-bit.
Kevin Jones [Fri, 4 Mar 2016 17:22:36 +0000 (12:22 -0500)]
Improve GetHashCode for IntPtr/UIntPtr on 64-bit.

The GetHashCode behavior on IntPtr and UIntPtr truncated the upper 32 bits.
This change uses the behavior of long and ulong, respectively, to generate
the hash code.

UIntPtr no longer strips off the top-most bit for GetHashCode purposes.

Fix dotnet/coreclr#3506

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

8 years agoRestore linking debug corerun.exe with retail CRT
John Chen (CLR) [Fri, 4 Mar 2016 21:39:47 +0000 (13:39 -0800)]
Restore linking debug corerun.exe with retail CRT

The long path support feature modified debug corerun.exe with debug
CRT (msvcrtd.dll). This made it more difficult to use corerun.exe,
since the debug CRT is not always available. It turns out this change
is no longer necessary, so reverting part of the change to link debug
corerun.exe with retail CRT (msvcrt.dll) again.

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

8 years agoUpdate Linux install instructions
Drew Scoggins [Fri, 4 Mar 2016 21:29:48 +0000 (13:29 -0800)]
Update Linux install instructions

Removed all of the instructions that related to running the hello world
sample on Linux.  Also removed the dependency on mono from the
intsructions as this is no longer needed.  Finally, I removed the steps
that related to using Windows as that is no longer needed for the Linux
build.

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

8 years agoMerge pull request dotnet/coreclr#3495 from pgavlin/HistogramCleanup
Pat Gavlin [Fri, 4 Mar 2016 21:25:04 +0000 (13:25 -0800)]
Merge pull request dotnet/coreclr#3495 from pgavlin/HistogramCleanup

Clean up the JIT's histogram type.

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

8 years agoMerge pull request dotnet/coreclr#3512 from benpye/arm-monotonic-coarse-tryrun
Jan Kotas [Fri, 4 Mar 2016 21:10:49 +0000 (13:10 -0800)]
Merge pull request dotnet/coreclr#3512 from benpye/arm-monotonic-coarse-tryrun

Add value to arm/arm64 tryrun files for HAVE_CLOCK_MONOTONIC_COARSE.

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

8 years agoFix for not using ilasm from the build binary
Kyungwoo Lee [Fri, 4 Mar 2016 20:35:13 +0000 (12:35 -0800)]
Fix for not using ilasm from the build binary

Using ilasm from the build is a desire to test ilasm tool -- in fact we've now had ildasm-ilasm round-trip tests,
so this is not critical either.
But when building cross-target like ARM64, running such native ilasm in the different host (x64) is not an option.
Given the current test architect where tests are all populated in Windows,
I just fall back to use one from VS tool same as other tools like CSC.
Ideally, we should download such host tools based on host target especially
when we start populating tests on non-Window platforms.
Currently two of tests are disabled due to the issue dotnet/coreclr#3517.

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

8 years agoMerge pull request dotnet/coreclr#3509 from kyulee1/arm64build
Kyungwoo Lee [Fri, 4 Mar 2016 20:29:11 +0000 (12:29 -0800)]
Merge pull request dotnet/coreclr#3509 from kyulee1/arm64build

Fix for disabling incremental build for ARM64

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

8 years agoMerge pull request dotnet/coreclr#3497 from adityamandaleeka/threading_test_port
Aditya Mandaleeka [Fri, 4 Mar 2016 20:27:06 +0000 (12:27 -0800)]
Merge pull request dotnet/coreclr#3497 from adityamandaleeka/threading_test_port

[WIP] Open source some more threading tests

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

8 years agoFix C++11 issue when converting string to char *
Ben Pye [Fri, 4 Mar 2016 18:24:37 +0000 (18:24 +0000)]
Fix C++11 issue when converting string to char *

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

8 years agoMerge pull request dotnet/coreclr#3500 from AndyAyersMS/InlineRefactorInlineHints
Andy Ayers [Fri, 4 Mar 2016 19:27:22 +0000 (11:27 -0800)]
Merge pull request dotnet/coreclr#3500 from AndyAyersMS/InlineRefactorInlineHints

Inline refactoring: convert hints into observations

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

8 years agoClean up the JIT's histogram type.
Pat Gavlin [Thu, 3 Mar 2016 20:54:34 +0000 (12:54 -0800)]
Clean up the JIT's histogram type.

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

8 years agoFix two sos issues.
Mike McLaughlin [Fri, 4 Mar 2016 18:05:24 +0000 (10:05 -0800)]
Fix two sos issues.

ARM Disassemble problem and reenterency bug on Windows.

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

8 years agoAdd value to arm/arm64 tryrun files for HAVE_CLOCK_MONOTONIC_COARSE.
Ben Pye [Fri, 4 Mar 2016 18:01:56 +0000 (18:01 +0000)]
Add value to arm/arm64 tryrun files for HAVE_CLOCK_MONOTONIC_COARSE.

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

8 years agoMerge pull request dotnet/coreclr#3491 from rahku/Helix
Rahul Kumar [Fri, 4 Mar 2016 17:56:52 +0000 (09:56 -0800)]
Merge pull request dotnet/coreclr#3491 from rahku/Helix

add TargetsWindows property required by cloudtest.targets in buildtools package

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

8 years agoadd TargetsWindows property required by cloudtest.targets in buildtools package
Rahul Kumar [Tue, 1 Mar 2016 23:31:11 +0000 (15:31 -0800)]
add TargetsWindows property required by cloudtest.targets in buildtools package

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

8 years agoChange priority of tests in baseservices/threading to 1.
Aditya Mandaleeka [Fri, 4 Mar 2016 17:44:12 +0000 (09:44 -0800)]
Change priority of tests in baseservices/threading to 1.

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

8 years agoMerge pull request dotnet/coreclr#3502 from myungjoo/fix/3462_arm_linux_stack
Jan Kotas [Fri, 4 Mar 2016 17:36:05 +0000 (09:36 -0800)]
Merge pull request dotnet/coreclr#3502 from myungjoo/fix/3462_arm_linux_stack

ARM-Linux Fixes (Issue dotnet/coreclr#3462)

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

8 years agoMerge pull request dotnet/coreclr#3503 from dotnet-bot/from-tfs
Jan Kotas [Fri, 4 Mar 2016 17:33:26 +0000 (09:33 -0800)]
Merge pull request dotnet/coreclr#3503 from dotnet-bot/from-tfs

Merge changes from TFS

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

8 years agoMerge pull request dotnet/coreclr#3404 from gregg-miskelly/DbgShimFix
Mike McLaughlin [Fri, 4 Mar 2016 17:31:15 +0000 (09:31 -0800)]
Merge pull request dotnet/coreclr#3404 from gregg-miskelly/DbgShimFix

DbgShim!RegisterForRuntimeStartup: Avoid extra call to callback

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

8 years agoFixup CRT linkages for uCRT
Gaurav Khanna [Fri, 4 Mar 2016 02:10:26 +0000 (18:10 -0800)]
Fixup CRT linkages for uCRT

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

8 years agoMerge pull request dotnet/coreclr#3156 from sejongoh/add_gc_stress_modes
Sejong Oh [Fri, 4 Mar 2016 17:08:22 +0000 (09:08 -0800)]
Merge pull request dotnet/coreclr#3156 from sejongoh/add_gc_stress_modes

Add GC stress modes

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

8 years agoMerge pull request dotnet/coreclr#3337 from sejongoh/reuse_existing_function_to_set_s...
Sejong Oh [Fri, 4 Mar 2016 17:06:27 +0000 (09:06 -0800)]
Merge pull request dotnet/coreclr#3337 from sejongoh/reuse_existing_function_to_set_stress_modes

reuse getStressModeScriptStep

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

8 years agoInline refactoring: convert hints into observations
Andy Ayers [Wed, 2 Mar 2016 23:21:50 +0000 (15:21 -0800)]
Inline refactoring: convert hints into observations

This change updates the inlining code to use observations in place of
the InlineHints and hint-like things (eg "HasSimd"). A number of new
observations were added in support of this.

The `compInlineeHints` member of the compiler object was removed as
the same information is now tracked by the inline policy. The policy
also now contains most of the weights and combining logic used to
compute the profitabiliy boost for the candidate.

There is one subtle and tricky aspect to the change. For the most part
the hints were ignored during the prejit-root analysis, but the mostly
load-store hint was propagated and influenced the inlines done when
crossgenning mscorlib. See dotnet/coreclr#3482 for more on this particular quirk.

I've preserved this behavior by "passing" the prejit inline result
into `fgFindJumpTargets`. In actuality the result is passed by
temporarily setting the `compInlineResult` compiler member variable.
Then, in `fgFindJumpTargets`, the load-store observation is the only
one not guarded by `compIsForInlining`. In a subsequent change I'll redo
the guards at other observation sites and put the policy aspects of these
observations into the policy object.

This addresses another piece of the work outlined in dotnet/coreclr#3371.

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

8 years agoFix incorrect exception parameter name in GC
Hugh Bellamy [Fri, 4 Mar 2016 16:42:30 +0000 (16:42 +0000)]
Fix incorrect exception parameter name in GC

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

8 years agoFix for disabling incremental build for ARM64
Kyungwoo Lee [Fri, 4 Mar 2016 16:38:05 +0000 (08:38 -0800)]
Fix for disabling incremental build for ARM64

The fix (dotnet/coreclr@d58885c9a37d857f10d90f6db7246630d4ce8980) broke ARM64 debug
build.
The right fix is to disable such flag for all archs.

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

8 years ago197654 [x86] [scanRuntime] Fix contracts in gcenv.os.cpp
Maoni Stephens [Fri, 4 Mar 2016 07:33:35 +0000 (23:33 -0800)]
197654 [x86] [scanRuntime] Fix contracts in gcenv.os.cpp

[tfs-changeset: 1581565]

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

8 years agoFix Stack Unwind Behavior of Libunwind-ARM
MyungJoo Ham [Fri, 4 Mar 2016 04:38:15 +0000 (13:38 +0900)]
Fix Stack Unwind Behavior of Libunwind-ARM

Disable UNW_ARM_METHOD_DWARF, which gets problematic with
assembly-created stacks in ARM systems.

Although previous commits have fixed the compatibility issues
between cpp stacks and libunwind-arm, the assembly part
(asmhelpers.S) had similar problems.

Fix dotnet/coreclr#3462

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/35b5df6888f1574e6ef9313c6bc8522d1817573d

8 years agoFix PAL_VirtualUnwind Behavior with Clutters in PC
MyungJoo Ham [Wed, 2 Mar 2016 12:27:00 +0000 (21:27 +0900)]
Fix PAL_VirtualUnwind Behavior with Clutters in PC

Libunwind-ARM recommends to read LR to get value of PC
while unwinding stack, which often causes the caller
(PAL_VirtualUnwind) to have LSB of PC set.

Such behavior incurs errornous behavior of PAL_VirtualUnwind
if the output is fed back to PAL_VirtualUnwind as the input,
which is observed with VirtualUnwindToFirstManagedCallFrame().

This commit clears LSB of PC in WinContext to prevent it.

Note that this is a partial fix for the issue dotnet/coreclr#3462.
(this does not fix assembly stacks)

Fix dotnet/coreclr#3462

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/b15c9d4f8a2bdad6dc7ecc03df037783e31d7d0c

8 years agoAdd GC stress modes
Sejong Oh [Fri, 12 Feb 2016 09:23:35 +0000 (01:23 -0800)]
Add GC stress modes

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

8 years agoMerge pull request dotnet/coreclr#3498 from kyulee1/disinc
Kyungwoo Lee [Fri, 4 Mar 2016 02:04:56 +0000 (18:04 -0800)]
Merge pull request dotnet/coreclr#3498 from kyulee1/disinc

Fix for disabling incremental link in Windows

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

8 years agoreuse getStressModeScriptStep
Sejong Oh [Wed, 24 Feb 2016 05:44:38 +0000 (21:44 -0800)]
reuse getStressModeScriptStep

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

8 years agoMerge pull request dotnet/coreclr#3499 from wtgodbe/nameTooLong
William Godbe [Fri, 4 Mar 2016 00:35:04 +0000 (16:35 -0800)]
Merge pull request dotnet/coreclr#3499 from wtgodbe/nameTooLong

Fix file-name-too-long error for all builds, not just pri1

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

8 years agoFix file-name-too-long error for all builds, not just pri1
William Godbe [Fri, 4 Mar 2016 00:27:39 +0000 (16:27 -0800)]
Fix file-name-too-long error for all builds, not just pri1

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

8 years agoRemove needless references to test library.
Aditya Mandaleeka [Fri, 4 Mar 2016 00:05:49 +0000 (16:05 -0800)]
Remove needless references to test library.

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

8 years agoMerge pull request dotnet/coreclr#3472 from AndyAyersMS/InlineRefactorFixPlumbing
Andy Ayers [Thu, 3 Mar 2016 23:49:29 +0000 (15:49 -0800)]
Merge pull request dotnet/coreclr#3472 from AndyAyersMS/InlineRefactorFixPlumbing

Inline refactoring: rework logic in compCompileHelper

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

8 years agoFix for disabling incremental link in Windows
Kyungwoo Lee [Thu, 3 Mar 2016 23:38:08 +0000 (15:38 -0800)]
Fix for disabling incremental link in Windows

I'm still getting linker error (mostly debug build) which often caused a
trouble to reboot the machine.
Looking at vcxproj files, we didn't correctly disable incremental link.
There is some ordering issues in linker flag definitions.
The disabling flag should be at the end for each build type
to override the default behavior.

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

8 years agoMerge pull request dotnet/coreclr#3494 from dotnet-bot/from-tfs
Pat Gavlin [Thu, 3 Mar 2016 23:09:31 +0000 (15:09 -0800)]
Merge pull request dotnet/coreclr#3494 from dotnet-bot/from-tfs

Merge changes from TFS

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

8 years agoAdd license headers to ported threading tests.
Aditya Mandaleeka [Thu, 3 Mar 2016 23:09:00 +0000 (15:09 -0800)]
Add license headers to ported threading tests.

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

8 years agoRemove Monitor/EnterExit15.
Aditya Mandaleeka [Thu, 3 Mar 2016 22:15:53 +0000 (14:15 -0800)]
Remove Monitor/EnterExit15.

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

8 years agoMerge pull request dotnet/coreclr#3488 from benpye/arm-redefinition
Pat Gavlin [Thu, 3 Mar 2016 22:12:09 +0000 (14:12 -0800)]
Merge pull request dotnet/coreclr#3488 from benpye/arm-redefinition

Fix ARM build regression

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

8 years agoAdd two files that should have been part of changeset dotnet/coreclr#1581242.
Pat Gavlin [Thu, 3 Mar 2016 21:00:03 +0000 (13:00 -0800)]
Add two files that should have been part of changeset dotnet/coreclr#1581242.

[tfs-changeset: 1581263]

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

8 years agoExclude DefaultStackCommit test from non-Windows platforms.
Aditya Mandaleeka [Thu, 3 Mar 2016 20:28:27 +0000 (12:28 -0800)]
Exclude DefaultStackCommit test from non-Windows platforms.

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

8 years agoOpen source tests from baseservices/threading.
Aditya Mandaleeka [Thu, 3 Mar 2016 20:24:52 +0000 (12:24 -0800)]
Open source tests from baseservices/threading.

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

8 years agoRefactor Utilcode's IAllocators.
Pat Gavlin [Thu, 3 Mar 2016 19:51:59 +0000 (11:51 -0800)]
Refactor Utilcode's IAllocators.

- `DefaultAllocator` has been replaced with `HostAllocator` in RyuJIT, which
  uses the JIT hosting interface to allocate and free memory.
- The definition of `DefaultAllocator` has been moved into its own file, as it
  remains in use by the interpreter and the binder.
- `ProcessHeapAllocator` has been moved into JIT32, as that was its only
  remaining user.
- `AllowZeroAllocator`'s static field has been changed to an instance field
  to avoid the need to define storage for the static field in Utilcode.

[tfs-changeset: 1581242]

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

8 years agoMerge pull request dotnet/coreclr#3459 from LLITCHEV/Issue3382-1
Lubomir Litchev [Thu, 3 Mar 2016 17:48:53 +0000 (09:48 -0800)]
Merge pull request dotnet/coreclr#3459 from LLITCHEV/Issue3382-1

Fix GC holes for all AMD64 platforms (Windows and System V) and a bug…

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

8 years agoFix CMake Script for libunwind Feature Check
MyungJoo Ham [Mon, 29 Feb 2016 08:11:10 +0000 (17:11 +0900)]
Fix CMake Script for libunwind Feature Check

Check the availability correctly for Linux.

The cmake configuration script has been trying to find out
the availability of functions directly with check_function_exists,
which depends on the symbol names in .so files.
However, the libunwind implementation uses macros to
redefine functions names for each architecture making it
impossible to directly look up symbol tables of .so files.

In order to allow the script to use the information in
header files, check_function_exists should be replaced
with check_cxx_source_compiles.

Besides config.h.in had missing declarations for the
CMAKE variables

Fix dotnet/coreclr#3372

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/3c0d5e85c59107a4710317f445bec0528cbe232b

8 years agoFix Stack Unwind for ARM/Linux
MyungJoo Ham [Mon, 29 Feb 2016 08:07:31 +0000 (17:07 +0900)]
Fix Stack Unwind for ARM/Linux

Make context information compatible with libunwind-arm.

In Linux/ARM, seh-unwind.cpp has been updating unw_cursor_t
to point another stack by updating the cursor's register
entries. However, that does not work in libunwind-arm in
Linux, which breaks PAL_VirtualUnwind() functions.
Getting the stack information from the cursor had
a compatibility issue as well.

This patch make both "context->cursor" and "cursor->context"
methods compatible with ARM/Linux.

Fix dotnet/coreclr#3312

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/5c0095268e19e5a5fcf035c4c591ed03e552f072

8 years agoFix ARM build regression
Ben Pye [Thu, 3 Mar 2016 15:16:33 +0000 (15:16 +0000)]
Fix ARM build regression

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

8 years agoFix GC holes for all AMD64 platforms (Windows and System V) and a bug for System...
Lubomir Litchev [Mon, 29 Feb 2016 06:43:16 +0000 (22:43 -0800)]
Fix GC holes for all AMD64 platforms (Windows and System V) and a bug for System V OSs in the codegen
for GS cookie comparison on amd64.

Fixes issue dotnet/coreclr#3382.

There is a bug in the genEmitGSCookieCheck method for amd64 having to do
with potentially trashing a second rgister (RDX) for a 2 register returned
struct.

It also sets the byref state for RAX, if needed. And GCRef and BrRef for
RDX, if needed.

Conflicts:
tests/src/JIT/Methodical/structs/systemvbringup/structrettest.cs

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

8 years agoMerge pull request dotnet/coreclr#3457 from RussKeldorph/Reenable
Russ Keldorph [Thu, 3 Mar 2016 01:50:22 +0000 (17:50 -0800)]
Merge pull request dotnet/coreclr#3457 from RussKeldorph/Reenable

Reenable tests after dotnet/coreclr#2728 workaround in place

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

8 years agoMerge pull request dotnet/coreclr#3284 from sejongoh/pull_down_coredistool
Sejong Oh [Thu, 3 Mar 2016 00:58:38 +0000 (16:58 -0800)]
Merge pull request dotnet/coreclr#3284 from sejongoh/pull_down_coredistool

Pulling down coredistool package for gcstress test

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

8 years agoMerge pull request dotnet/coreclr#3476 from mmitche/fix-triggers
Matt Mitchell [Thu, 3 Mar 2016 00:48:17 +0000 (16:48 -0800)]
Merge pull request dotnet/coreclr#3476 from mmitche/fix-triggers

Fix triggers

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

8 years agoMerge pull request dotnet/coreclr#3405 from dagood/new-cli
Davis Goodin [Thu, 3 Mar 2016 00:46:47 +0000 (18:46 -0600)]
Merge pull request dotnet/coreclr#3405 from dagood/new-cli

Upgrade dotnet CLI version, accumulated project.json changes

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

8 years agoFix triggers
Matt Mitchell [Thu, 3 Mar 2016 00:25:29 +0000 (16:25 -0800)]
Fix triggers

The github triggers were broken with two types of windows builds using the same context next.  One was the build only job that is just used to feed into the *Nix testing.  We don't need to launch these builds at all, since they are just used for internal testing.

See also dotnet/coreclr#3475

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

8 years agoMerge pull request dotnet/coreclr#1668 from Dmitry-Me/assignmentOpReturningUnsuitableType
Pat Gavlin [Thu, 3 Mar 2016 00:09:10 +0000 (16:09 -0800)]
Merge pull request dotnet/coreclr#1668 from Dmitry-Me/assignmentOpReturningUnsuitableType

Impossible implicit downcast in assignment operator

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

8 years agoMerge pull request dotnet/coreclr#3467 from sivarv/emitInsMovFix
Sivarv [Wed, 2 Mar 2016 23:45:05 +0000 (15:45 -0800)]
Merge pull request dotnet/coreclr#3467 from sivarv/emitInsMovFix

Fix to intermittent failure of jit test 200w1d-09_cpp_r.exe

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

8 years agoMerge pull request dotnet/coreclr#3471 from dotnet-bot/from-tfs
Jan Kotas [Wed, 2 Mar 2016 22:09:51 +0000 (14:09 -0800)]
Merge pull request dotnet/coreclr#3471 from dotnet-bot/from-tfs

Merge changes from TFS

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

8 years agoMerge pull request dotnet/coreclr#3466 from mikem8361/armfix
Mike McLaughlin [Wed, 2 Mar 2016 21:01:08 +0000 (13:01 -0800)]
Merge pull request dotnet/coreclr#3466 from mikem8361/armfix

Fixes issue dotnet/coreclr#3453 ARM build break.

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

8 years agoIntegrate GC changes from full framework
Maoni Stephens [Wed, 2 Mar 2016 20:23:49 +0000 (12:23 -0800)]
Integrate GC changes from full framework

[tfs-changeset: 1580785]

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