platform/upstream/dotnet/runtime.git
8 years agoFix warnings
Yi Zhang (CLR) [Mon, 2 May 2016 04:03:03 +0000 (21:03 -0700)]
Fix warnings

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

8 years agoMerge pull request dotnet/coreclr#3915 from hughbe/region-info-params
Jan Kotas [Tue, 19 Apr 2016 04:54:30 +0000 (21:54 -0700)]
Merge pull request dotnet/coreclr#3915 from hughbe/region-info-params

Add parameter names to RegionInfo constructor

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

8 years agoMerge pull request dotnet/coreclr#3535 from hughbe/patch-3
Jan Kotas [Tue, 19 Apr 2016 04:53:06 +0000 (21:53 -0700)]
Merge pull request dotnet/coreclr#3535 from hughbe/patch-3

Add parameter names to ArgumentExceptions in Guid

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

8 years agoMerge pull request dotnet/coreclr#4247 from leemgs/upstream-cross-toolchain-unify2
Jan Kotas [Tue, 19 Apr 2016 04:50:56 +0000 (21:50 -0700)]
Merge pull request dotnet/coreclr#4247 from leemgs/upstream-cross-toolchain-unify2

Linux/ARM: Unifying the redundant usages of objcopy

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

8 years agoMerge pull request dotnet/coreclr#4283 from krytarowski/netbsd-support-61
Jan Kotas [Tue, 19 Apr 2016 04:41:33 +0000 (21:41 -0700)]
Merge pull request dotnet/coreclr#4283 from krytarowski/netbsd-support-61

Implement GetEntrypointExecutableAbsolutePath() on NetBSD

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

8 years agoMerge pull request dotnet/coreclr#4371 from krytarowski/netbsd-support-65
Jan Kotas [Tue, 19 Apr 2016 04:38:47 +0000 (21:38 -0700)]
Merge pull request dotnet/coreclr#4371 from krytarowski/netbsd-support-65

Add NetBSD support in dir.props

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

8 years agoMerge pull request dotnet/coreclr#4348 from AndyAyersMS/FixPerfMapAV
Jan Kotas [Tue, 19 Apr 2016 04:38:14 +0000 (21:38 -0700)]
Merge pull request dotnet/coreclr#4348 from AndyAyersMS/FixPerfMapAV

Fix a segfault in perf map generation

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

8 years agoMerge pull request dotnet/coreclr#4373 from krytarowski/netbsd-support-67
Jan Kotas [Tue, 19 Apr 2016 04:37:40 +0000 (21:37 -0700)]
Merge pull request dotnet/coreclr#4373 from krytarowski/netbsd-support-67

NetBSD: Assume GNU GCC compatible va_list in Clang/LLVM

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

8 years agoMerge pull request dotnet/coreclr#4401 from dotnet-bot/from-tfs
Jan Kotas [Tue, 19 Apr 2016 04:33:44 +0000 (21:33 -0700)]
Merge pull request dotnet/coreclr#4401 from dotnet-bot/from-tfs

Merge changes from TFS

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

8 years agoMerge pull request dotnet/coreclr#4312 from mjsabby/muks/enable_rejit_xplat
noahfalk [Tue, 19 Apr 2016 01:40:33 +0000 (18:40 -0700)]
Merge pull request dotnet/coreclr#4312 from mjsabby/muks/enable_rejit_xplat

Enable ReJIT on all platforms

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

8 years agoMerge pull request dotnet/coreclr#4392 from kyulee1/fixround
Kyungwoo Lee [Tue, 19 Apr 2016 01:37:52 +0000 (18:37 -0700)]
Merge pull request dotnet/coreclr#4392 from kyulee1/fixround

ARM64: Fix Round Operation

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

8 years agoARM64: Fix Round Operation
Kyungwoo Lee [Mon, 18 Apr 2016 17:42:51 +0000 (10:42 -0700)]
ARM64: Fix Round Operation

Math.Round is implemented as a target intrinsic for Arm64.
JIT emitted `frinta` which rounds the ties to away.
As described in MSDN
https://msdn.microsoft.com/en-us/library/system.math.round(v=vs.110).aspx#Round2_Example,
we should round the ties to even.
So, I corrected `frintn` instruction instead for such intrinsic expansion.

I've also identified that `EvalMathFuncUnary` incorrectly folds the round
operation when the argument is constant at the compile time.
The logic itself is not the right semantic as described above in MSDN.
I made a separate helper function which is essentially a duplicate of
classlib. This is not Arm64 specific fix but applies to all other targets.
So, I just fixed it while I'm here.

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

