platform/upstream/coreclr.git
7 years agoFix for StackOverflow in SsaBuilder::TopologicalSort.
Eugene Rozenfeld [Wed, 14 Sep 2016 19:41:47 +0000 (12:41 -0700)]
Fix for StackOverflow in SsaBuilder::TopologicalSort.

SsaBuilder::TopologicalSort allocated an array of bools on the stack.
In one of internal cases the array had 126,758 elements, which caused a
StackOverflow. This change switches SsaBuilder::TopologicalSort from
stack-allocated array of bools to BitVec.

TopologicalSortHelper used to be recursive. It was changed to use an iterative
algorithm in a previous change. I'm inlining TopologicalSortHelper into
TopologicalSort now.

I verified no measurable negative throughput impact from this change
and no asm diffs in SuperPMI.

7 years agoMerge pull request #7148 from BruceForstall/Fix7127
Bruce Forstall [Mon, 12 Sep 2016 22:36:29 +0000 (15:36 -0700)]
Merge pull request #7148 from BruceForstall/Fix7127

Restrict x86 legacy JIT struct promotion

7 years agoMerge pull request #7133 from mikedn/x86-cast-long-float
Pat Gavlin [Mon, 12 Sep 2016 22:28:26 +0000 (15:28 -0700)]
Merge pull request #7133 from mikedn/x86-cast-long-float

Implement long to float cast for x86

7 years agoMerge pull request #7102 from vancem/ETWGCDumpFix.9-7-16
Vance Morrison [Mon, 12 Sep 2016 22:16:59 +0000 (15:16 -0700)]
Merge pull request #7102 from vancem/ETWGCDumpFix.9-7-16

Fix Issue dumping GC heap with ETW more than once

7 years agoRestrict x86 legacy JIT struct promotion
Bruce Forstall [Mon, 12 Sep 2016 21:19:12 +0000 (14:19 -0700)]
Restrict x86 legacy JIT struct promotion

Don't allow struct promotion for custom layout structs. RyuJIT started
supporting this, but the legacy x86 JIT doesn't properly push such promoted
structs as arguments for calls.

Fixes the assert in #7127, but the test fails with a crash in a later test case.

7 years agoMerge pull request #7136 from benaadams/enviro
Jan Kotas [Mon, 12 Sep 2016 20:39:11 +0000 (13:39 -0700)]
Merge pull request #7136 from benaadams/enviro

Updated formatted GetResourceString code reduction

7 years agoMerge pull request #7142 from joperezr/FillOutMissingStringMembers
Jose Perez Rodriguez [Mon, 12 Sep 2016 18:42:46 +0000 (11:42 -0700)]
Merge pull request #7142 from joperezr/FillOutMissingStringMembers

Adding missing String members to coreclr

7 years agoMerge pull request #6791 from dagood/upgrade-xunit-runner
Davis Goodin [Mon, 12 Sep 2016 18:15:48 +0000 (13:15 -0500)]
Merge pull request #6791 from dagood/upgrade-xunit-runner

Upgrade xunit runner to 2.2.0-beta2-build3300

7 years agoRemoving one String member to avoid depending on ArgIterator
Jose Perez Rodriguez [Mon, 12 Sep 2016 17:10:22 +0000 (10:10 -0700)]
Removing one String member to avoid depending on ArgIterator

7 years agoAdding missing String members to coreclr
Jose Perez Rodriguez [Mon, 12 Sep 2016 16:44:39 +0000 (09:44 -0700)]
Adding missing String members to coreclr

7 years agoImplement long to float cast for x86
Mike Danes [Sun, 11 Sep 2016 12:49:12 +0000 (15:49 +0300)]
Implement long to float cast for x86

Convert long to float/double casts to helper calls. Despite the call this version is 2x faster than JIT32's FILD implementation which suffers a significant store forwarding stall penalty.

7 years agoFix Environment no-inlining for mscorlib
Ben Adams [Sun, 11 Sep 2016 21:26:19 +0000 (22:26 +0100)]
Fix Environment no-inlining for mscorlib

7 years agoReduce code bloat around formatted GetResourceString calls
James Ko [Wed, 31 Aug 2016 15:12:13 +0000 (11:12 -0400)]
Reduce code bloat around formatted GetResourceString calls

7 years agoMerge pull request #7067 from pkukol/timing_bit_rot
Peter Kukol [Sat, 10 Sep 2016 00:27:19 +0000 (18:27 -0600)]
Merge pull request #7067 from pkukol/timing_bit_rot