8 years agoFix nidump to avoid crashing while working with Ready to Run images
John Chen [Mon, 18 Apr 2016 23:38:39 +0000 (16:38 -0700)]
Fix nidump to avoid crashing while working with Ready to Run images

[tfs-changeset: 1597064]

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

8 years agoMerge pull request dotnet/coreclr#4394 from gkhanna79/VCRTArm64Fix
Rahul Kumar [Mon, 18 Apr 2016 22:58:44 +0000 (15:58 -0700)]
Merge pull request dotnet/coreclr#4394 from gkhanna79/VCRTArm64Fix

Fix Arm64 break

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

8 years agoMerge pull request dotnet/coreclr#4391 from RussKeldorph/buildarch
Russ Keldorph [Mon, 18 Apr 2016 22:24:14 +0000 (15:24 -0700)]
Merge pull request dotnet/coreclr#4391 from RussKeldorph/buildarch

Build break: Replace $(Platform) with $(BuildArch) in arch-specific IL projects

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

8 years agoMerge pull request dotnet/coreclr#4390 from pgavlin/JitCleanup
Pat Gavlin [Mon, 18 Apr 2016 20:06:30 +0000 (13:06 -0700)]
Merge pull request dotnet/coreclr#4390 from pgavlin/JitCleanup

Cleanup some minor JIT issues.

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

8 years agoFix Arm64 break
Gaurav Khanna [Mon, 18 Apr 2016 19:49:49 +0000 (12:49 -0700)]
Fix Arm64 break

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

8 years agoMerge pull request dotnet/coreclr#4370 from krytarowski/netbsd-support-64
Aditya Mandaleeka [Mon, 18 Apr 2016 19:36:53 +0000 (12:36 -0700)]
Merge pull request dotnet/coreclr#4370 from krytarowski/netbsd-support-64

Print message about detected NetBSD

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

8 years agoMerge pull request dotnet/coreclr#4378 from krytarowski/netbsd-support-68
Aditya Mandaleeka [Mon, 18 Apr 2016 19:36:27 +0000 (12:36 -0700)]
Merge pull request dotnet/coreclr#4378 from krytarowski/netbsd-support-68

Implement GetProcessIdDisambiguationKey() for NetBSD

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

8 years agoMerge pull request dotnet/coreclr#4323 from BruceForstall/CLRABI
Bruce Forstall [Mon, 18 Apr 2016 18:07:38 +0000 (11:07 -0700)]
Merge pull request dotnet/coreclr#4323 from BruceForstall/CLRABI

Add CLR ABI document to Book of the Runtime

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

8 years agoAdd CLR ABI document to Book of the Runtime
Bruce Forstall [Wed, 13 Apr 2016 23:07:06 +0000 (16:07 -0700)]
Add CLR ABI document to Book of the Runtime

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

8 years agoReplace $(Platform) with $(BuildArch) in arch-specific IL projects
Russ Keldorph [Sat, 16 Apr 2016 15:03:50 +0000 (08:03 -0700)]
Replace $(Platform) with $(BuildArch) in arch-specific IL projects

I recently fixed some IL projects for non-x64 architectures, but I tested
the wrong property.  It appears that $(Platform) is set to AnyCpu, and
$(BuildArch) is what I want.

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

8 years agoStandardize on `assert` in the JIT.
Pat Gavlin [Mon, 11 Apr 2016 21:12:21 +0000 (14:12 -0700)]
Standardize on `assert` in the JIT.

A small amount of JIT code was using `_ASSERTE` instead of `assert`.
Change that code to use `assert` instead, which operates correctly
w.r.t. the JIT host.

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

8 years agoStanardize on `DEBUGARG` in the JIT.
Pat Gavlin [Mon, 11 Apr 2016 21:04:54 +0000 (14:04 -0700)]
Stanardize on `DEBUGARG` in the JIT.

The JIT uses both `DEBUGARG` (defined in jit.h) and `DEBUG_ARG`
(defined in /src/inc/check.h) for debug-only arguments. This
change replaces all uses of `DEBUG_ARG` with `DEBUGARG`.

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

8 years agoRemove uses of LP{,C}UTF8 in the JIT.
Pat Gavlin [Thu, 31 Mar 2016 19:44:53 +0000 (12:44 -0700)]
Remove uses of LP{,C}UTF8 in the JIT.

Replace these with the corresponding `char*` type.

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

8 years agoMerge pull request dotnet/coreclr#4381 from gkhanna79/VCRTFix
Gaurav Khanna [Mon, 18 Apr 2016 17:27:55 +0000 (10:27 -0700)]
Merge pull request dotnet/coreclr#4381 from gkhanna79/VCRTFix

Cleanup VCRuntime140.dll dependency from native components

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

8 years agoMerge pull request dotnet/coreclr#3807 from CarolEidt/FirstClassStructsDoc
Carol Eidt [Mon, 18 Apr 2016 17:09:44 +0000 (10:09 -0700)]
Merge pull request dotnet/coreclr#3807 from CarolEidt/FirstClassStructsDoc

Design document for first-class structs

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

8 years agoMerge pull request dotnet/coreclr#4375 from AndyAyersMS/UseBudget
Andy Ayers [Mon, 18 Apr 2016 16:29:59 +0000 (09:29 -0700)]
Merge pull request dotnet/coreclr#4375 from AndyAyersMS/UseBudget

Inliner: use time budget to avoid excessive inlining

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

8 years agoMerge pull request dotnet/coreclr#4376 from pgavlin/GcInfoRemoveUtilcode
Pat Gavlin [Mon, 18 Apr 2016 16:02:17 +0000 (09:02 -0700)]
Merge pull request dotnet/coreclr#4376 from pgavlin/GcInfoRemoveUtilcode

Stop including utilcode.h in the GC info encoder.

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

8 years agoImplement GetProcessIdDisambiguationKey() for NetBSD
Kamil Rytarowski [Sat, 16 Apr 2016 00:22:23 +0000 (02:22 +0200)]
Implement GetProcessIdDisambiguationKey() for NetBSD

Make use of the kvm(3) interface to get "struct kinfo_proc2" of the given
process.

struct kinfo_proc2 {
///....
        uint32_t p_ustart_sec;          /* STRUCT TIMEVAL: starting time. */
        uint32_t p_ustart_usec;         /* STRUCT TIMEVAL: starting time. */
///...
};

  --- /usr/include/sys/sysctl.h

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

8 years agoCleanup VCRuntime140.dll dependency from native components
Gaurav Khanna [Sat, 16 Apr 2016 17:15:08 +0000 (10:15 -0700)]
Cleanup VCRuntime140.dll dependency from native components

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

8 years agoMerge pull request dotnet/coreclr#4360 from kyulee1/fixpsp
Kyungwoo Lee [Sat, 16 Apr 2016 17:05:36 +0000 (10:05 -0700)]
Merge pull request dotnet/coreclr#4360 from kyulee1/fixpsp

ARM64: Fix Storing PSPSym for localloc

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

8 years agoARM64: Fix Storing PSPSym for localloc
Kyungwoo Lee [Fri, 15 Apr 2016 15:45:34 +0000 (08:45 -0700)]
ARM64: Fix Storing PSPSym for localloc

JIT incorrectly saves/restores PSPSym causing AVs in EH tests that have localloc with filter.
The fix is to use a right opcode (Load instead of Store) when saving PSPSym.

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

8 years agoMerge pull request dotnet/coreclr#4357 from krytarowski/netbsd-support-63
Jan Vorlicek [Sat, 16 Apr 2016 01:05:14 +0000 (03:05 +0200)]
Merge pull request dotnet/coreclr#4357 from krytarowski/netbsd-support-63

NetBSD: Add support for PAL_IsDebuggerPresent()

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

8 years agoMerge pull request dotnet/coreclr#4346 from LLITCHEV/Issue4276
Lubomir Litchev [Sat, 16 Apr 2016 00:01:40 +0000 (17:01 -0700)]
Merge pull request dotnet/coreclr#4346 from LLITCHEV/Issue4276

Set the lvIsMultiRegArgOrRet for a variable containing the result of in-lined multi-register return call.

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

8 years agoMerge pull request dotnet/coreclr#4369 from mikedn/msgbox
Jan Kotas [Fri, 15 Apr 2016 23:58:36 +0000 (16:58 -0700)]
Merge pull request dotnet/coreclr#4369 from mikedn/msgbox

Always try to load user32 instead of ntuser api set

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

8 years agoFix a segfault in perf map generation
Andy Ayers [Fri, 15 Apr 2016 01:49:25 +0000 (18:49 -0700)]
Fix a segfault in perf map generation

Make sure instance vars get initialized to nullptr.

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

8 years agoNetBSD: Assume GNU GCC compatible va_list in Clang/LLVM
Kamil Rytarowski [Fri, 15 Apr 2016 21:40:59 +0000 (23:40 +0200)]
NetBSD: Assume GNU GCC compatible va_list in Clang/LLVM