Fix some timing code bit rot, plus minor cleanup.

7 years agoMerge pull request #7125 from pgavlin/ModelAssignByRefKillSet
Pat Gavlin [Fri, 9 Sep 2016 23:22:07 +0000 (16:22 -0700)]
Merge pull request #7125 from pgavlin/ModelAssignByRefKillSet

Model the kill set for ASSIGN_BYREF and stop generating movsq on x86.

7 years agoMerge pull request #7122 from BruceForstall/Fix7092
Bruce Forstall [Fri, 9 Sep 2016 22:02:29 +0000 (15:02 -0700)]
Merge pull request #7122 from BruceForstall/Fix7092

Fix #7092

7 years agoMerge pull request #7120 from BruceForstall/Fix7093
Bruce Forstall [Fri, 9 Sep 2016 21:59:09 +0000 (14:59 -0700)]
Merge pull request #7120 from BruceForstall/Fix7093

Fix #7093

7 years agoMerge pull request #7114 from BruceForstall/Fix7100
Bruce Forstall [Fri, 9 Sep 2016 21:58:08 +0000 (14:58 -0700)]
Merge pull request #7114 from BruceForstall/Fix7100

Fix #7100

7 years agoFix #7092
Bruce Forstall [Fri, 9 Sep 2016 17:47:45 +0000 (10:47 -0700)]
Fix #7092

The problem is genCodeForInitBlkUnroll() is trying to generate:
```
mov byte ptr [edi], si
```
which is not legal: ebp/esi/edi/esp don't have byte register versions on x86.

This change requires the source register to be an x86 byteable register in
this case.
Note that legacy JIT generates stosb for this test.

7 years agoDo not use movsq on x86.
Pat Gavlin [Fri, 9 Sep 2016 19:26:44 +0000 (12:26 -0700)]
Do not use movsq on x86.

This instruction is only available when targeting amd64.

7 years agoModel the kill set for ASSIGN_BYREF on x86.
Pat Gavlin [Fri, 9 Sep 2016 18:04:19 +0000 (11:04 -0700)]
Model the kill set for ASSIGN_BYREF on x86.

This helper kills esi, edi, and ecx.

7 years agoMerge pull request #7111 from sivarv/jitstressregs2Fix
Sivarv [Fri, 9 Sep 2016 17:16:16 +0000 (10:16 -0700)]
Merge pull request #7111 from sivarv/jitstressregs2Fix

Fix to #7087 - x86 RyuJIT JitstressRegs=2 assert failure

7 years agoMerge pull request #7108 from kyulee1/igmeta
Kyungwoo Lee [Fri, 9 Sep 2016 16:32:39 +0000 (10:32 -0600)]
Merge pull request #7108 from kyulee1/igmeta

ILDAMS: Ignore Metadata flag for CoreCLR

7 years agoMerge pull request #7121 from swgillespie/request-build-break
Sean Gillespie [Fri, 9 Sep 2016 16:32:24 +0000 (09:32 -0700)]
Merge pull request #7121 from swgillespie/request-build-break

Only reference IGCHeap::gcHeapType when FEATURE_SVR_GC is defined

7 years agoOnly reference IGCHeap::gcHeapType when FEATURE_SVR_GC is defined
Sean Gillespie [Fri, 9 Sep 2016 13:53:48 +0000 (06:53 -0700)]
Only reference IGCHeap::gcHeapType when FEATURE_SVR_GC is defined