Retire unneeded __GNUC_VA_LIST as currently all platforms build with Clang.

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

8 years agoMerge pull request dotnet/coreclr#4342 from ZhichengZhu/clrstackr
Jan Vorlicek [Fri, 15 Apr 2016 23:20:33 +0000 (01:20 +0200)]
Merge pull request dotnet/coreclr#4342 from ZhichengZhu/clrstackr

add sos clrstack -r option

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

8 years agoMerge pull request dotnet/coreclr#4368 from swgillespie/long-running-gc-fixes
Sean Gillespie [Fri, 15 Apr 2016 23:19:52 +0000 (16:19 -0700)]
Merge pull request dotnet/coreclr#4368 from swgillespie/long-running-gc-fixes

Fix a difference in passing the sequential parameter between Bash and…

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

8 years agoStop including utilcode.h in the GC info encoder.
Pat Gavlin [Fri, 15 Apr 2016 22:35:33 +0000 (15:35 -0700)]
Stop including utilcode.h in the GC info encoder.

This required two other minor changes:
- A prototype for `ThrowOutOfMemory` is now defined in gcinfoencoder.h
- `BitArray` now defines an overload of `operator new` that accepts an
  `IAllocator`.

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

8 years agoMerge pull request dotnet/coreclr#4372 from krytarowski/netbsd-support-66
Aditya Mandaleeka [Fri, 15 Apr 2016 22:45:07 +0000 (15:45 -0700)]
Merge pull request dotnet/coreclr#4372 from krytarowski/netbsd-support-66

NetBSD has RAND_MAX = 0x7fffffff

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

8 years agoThe RAND_MAX value can vary by platform
Kamil Rytarowski [Fri, 15 Apr 2016 21:17:38 +0000 (23:17 +0200)]
The RAND_MAX value can vary by platform

Noted on NetBSD where it is 0x7FFFFFFF.

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

8 years agoInliner: use time budget to avoid excessive inlining
Andy Ayers [Fri, 15 Apr 2016 18:24:25 +0000 (11:24 -0700)]
Inliner: use time budget to avoid excessive inlining

Use the time budget and time estimates to stop inlining once the
overall jit time increase estimate for the method is 10x the initial
jit time estimate.

This is implemented as part of `LegacyPolicy` and so can impact
the current inline behavior.

The budget is intentionally set quite high so that it only kicks in
for very rare cases where the call tree below the root is deep and wide
with many small methods. In extended testing on desktop this limit
fires in exactly two cases, both HFA tests.

In CoreCLR tests 12 of the HFA tests hit this limit. I've added
a directed test case here that came from the original bug report.

Closes dotnet/coreclr#2472.

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

8 years agoNetBSD: Add support for PAL_IsDebuggerPresent()
Kamil Rytarowski [Fri, 15 Apr 2016 11:23:31 +0000 (13:23 +0200)]
NetBSD: Add support for PAL_IsDebuggerPresent()

Reuse the kvm(3) interface to grab "struct kinfo_proc".

NAME
     kvm - kernel memory interface

LIBRARY
     Kernel Data Access Library (libkvm, -lkvm)

DESCRIPTION
     The kvm library provides a uniform interface for accessing kernel virtual
     memory images, including live systems and crash dumps.  Access to live
     systems is via /dev/mem while crash dumps can be examined via the core
     file generated by savecore(8).  The interface behaves identically in both
     cases.  Memory can be read and written, kernel symbol addresses can be
     looked up efficiently, and information about user processes can be
     gathered.

     kvm_open() is first called to obtain a descriptor for all subsequent
     calls

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

8 years agoMerge pull request dotnet/coreclr#4347 from ramarag/zapnyi
Rama krishnan Raghupathy [Fri, 15 Apr 2016 21:52:11 +0000 (14:52 -0700)]
Merge pull request dotnet/coreclr#4347 from ramarag/zapnyi

Removing NYI for ZapUnwindData

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

8 years agoAlways try to load user32 instead of ntuser api set
Mike Danes [Fri, 15 Apr 2016 20:53:31 +0000 (23:53 +0300)]
Always try to load user32 instead of ntuser api set

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

8 years agoMerge pull request dotnet/coreclr#4140 from myungjoo/implement/4040
Jan Vorlicek [Fri, 15 Apr 2016 21:33:39 +0000 (23:33 +0200)]
Merge pull request dotnet/coreclr#4140 from myungjoo/implement/4040

Implement StartUnwindingNativeFrames Linux/ARM

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