7 years agoFix enregistered max size constants on Unix AMD64 (#7117)
Jan Vorlicek [Fri, 9 Sep 2016 08:57:45 +0000 (10:57 +0200)]
Fix enregistered max size constants on Unix AMD64 (#7117)

This change fixes ENREGISTERED_PARAMTYPE_MAXSIZE and ENREGISTERED_RETURNTYPE_INTEGER_MAXSIZE
constants that were not updated properly for the Unix AMD64 ABI. The values are used
for Unix/AMD64 for marshalling and typedbyref parameters and our tests probably don't
execute those code paths with structs larger than 8 bytes.

7 years agoMerge pull request #7118 from dotnet/revert-6889-StaticField
Jan Kotas [Fri, 9 Sep 2016 02:35:16 +0000 (19:35 -0700)]
Merge pull request #7118 from dotnet/revert-6889-StaticField

Revert "Fix IMGREL32 static field addr value-num blindspot"

7 years agoFix #7093
Bruce Forstall [Fri, 9 Sep 2016 01:09:34 +0000 (18:09 -0700)]
Fix #7093

This is an assert due to how STRESS_64RSLT_MUL is implemented. This
stress mode converts:
```
/--*  lclVar    int    V01 loc0
*  *         int
\--*  lclVar    int    V01 loc0
```
to:
```
*  cast      int <- long
|  /--*  cast      long <- int
|  |  \--*  lclVar    int    V01 loc0
\--*  *         long
   \--*  cast      long <- long
      \--*  nop       long
         \--*  lclVar    int    V01 loc0
```
Thus, the long 'nop' node is above an 'int' operand node. This led to an assert
in genCodeForTreeLng() that the lclVar was type long, which is isn't.

I added yet another cast under the 'nop' to fix this typing problem:
```
*  cast      int <- long
|  /--*  cast      long <- int
|  |  \--*  lclVar    int    V01 loc0
\--*  *         long
   \--*  cast      long <- long
      \--*  nop       long
         \--*  cast      long <- int
            \--*  lclVar    int    V01 loc0
```

7 years agoRevert "Fix IMGREL32 static field addr value-num blindspot"
Jan Kotas [Fri, 9 Sep 2016 00:58:55 +0000 (17:58 -0700)]
Revert "Fix IMGREL32 static field addr value-num blindspot"

7 years agoMerge pull request #7116 from dotnet-bot/from-tfs
Sean Gillespie [Fri, 9 Sep 2016 00:45:58 +0000 (17:45 -0700)]
Merge pull request #7116 from dotnet-bot/from-tfs

Merge changes from TFS

7 years agoFix a build break introduced by GH#6764
dotnet-bot [Fri, 9 Sep 2016 00:24:16 +0000 (17:24 -0700)]
Fix a build break introduced by GH#6764

[tfs-changeset: 1626397]

7 years agoFix #7100
Bruce Forstall [Thu, 8 Sep 2016 23:42:22 +0000 (16:42 -0700)]
Fix #7100

This issue is the following assert:
```
Assert failure '!emitComp->opts.compReloc || memBase->IsIconHandle()'
```
while ngen'ing mscorlib on desktop.

We're trying to generate
```
cmp ebx, dword ptr [0000H]
```
(due to inlining). But, emitInsBinary() doesn't expect a zero address that
is not a relocatable handle.

Simply change the assert to allow this. The code then generates the correct
zero base address.

7 years agoMerge pull request #7112 from rahku/appdomain
Rahul Kumar [Thu, 8 Sep 2016 23:27:42 +0000 (16:27 -0700)]
Merge pull request #7112 from rahku/appdomain

Add AppContext.UnhandledException to ref file

7 years agoAdd AppContext.UnhandledException to ref file
Rahul Kumar [Thu, 8 Sep 2016 23:17:06 +0000 (16:17 -0700)]
Add AppContext.UnhandledException to ref file

7 years agoFix to #7087
sivarv [Thu, 8 Sep 2016 22:39:08 +0000 (15:39 -0700)]
Fix to #7087

7 years agoMerge pull request #7071 from erozenfeld/StackOverflow
Eugene Rozenfeld [Thu, 8 Sep 2016 22:28:47 +0000 (15:28 -0700)]
Merge pull request #7071 from erozenfeld/StackOverflow

Make GT_LIST processing non-recursive to avoid StackOverflow.

7 years agoILDASM: Ignore Metadata flag for CoreCLR
Kyungwoo Lee [Thu, 8 Sep 2016 19:59:39 +0000 (12:59 -0700)]
ILDASM: Ignore Metadata flag for CoreCLR

Full metadata emission is disabled under coreclr.
So is ILDASM instead of failing during the run.

7 years agoFix the fixes.
Peter Kukol [Wed, 7 Sep 2016 15:58:44 +0000 (08:58 -0700)]
Fix the fixes.

7 years agoFix some timing code bit rot, plus minor cleanup.
Peter Kukol [Tue, 6 Sep 2016 18:28:30 +0000 (11:28 -0700)]
Fix some timing code bit rot, plus minor cleanup.

7 years agoMerge pull request #7107 from pgavlin/gh7089
Pat Gavlin [Thu, 8 Sep 2016 20:24:00 +0000 (13:24 -0700)]
Merge pull request #7107 from pgavlin/gh7089

Fix #7089.

7 years agoMerge pull request #6764 from swgillespie/gc-interface-3
Sean Gillespie [Thu, 8 Sep 2016 20:06:21 +0000 (13:06 -0700)]
Merge pull request #6764 from swgillespie/gc-interface-3

Move the GC behind an interface and use that interface in the VM

7 years agoIntroduce an interface separating the GC and the VM,
Sean Gillespie [Thu, 8 Sep 2016 18:27:24 +0000 (11:27 -0700)]
Introduce an interface separating the GC and the VM,
modifying the VM to utilize this interface.

Introduce an interface separating the GC and the rest of the VM

Remove static members of both IGCHeap and IGCHeapInternal and move the management of the singular GC heap to the VM.

Rename uses of IGCHeap in the VM to GCHeapHolder, as well as other misc. renames throughout the VM and GC.

Split each interface function into categories, document them, use consistent formatting across the interface

Undo some accidental find/replace collateral damage

Remove all ifdefs from the GC interface

Deduplicate function declarations between IGCHeap and IGCHeapInternal, expose AllocAlign8 through the interface and the reference to alloc_context to repair the ARM build

Paper cut: false -> nullptr

Repair the ARM and x86 builds

Rename GCHeapHolder -> GCHeapUtilities and address documentation feedback

Rebase against master

Rename gcholder.h/cpp -> gcheaputilities.h/cpp

Fix an uninitialized field on alloc_context causing test failures on clang

Rename the include guard for gcheaputilities.h

Un-breaks SOS by making the following changes:
  1) Instructs the DAC to look for IGCHeap::gcHeapType by name,
     instead of assuming that it exists near g_pGCHeap,
  2) Eliminate all virtual calls on IGCHeap in the DAC, since we cannot
     dispatch on an object in another process,
  3) Because of 2, expose the number of generations past the GC interface
     using a static variable on IGCHeap that the DAC can read directly.