8 years agoMerge pull request dotnet/coreclr#3240 from krytarowski/netbsd-support-50
Jan Kotas [Fri, 15 Apr 2016 21:18:17 +0000 (14:18 -0700)]
Merge pull request dotnet/coreclr#3240 from krytarowski/netbsd-support-50

Fix issue unveiled on NetBSD: Add PAL__vsnprintf shadow in PAL

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

8 years agoAdd NetBSD support in dir.props
Kamil Rytarowski [Fri, 15 Apr 2016 21:14:39 +0000 (23:14 +0200)]
Add NetBSD support in dir.props

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

8 years agoPrint message about detected NetBSD
Kamil Rytarowski [Fri, 15 Apr 2016 21:01:26 +0000 (23:01 +0200)]
Print message about detected NetBSD

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

8 years agoSet the lvIsMultiRegArgOrRet for a variable containing the result of
Lubomir Litchev [Thu, 14 Apr 2016 22:36:25 +0000 (15:36 -0700)]
Set the lvIsMultiRegArgOrRet for a variable containing the result of
inlined multi-register return call.

This change makes sure the lvIsMultiRegArgOrRet on a variable used to
store the result of inlined multi-register return function is set.
The way the code works today, this is not an issue since the code in
fgAttachStructInlineeToAsg always uses a CopyObj/Blk to asign the return
value from the registers to the var on stack. The CopyBlock/Obj gets the
address of the variable making it address-exposed and that prevents struct
promotion.
In the future (when CopyObj/Blk is not used) not having
lvIsMultiRegArgOrRet set could cause a problem.

Fixes issue 4276.

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

8 years agoFix a difference in passing the sequential parameter between Bash and Batch
Sean Gillespie [Fri, 15 Apr 2016 20:44:12 +0000 (13:44 -0700)]
Fix a difference in passing the sequential parameter between Bash and Batch

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

8 years agoadd clrstack -r option
Zhicheng Zhu [Thu, 14 Apr 2016 21:42:23 +0000 (14:42 -0700)]
add clrstack -r option

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

8 years agoMerge pull request dotnet/coreclr#4359 from gkhanna79/ROLibFix2
Gaurav Khanna [Fri, 15 Apr 2016 19:35:57 +0000 (12:35 -0700)]
Merge pull request dotnet/coreclr#4359 from gkhanna79/ROLibFix2

DelayLoadAndFixWinRTInterop

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

8 years agoMerge pull request dotnet/coreclr#4361 from joperezr/AddServiceableAttribute
Jose Perez Rodriguez [Fri, 15 Apr 2016 18:05:40 +0000 (11:05 -0700)]
Merge pull request dotnet/coreclr#4361 from joperezr/AddServiceableAttribute

Adding Serviceable attribute to mscorlib

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

8 years agoMerge pull request dotnet/coreclr#4352 from kouvel/ArmAssertFix
Koundinya Veluri [Fri, 15 Apr 2016 17:12:07 +0000 (10:12 -0700)]
Merge pull request dotnet/coreclr#4352 from kouvel/ArmAssertFix

Fix assertion failure on ARM

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

8 years agoMerge pull request dotnet/coreclr#4338 from pgavlin/AddJit32Build
Pat Gavlin [Fri, 15 Apr 2016 16:55:56 +0000 (09:55 -0700)]
Merge pull request dotnet/coreclr#4338 from pgavlin/AddJit32Build

Make it possible to build JIT32 in the OSS tree.

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

8 years agoMerge pull request dotnet/coreclr#4363 from mmitche/update-corefx-paths
Matt Mitchell [Fri, 15 Apr 2016 16:20:25 +0000 (09:20 -0700)]
Merge pull request dotnet/coreclr#4363 from mmitche/update-corefx-paths

Update the corefx copy steps to point to the new location

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

8 years agoUpdate the corefx copy steps to point to the new location
Matt Mitchell [Fri, 15 Apr 2016 16:09:41 +0000 (09:09 -0700)]
Update the corefx copy steps to point to the new location

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

8 years agoAdding Serviceable attribute to mscorlib
Jose Perez Rodriguez [Fri, 15 Apr 2016 15:52:51 +0000 (08:52 -0700)]
Adding Serviceable attribute to mscorlib

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

8 years agoDelayLoadAndFixWinRTInterop
Gaurav Khanna [Fri, 15 Apr 2016 14:26:17 +0000 (07:26 -0700)]
DelayLoadAndFixWinRTInterop

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

8 years agoMerge pull request dotnet/coreclr#4355 from dotnet-bot/from-tfs
Jan Kotas [Fri, 15 Apr 2016 12:48:39 +0000 (05:48 -0700)]
Merge pull request dotnet/coreclr#4355 from dotnet-bot/from-tfs