repair the Windows build

7 years agoMerge pull request #7106 from pgavlin/DecompTP
Pat Gavlin [Thu, 8 Sep 2016 17:52:21 +0000 (10:52 -0700)]
Merge pull request #7106 from pgavlin/DecompTP

Improve decomp throughput.

7 years agoReturn false from isRegPairType for RyuJIT.
Pat Gavlin [Thu, 8 Sep 2016 16:36:20 +0000 (09:36 -0700)]
Return false from isRegPairType for RyuJIT.

The RyuJIT backend does not use regpair types, so this method should
simply return false when that backend is in use. In the future we
should consider removing this method (and other regpair-related code).

Fixes #7089.

7 years agoMerge pull request #6995 from rahku/appdomain
Rahul Kumar [Thu, 8 Sep 2016 16:44:01 +0000 (09:44 -0700)]
Merge pull request #6995 from rahku/appdomain

Exposes runtime functionality to Appdomain implementation in corefx

7 years agoMerge pull request #4986 from mikedn/x86-cast-int-long
Pat Gavlin [Thu, 8 Sep 2016 16:31:08 +0000 (09:31 -0700)]
Merge pull request #4986 from mikedn/x86-cast-int-long

Implement integer to long/ulong casts for x86

7 years agoImprove decomp throughput.
Pat Gavlin [Thu, 8 Sep 2016 14:27:36 +0000 (07:27 -0700)]
Improve decomp throughput.

Don't find uses unless necessary. This saves about 50 milliseconds while
crossgen'ing mscorlib.

7 years agoExposes runtime functionality to Appdomain implementation in corefx
Rahul Kumar [Tue, 30 Aug 2016 21:56:11 +0000 (14:56 -0700)]
Exposes runtime functionality to Appdomain implementation in corefx

7 years agoMerge pull request #7011 from svick/earlyprop-unused-var
Pat Gavlin [Thu, 8 Sep 2016 15:20:47 +0000 (08:20 -0700)]
Merge pull request #7011 from svick/earlyprop-unused-var

Fix BBF_HAS_NULLCHECK test

7 years agoAdd a NYI for a long compare codegen issue
Mike Danes [Thu, 8 Sep 2016 12:14:32 +0000 (15:14 +0300)]
Add a NYI for a long compare codegen issue

Tracked by #7038

7 years agoImplement integer to long/ulong casts for x86
Mike Danes [Sun, 15 May 2016 11:04:13 +0000 (14:04 +0300)]
Implement integer to long/ulong casts for x86