Merge changes from TFS

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

8 years agoImplement StartUnwindingNativeFrames Linux/ARM
MyungJoo Ham [Tue, 5 Apr 2016 02:25:36 +0000 (11:25 +0900)]
Implement StartUnwindingNativeFrames Linux/ARM

StartUnwindingNativeFrames for Unix/Linux ARM.
The code is ported from AMD64 code of the same function and OS.

CONTEXT_* are moved from context2.S to asmconstants.h so that
the same macros may be sharaed between multiple files.

Fix dotnet/coreclr#4040

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

8 years agoMerge pull request dotnet/coreclr#4260 from myungjoo/fix/4259
Jan Vorlicek [Fri, 15 Apr 2016 09:47:04 +0000 (11:47 +0200)]
Merge pull request dotnet/coreclr#4260 from myungjoo/fix/4259

ARM: fix build warning for unw usage

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

8 years agoFix assertion failure on ARM
Koundinya Veluri [Fri, 15 Apr 2016 02:52:55 +0000 (19:52 -0700)]
Fix assertion failure on ARM

StompWriteBarrierEphemeral may be called on the init path, where the runtime is technically not suspended, but has not started yet. Added a check for g_fEEInit in the call.

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

8 years agoMerge pull request dotnet/coreclr#4340 from jkotas/equality-comparer
Jan Kotas [Fri, 15 Apr 2016 05:41:24 +0000 (22:41 -0700)]
Merge pull request dotnet/coreclr#4340 from jkotas/equality-comparer

Use beforefieldinit field for Comparer/EqualityComparer.Default

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

8 years agoMerge pull request dotnet/coreclr#4353 from myungjoo/fix/4107
Jan Kotas [Fri, 15 Apr 2016 05:37:00 +0000 (22:37 -0700)]
Merge pull request dotnet/coreclr#4353 from myungjoo/fix/4107

ARM/Linux: Mark r0-r3 Saved

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

8 years agoARM/Linux: Mark r0-r3 Saved
MyungJoo Ham [Fri, 15 Apr 2016 04:28:29 +0000 (13:28 +0900)]
ARM/Linux: Mark r0-r3 Saved

Without this, exception handlers (try-catch) that
try to get SP of ThePreStub's caller (managed frame) mislocate
the caller's SP by 4 words (0x10) and get lost while
traversing managed frames.

Fix dotnet/coreclr#4107

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

8 years agoMerge pull request dotnet/coreclr#4343 from pgavlin/SeparateBitPosition
Pat Gavlin [Fri, 15 Apr 2016 04:04:33 +0000 (21:04 -0700)]
Merge pull request dotnet/coreclr#4343 from pgavlin/SeparateBitPosition

Move `BitPosition` into its own file.

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

8 years agoFix razzle build breaks in bcl.win
Jan Kotas [Fri, 15 Apr 2016 01:46:52 +0000 (18:46 -0700)]
Fix razzle build breaks in bcl.win

[tfs-changeset: 1596379]

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

8 years agoStyle fix: remove obsolete contents
MyungJoo Ham [Fri, 15 Apr 2016 01:00:40 +0000 (10:00 +0900)]
Style fix: remove obsolete contents

We no longer have StartUnwindingNativeFrames.

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

8 years agoUse beforefieldinit field for Comparer/EqualityComparer.Default
Jan Kotas [Thu, 14 Apr 2016 21:35:35 +0000 (14:35 -0700)]
Use beforefieldinit field for Comparer/EqualityComparer.Default

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

8 years agoMerge pull request dotnet/coreclr#4326 from dotnet-bot/from-tfs
Matt Ellis [Thu, 14 Apr 2016 22:59:13 +0000 (15:59 -0700)]
Merge pull request dotnet/coreclr#4326 from dotnet-bot/from-tfs

Merge changes from TFS

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

8 years agoMerge pull request dotnet/coreclr#4335 from AndyAyersMS/InlineStrategy
Andy Ayers [Thu, 14 Apr 2016 22:57:39 +0000 (15:57 -0700)]
Merge pull request dotnet/coreclr#4335 from AndyAyersMS/InlineStrategy

Inliner: introducing InlineStrategy

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

8 years agoRemoving NYI for ZapUnwindData
Rama Krishnan Raghupathy [Wed, 6 Apr 2016 22:36:42 +0000 (15:36 -0700)]
Removing NYI for ZapUnwindData

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

8 years agoMake it possible to build JIT32 in the OSS tree.
Pat Gavlin [Thu, 14 Apr 2016 19:57:41 +0000 (12:57 -0700)]
Make it possible to build JIT32 in the OSS tree.

This change adds a new argument to build.cmd, buildjit32, that configures
the build to build and link JIT32 instead of RyuJIT if the sources are
available in `src/jit32`.

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

8 years agoMerge pull request dotnet/coreclr#4339 from fadimounir/deltests
Fadi Hanna [Thu, 14 Apr 2016 21:18:21 +0000 (14:18 -0700)]
Merge pull request dotnet/coreclr#4339 from fadimounir/deltests

Delete fragile tests (will fix tests in a later PR)

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

8 years agoDelete fragile tests (will fix tests in a later PR)
Fadi Hanna [Thu, 14 Apr 2016 21:14:52 +0000 (14:14 -0700)]
Delete fragile tests (will fix tests in a later PR)

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

8 years agoMove `BitPosition` into its own file.
Pat Gavlin [Mon, 11 Apr 2016 17:24:23 +0000 (10:24 -0700)]
Move `BitPosition` into its own file.

This will allow the GC info encoder and the JIT to use this
function without pulling in the entire utilcode header.

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

8 years agoInliner: introducing InlineStrategy
Andy Ayers [Tue, 12 Apr 2016 20:30:07 +0000 (13:30 -0700)]
Inliner: introducing InlineStrategy

Create the `InlineStrategy` class to hold inline-relevant data that
spans multiple inlines. It tracks the number of inline candidates,
attempts, successes, last successful policy, and holds onto the root
context, and so on. The strategy is responsible for creating contexts
and reporting overall results for a method (either tree-based or
data-based).

The strategy also includes a simple jit time estimate. From various
observations, post-inline jit time can be modelled acceptably by simple
linear relationships on the input IL size. The strategy uses these models
to estimate the initial and current jit time. Estimate units are roughly
microseconds.

The strategy creates a time budget to flag cases where the estimated
jit time increase due to inlining is unreasonbly large. The budget
is initially based on the root method size, and may increase if there
are non-discretionary force inlines.