7 years agoAdd constraint to Enum.Parse<TEnum> (#7104)
Yufei Huang [Thu, 8 Sep 2016 07:07:54 +0000 (15:07 +0800)]
Add constraint to Enum.Parse<TEnum> (#7104)

7 years agoMerge pull request #6889 from JosephTremoulet/StaticField
Joseph Tremoulet [Thu, 8 Sep 2016 05:04:25 +0000 (01:04 -0400)]
Merge pull request #6889 from JosephTremoulet/StaticField

Fix IMGREL32 static field addr value-num blindspot

7 years agoMerge pull request #6754 from hseok-oh/castd2ul
Joseph Tremoulet [Thu, 8 Sep 2016 05:04:07 +0000 (01:04 -0400)]
Merge pull request #6754 from hseok-oh/castd2ul

disable gtFoldExprConst for conversion from negative double to unsigned long

7 years agoMake TryEnsureSufficientExecutionStack public (#7077)
Bart J.F. De Smet [Thu, 8 Sep 2016 01:37:45 +0000 (18:37 -0700)]
Make TryEnsureSufficientExecutionStack public (#7077)

7 years agoFix OSX build break in PAL tests (#7101)
Jan Vorlicek [Thu, 8 Sep 2016 01:37:07 +0000 (03:37 +0200)]
Fix OSX build break in PAL tests (#7101)

This fixes a build break in PAL tests introduced by a recent checkin
that converted PAL tests to C++.

7 years agoFix issue where Type Names are not resolved if a heap dump is done twice.
Vance Morrison [Wed, 7 Sep 2016 23:32:54 +0000 (16:32 -0700)]
Fix issue where Type Names are not resolved if a heap dump is done twice.

The issue is that a table that remembers which types have been dumped is only
flushed when the 'Types' ETW keyword is disabled, but we only check this when
and ENABLE command is executed.  We should do so on DISABLE a well

7 years agoMerge pull request #7023 from pgavlin/X87MathIntrinsics
Pat Gavlin [Wed, 7 Sep 2016 21:56:39 +0000 (14:56 -0700)]
Merge pull request #7023 from pgavlin/X87MathIntrinsics

Stop treating sine/cosine/round as target intrinsics on x86.

7 years agoLink #7097 to the relevant code in ::IsTargetIntrinsic.
Pat Gavlin [Wed, 7 Sep 2016 21:45:36 +0000 (14:45 -0700)]
Link #7097 to the relevant code in ::IsTargetIntrinsic.

7 years agoFix strict aliasing violation from conditional typedef of wchar_t by building entire...
kchoi [Wed, 7 Sep 2016 21:12:22 +0000 (14:12 -0700)]
Fix strict aliasing violation from conditional typedef of wchar_t by building entire project as C++ for Unix (#6801)

Enable building CoreCLR as C++ project on Unix

This series of patches fixes the strict aliasing violation from
the conditional typedef of wchar_t in src/pal/inc/pal_char16.h:40

* rename c files to cpp
* modify all cmake files to change .c files to .cpp
* apply c++ linkage to templates

7 years agoMerge pull request #7016 from smile21prc/coreclr-perf
smile21prc [Wed, 7 Sep 2016 20:51:35 +0000 (13:51 -0700)]
Merge pull request #7016 from smile21prc/coreclr-perf

Create coreclr perf jobs for Linux.
Addressed all the comments, and verified coreclr perf run for Linux with latest coreclr/corefx bits passed:
http://dotnet-ci2.cloudapp.net/job/smile21prc_coreclr/job/coreclr-perf/job/perf_Linux/28/consoleFull

7 years agoMerge pull request #7098 from pgavlin/FixTestOutputPath
Pat Gavlin [Wed, 7 Sep 2016 20:19:31 +0000 (13:19 -0700)]
Merge pull request #7098 from pgavlin/FixTestOutputPath

Fix the output path when building a single test.

7 years agoCreate coreclr perf jobs for Linux.
Smile Wei [Tue, 30 Aug 2016 19:31:25 +0000 (12:31 -0700)]
Create coreclr perf jobs for Linux.

7 years agoFix the output path when building a single test.
Pat Gavlin [Wed, 7 Sep 2016 18:09:40 +0000 (11:09 -0700)]
Fix the output path when building a single test.

Add a trailing slash to the base output path.

7 years agoStop treating sine/cosine/round as target intrinsics on x86.
Pat Gavlin [Wed, 7 Sep 2016 17:51:29 +0000 (10:51 -0700)]
Stop treating sine/cosine/round as target intrinsics on x86.

These intrinsics were supported by JIT32 using the corresponding
x87 instructions. There are a few downsides to doing the same in
RyuJIT, however, because it uses SSE for all other floating-point
math:
- The mix of precisions used by the combination of SSE + x87
  instructions matches neither the JIT32 nor the RyuJIT/x64
  behavior.
- Using the x87 instructions is more expensive, as the result of
  the instruction may need to be moved via memory to an SSE
  register.
- The RA would need to be udpated in order to better understand
  that each x87 instruction may require a spill temp in order to
  retrieve the result.

Issue #7097 tracks investigating a custom calling convention for
the appropriate helper calls if necessasry.

7 years agoMake GT_LIST processing non-recursive to avoid StackOverflow.
Eugene Rozenfeld [Tue, 6 Sep 2016 23:51:23 +0000 (16:51 -0700)]
Make GT_LIST processing non-recursive to avoid StackOverflow.

We had some internal cases where crossgen failed with StackOverflow exception
when compiling huge methods. In particular, the methods had GT_PHI nodes with
huge number of arguments.

StackOverflow was happening in multiple places. Recent LIR changes eliminated two of those places,
these changes eliminate two more: gtSetEvalOrder and fgDebugCheckFlags (debug only). We already had
gtSetListOrder but it was only used for call arg lists. I made gtSetListOrder non-recursive and also generalized
to handle other GT_LIST nodes.

With that with these changes the huge repros can now be crossgen'd.

I verified no assembly diffs in SuperPMI.

I'm verifying overall throughput effect.

7 years agoMerge pull request #7065 from adiaaida/multiplyLongMul_Hi
Michelle McDaniel [Wed, 7 Sep 2016 15:55:06 +0000 (08:55 -0700)]
Merge pull request #7065 from adiaaida/multiplyLongMul_Hi

Enable long multiply

7 years agoMerge pull request #7081 from yufeih/enum_try_parse
Wes Haggard [Wed, 7 Sep 2016 15:54:26 +0000 (08:54 -0700)]
Merge pull request #7081 from yufeih/enum_try_parse

Add Enum.TryParse and Enum.Parse<TEnum>

7 years agoConcurrentDictionary<TKey, TValue> Exceptions to ThrowHelper (#7079)
Ben Adams [Wed, 7 Sep 2016 15:51:49 +0000 (16:51 +0100)]
ConcurrentDictionary<TKey, TValue> Exceptions to ThrowHelper (#7079)

7 years agoMerge pull request #7068 from CarolEidt/FixArm64
Carol Eidt [Wed, 7 Sep 2016 15:39:42 +0000 (08:39 -0700)]
Merge pull request #7068 from CarolEidt/FixArm64

Fix Arm64 build breaks

7 years agoMerge pull request #7075 from tarekgh/DisableZh-CHS-CHT
Tarek Mahmoud Sayed [Wed, 7 Sep 2016 15:25:01 +0000 (08:25 -0700)]
Merge pull request #7075 from tarekgh/DisableZh-CHS-CHT

Avoid creating zh-CHS/zh-CHT durng culture enumeration

7 years agoEnable long multiply
Michelle McDaniel [Wed, 31 Aug 2016 15:14:57 +0000 (08:14 -0700)]
Enable long multiply

Most long multiplies are converted in morph to helper calls. However,
GT_MULs of the form long = (long)int * (long)int are passed through to be
handled in codegen. In decompose, we convert these multiplies to
GT_MUL_HIs to be handled in a similar manner at GT_MULHI. Since mul and
imul take two ints and return a long in edx:eax, we can handle them
similarly to GT_CALLs, where we save them to lclvars if they aren't
already saved. In codegen, we generate a mul (or imul for signed
multiply), which produces the output in edx:eax, and then we store those
locations when we handle the storelclvar.

7 years agoExclude smallFrame.sh test for ARM (#7080)
Hyung-Kyu Choi [Wed, 7 Sep 2016 13:50:44 +0000 (22:50 +0900)]
Exclude smallFrame.sh test for ARM (#7080)

JIT/Methodical/tailcall_v4/smallFrame/smallFrame.sh contains
"tail.call, pop, ret" pattern. The pattern is not allowed in ECMA and
is only supported on x64 for compatibility. (issue #7036)

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years agoCorrect the virtual overload of Stream.CopyTo (#7082)
James Ko [Wed, 7 Sep 2016 13:01:33 +0000 (09:01 -0400)]
Correct the virtual overload of Stream.CopyTo (#7082)

7 years agoAdd Enum.TryParse and Enum.Parse<TEnum>
Yufei Huang [Wed, 7 Sep 2016 08:53:59 +0000 (16:53 +0800)]
Add Enum.TryParse and Enum.Parse<TEnum>

7 years agoTask<T> Exceptions to ThrowHelper (#7076)
Ben Adams [Wed, 7 Sep 2016 05:49:53 +0000 (06:49 +0100)]
Task<T> Exceptions to ThrowHelper (#7076)

7 years agomodify comment
Hyeongseok Oh [Wed, 7 Sep 2016 04:26:05 +0000 (13:26 +0900)]
modify comment

7 years agoadd comment
Hyeongseok Oh [Wed, 7 Sep 2016 04:18:39 +0000 (13:18 +0900)]
add comment

7 years agoAvoid creating zh-CHS/zh-CHT durng culture enumeration
Tarek Mahmoud Sayed [Wed, 7 Sep 2016 01:33:41 +0000 (18:33 -0700)]
Avoid creating zh-CHS/zh-CHT durng culture enumeration

zh-CHS and zh-CHT are old names that is not really supported in the standards.
when we enabled CultureInfo.GetCultures() there was some code that create cultures
for zh-CHS and zh-CHT. The fix here is disable that otherwise we'll have to enable
a good chunk of legacy code to support it while it never supported by coreclr and in
same time are not names used in standards

7 years agoMake Stream.CopyTo virtual (#7070)
James Ko [Wed, 7 Sep 2016 01:19:51 +0000 (21:19 -0400)]
Make Stream.CopyTo virtual (#7070)

7 years agoMerge pull request #7022 from lemmaa/prevent-build-output-contamination
Rama krishnan Raghupathy [Wed, 7 Sep 2016 00:20:54 +0000 (17:20 -0700)]
Merge pull request #7022 from lemmaa/prevent-build-output-contamination

[Script] Prevent build output contamination while building test overlay

7 years agoMerge pull request #7064 from JosephTremoulet/MakeCse
Joseph Tremoulet [Tue, 6 Sep 2016 19:54:32 +0000 (15:54 -0400)]
Merge pull request #7064 from JosephTremoulet/MakeCse

Fix GTF_ flag collision

7 years agoFix Arm64 build breaks
Carol Eidt [Tue, 6 Sep 2016 19:39:29 +0000 (12:39 -0700)]
Fix Arm64 build breaks

The `GT_STORE_OBJ` case in codegen was missing a break.
`getStructHandleIfPresent` wasn't correctly handling `GT_ASG'.
The `srcCount` was not being set correctly for block ops with a constant size.
And I lost some code in `fgMakeTmpArgNode` with a merge.
Also, I had introduced a dumping issue in gentree.cpp when I made `GT_OBJ` a `GTK_UNOP` as a result of some PR comments.

7 years agoMerge pull request #6922 from gkhanna79/WinArm32
Gaurav Khanna [Tue, 6 Sep 2016 19:42:14 +0000 (12:42 -0700)]
Merge pull request #6922 from gkhanna79/WinArm32

Enable Arm32 Test Build

7 years agoArray<T> exceptions to ThrowHelper (#7059)
Ben Adams [Tue, 6 Sep 2016 18:14:42 +0000 (19:14 +0100)]
Array<T> exceptions to ThrowHelper (#7059)

7 years ago[Linux][LLDB][GDB/JIT] Add support for lldb 'breakpoint set' for jitted code (#6956)
Dmitri-Botcharnikov [Tue, 6 Sep 2016 17:27:13 +0000 (21:27 +0400)]
[Linux][LLDB][GDB/JIT] Add support for lldb 'breakpoint set' for jitted code (#6956)

* Add support for lldb 'breakpoint set' for jitted code

* Updated after review

* Enlarge buffer for line program

7 years agoMove genIncRegBy() to codegenclassic.h (#7063)
Hyung-Kyu Choi [Tue, 6 Sep 2016 17:13:31 +0000 (02:13 +0900)]
Move genIncRegBy() to codegenclassic.h (#7063)

We don't have to keep genIncRegBy() in codegen.h anymore,
since genIncRegBy() is defined in codegenlegacy.cpp and only used in LEGACY_BACKEND code.

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years ago[ARM] Remove ARM_HAZARD_AVOIDANCE (#7019)
Hanjoung Lee [Tue, 6 Sep 2016 16:42:03 +0000 (01:42 +0900)]
[ARM] Remove ARM_HAZARD_AVOIDANCE (#7019)

remove `ARM_HAZARD_AVOIDANCE` as it is a rare case.

For #7003

7 years agoEnable FEATURE_JIT_METHOD_PERF always (even when FEATURE_CORECLR is on). (#7028)
Peter Kukol [Tue, 6 Sep 2016 16:21:13 +0000 (10:21 -0600)]
Enable FEATURE_JIT_METHOD_PERF always (even when FEATURE_CORECLR is on). (#7028)

7 years agoFix GTF_ flag collision
Joseph Tremoulet [Fri, 2 Sep 2016 19:22:01 +0000 (15:22 -0400)]
Fix GTF_ flag collision

Define flag `GTF_IS_IN_CSE` (which is used only to communicate in a call to
`gtNodeHasSideEffects` that the caller wants to disregard the side-effect
of running a .cctor) as `GTF_BOOLEAN` rather than `GTF_MAKE_CSE` -- as the
comment at the definition of `GTF_IS_IN_CSE` indicates, the only
requirement on its value is that it not conflict with one of the
side-effect flags, but `gtNodeHasSideEffects` does in fact check for
`GTF_MAKE_CSE`, so the current value conflicts.

Also update the code in `gtNodeHasSideEffects` that is dictated by
`GTF_IS_IN_CSE` to check just for that bit, instead of checking that the
caller passed in exactly `GTF_PERSISTENT_SIDE_EFFECTS_IN_CSE` -- no need
to entangle conceptually independent parameters.

Fixes #7042.

7 years agoAdd proper support for custom installed llvm tool chain. (#7050)
Sung-Jae Lee [Tue, 6 Sep 2016 15:45:33 +0000 (00:45 +0900)]
Add proper support for custom installed llvm tool chain. (#7050)

* Add LLVM_HOME enviroment variable support

7 years agofix helpers' flag: ULDiv, ULMod can throw Div-by-zero exception (#7052)
Hyeongseok Oh [Tue, 6 Sep 2016 15:43:39 +0000 (00:43 +0900)]
fix helpers' flag: ULDiv, ULMod can throw Div-by-zero exception (#7052)

7 years agoArraySegment<T> exceptions to ThrowHelper (#7058)
Ben Adams [Tue, 6 Sep 2016 14:23:37 +0000 (15:23 +0100)]
ArraySegment<T> exceptions to ThrowHelper (#7058)

7 years agoExclude two more tests for ARM (#7062)
Hyung-Kyu Choi [Tue, 6 Sep 2016 14:21:11 +0000 (23:21 +0900)]
Exclude two more tests for ARM (#7062)

According to issue #6217, following three tests fails
, because FEATURE_FASTTAILCALL is not supported in ARM.

  JIT/Directed/tailcall/tailcall/tailcall.sh
  JIT/Methodical/tailcall_v4/hijacking/hijacking.sh
  JIT/Regression/JitBlue/devdiv_902271/DevDiv_902271/DevDiv_902271.sh

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
7 years agoPrevent build output contamination while building test overlay
Sung-Jae Lee [Thu, 1 Sep 2016 08:06:30 +0000 (17:06 +0900)]
Prevent build output contamination while building test overlay

While building test overlay, all files in `$mscorlibDir/bin` are
copyed to `$mscorlibDir` where usually `$coreclrBinDir`.
It contaminates build output. This commit prevent it by moving
copy commend to function `create_core_overlay`.

7 years agoAllow mapping LCID and culture names mapping for neutral culture (#7049)
Tarek Mahmoud Sayed [Mon, 5 Sep 2016 19:13:23 +0000 (12:13 -0700)]
Allow mapping LCID and culture names mapping for neutral culture (#7049)

This change is to pass the flag LOCALE_ALLOW_NEUTRAL_NAMES to the OS API to allow mapping
LCID to/from culture names.

7 years agoImprove ThrowHelper (#7048)
Ben Adams [Mon, 5 Sep 2016 03:34:28 +0000 (04:34 +0100)]
Improve ThrowHelper (#7048)

7 years agoMerge pull request #7027 from CarolEidt/1stClassStructBlkOps
Carol Eidt [Sun, 4 Sep 2016 23:42:04 +0000 (16:42 -0700)]
Merge pull request #7027 from CarolEidt/1stClassStructBlkOps

1st Class Struct Block Assignments

7 years agoMerge pull request #7015 from ramarag/fixup_precode
Rama krishnan Raghupathy [Sat, 3 Sep 2016 04:56:43 +0000 (21:56 -0700)]
Merge pull request #7015 from ramarag/fixup_precode

Implement FixupPrecode for Arm64

7 years agoImplement FixupPrecode for Arm64
Rama Krishnan Raghupathy [Wed, 31 Aug 2016 23:55:28 +0000 (16:55 -0700)]
Implement FixupPrecode for Arm64