Once we have a bit more vetting of the budgeting mechanism, policies
will use it to limit inlining in a small number of runaway inlining cases
(see for example dotnet/coreclr#2472).

Remove code under MEASURE_INLINING since the strategy plus the context
tree (optionally extended via policies) contains all that data and more.
Likewise, consolidate a number of the compiler's inlining-related member
variables into the strategy.

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

8 years agoMerge pull request dotnet/coreclr#4330 from janvorli/fix-sigsegv-deadlock
Jan Vorlicek [Thu, 14 Apr 2016 20:36:08 +0000 (22:36 +0200)]
Merge pull request dotnet/coreclr#4330 from janvorli/fix-sigsegv-deadlock

Fix possibility of deadlock in the SIGSEGV handler

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

8 years agoFix full framework build break
Jan Kotas [Thu, 14 Apr 2016 19:59:17 +0000 (12:59 -0700)]
Fix full framework build break

[tfs-changeset: 1596259]

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

8 years agoMerge pull request dotnet/coreclr#4322 from pgavlin/TlsLogEnv
Pat Gavlin [Thu, 14 Apr 2016 19:57:01 +0000 (12:57 -0700)]
Merge pull request dotnet/coreclr#4322 from pgavlin/TlsLogEnv

Collect the JIT's TLS variables in a single type.

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

8 years agoMerge pull request dotnet/coreclr#4314 from pgavlin/GcInfoSList
Pat Gavlin [Thu, 14 Apr 2016 17:58:36 +0000 (10:58 -0700)]
Merge pull request dotnet/coreclr#4314 from pgavlin/GcInfoSList

Replace `SList` in the GC info encoders.

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

8 years agoFix potential deadlock when calling ExecutionManager::IsManagedCode
Jan Vorlicek [Thu, 14 Apr 2016 17:44:56 +0000 (19:44 +0200)]
Fix potential deadlock when calling ExecutionManager::IsManagedCode

The function can deadlock if the calling thread was holding the
ExecutionManager writer lock.

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

8 years agoMerge pull request dotnet/coreclr#4308 from joperezr/RemoveWarnings
Jose Perez Rodriguez [Thu, 14 Apr 2016 17:44:29 +0000 (10:44 -0700)]
Merge pull request dotnet/coreclr#4308 from joperezr/RemoveWarnings

Remove native build warnings

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

8 years agoUpdating BuildTools
Jose Perez Rodriguez [Tue, 12 Apr 2016 22:56:08 +0000 (15:56 -0700)]
Updating BuildTools

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

8 years agoMerge pull request dotnet/coreclr#4327 from RussKeldorph/structinregs
Russ Keldorph [Thu, 14 Apr 2016 14:10:24 +0000 (07:10 -0700)]
Merge pull request dotnet/coreclr#4327 from RussKeldorph/structinregs

Fix structinregs test on x86

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

8 years agoFix possibility of deadlock in the SIGSEGV handler
Jan Vorlicek [Wed, 6 Apr 2016 18:41:51 +0000 (20:41 +0200)]
Fix possibility of deadlock in the SIGSEGV handler

The SIGSEGV handler was transitively calling pthread_attr_get_np to
get current stack limit no matter where the exception happened. The
problem was that if the segmentation violation happened in a C
runtime function, this could lead to deadlock since pthread_attr_get_np
is not signal safe.

The fix is to add callback that will figure out if the failing instruction
was in managed code or in one of the jit helpers and if not, it would
not attempt to handle the signal.

I have also removed non signal safe calls from the signal handlers code
path where we don't know yet whether the interrupted code was in a function
that could collide with a function that we call from the signal handler
or not. This includes TRACE and ASSERT calls that were calling string
formatting functions.

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

8 years agoFix structinregs test on x86
Russ Keldorph [Thu, 14 Apr 2016 04:45:05 +0000 (21:45 -0700)]
Fix structinregs test on x86

Fix a typo in _MSC_VER resulting in a mismatched calling convention on
x86.  While I'm in here, I'm also fixing some benign mismatched function
pointer type definitions.

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

8 years agoAdd back Path APIs needed by UWP
Jan Kotas [Thu, 14 Apr 2016 03:54:21 +0000 (20:54 -0700)]
Add back Path APIs needed by UWP

[tfs-changeset: 1596013]

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

8 years agoMerge pull request dotnet/coreclr#4297 from tijoytom/master
tijoytom [Wed, 13 Apr 2016 23:43:51 +0000 (16:43 -0700)]
Merge pull request dotnet/coreclr#4297 from tijoytom/master

Disabling the failing struct by value scenario.

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

8 years agoCollect the JIT's TLS variables in a single type.
Pat Gavlin [Wed, 13 Apr 2016 23:06:18 +0000 (16:06 -0700)]
Collect the JIT's TLS variables in a single type.

Instead of storing pointers to the thread-local compiler instance
and the current logging environment in separate TLS slots, wrap
these values in a struct and store a pointer to the struct in a
single TLS slot. This simplifies and standardizes the JIT's interface
to its TLS storage, especially when it is being statically linked
into another program or library that cannot use standard TLS.

Note that for release builds, the logging environment is not used
and a pointer to the current compiler instance is stored directly
into the JIT's TLS slot as an implementation detail of the TLS
wrapper type.

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

8 years agoMerge pull request dotnet/coreclr#4320 from mmitche/add-reporting
Matt Mitchell [Wed, 13 Apr 2016 22:47:40 +0000 (15:47 -0700)]
Merge pull request dotnet/coreclr#4320 from mmitche/add-reporting

Add reporting functionality to the coreclr netci file

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

8 years agoAdd reporting functionality to the coreclr netci file
Matt Mitchell [Wed, 13 Apr 2016 22:20:21 +0000 (15:20 -0700)]
Add reporting functionality to the coreclr netci file

Also eliminate a few jobs that aren't being referenced.

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

8 years agoMerge pull request dotnet/coreclr#4319 from mmitche/archive-needed
Matt Mitchell [Wed, 13 Apr 2016 22:24:25 +0000 (15:24 -0700)]
Merge pull request dotnet/coreclr#4319 from mmitche/archive-needed

Only archive dylib and .so files from the native coreclr tests

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

8 years agoOnly archive dylib and .so files from the native coreclr tests
Matt Mitchell [Wed, 13 Apr 2016 22:22:45 +0000 (15:22 -0700)]
Only archive dylib and .so files from the native coreclr tests

Avoids a few hundred extra files

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

8 years agoDisabling the failing struct by value scenario.
Tijoy Tom Kalathiparambil [Tue, 12 Apr 2016 18:32:23 +0000 (11:32 -0700)]
Disabling the failing struct by value scenario.

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

8 years agoMerge pull request dotnet/coreclr#4068 from Lucrecious/master
Brian Robbins [Wed, 13 Apr 2016 21:15:14 +0000 (14:15 -0700)]
Merge pull request dotnet/coreclr#4068 from Lucrecious/master

Generate map files for symbol resolution for Linux native images on PerfView

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