Mike Danes [Thu, 8 Sep 2016 11:54:14 +0000 (14:54 +0300)]
Implement long compare lowering for x86.
Comparisons between long-typed values on x86 require at least two and
at most three separate branches: one or two to compare the high 32
bits and one to compare the low 32 bits. In essence, each long
compare introduces two additional basic blocks into the flow graph,
but these blocks were not reified until code generation. Furthermore,
code generation of a long comparison used by a JTRUE was deferred
until the JTRUE itself without marking the inputs to the compare as
live at the JTRUE. Taken together, these representational issues
caused bugs like the one seen in the the following assembly:
33DB xor ebx, ebx
BE03000000 mov esi, 3
33FF xor edi, edi
8B75F0 mov esi, dword ptr [ebp-10H] ; these 2 are reloads inserted by LSRA
8B7DEC mov edi, dword ptr [ebp-14H] ; between the compare and the branch
3BDF cmp ebx, edi
72D6 jb SHORT G_M51005_IG03
7704 ja SHORT G_M51005_IG04
3BC6 cmp eax, esi
72D0 jb SHORT G_M51005_IG03
The reloads that LSRA has inserted have killed the registers assigned
to the inputs to the compare, thus causing the compare instructions
to read unexpected values (GH dotnet/coreclr#7038).
Although a number of alternatives were discussed, the best solution
seems to be to expose the control flow via the flow graph rather than
leaving it until code generation; this commit implements that approach.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4dc7c44f3e466067b73f7f28c0b69a7878b4ca20
Peter Kukol [Tue, 13 Sep 2016 04:35:54 +0000 (22:35 -0600)]
Clean up COMPlus_JitMemStats / MEASURE_MEM_ALLOC (dotnet/coreclr#7119)
Clean up COMPlus_JitMemStats / MEASURE_MEM_ALLOC (all of it is off by default for non-DEBUG builds).
Commit migrated from https://github.com/dotnet/coreclr/commit/
f718e6ac78184a2ac3c0d89ba10c99bd50390a32
Michelle McDaniel [Tue, 13 Sep 2016 04:18:59 +0000 (21:18 -0700)]
Merge pull request dotnet/coreclr#7105 from adiaaida/umodLong
Implement DecomposeUMod
Commit migrated from https://github.com/dotnet/coreclr/commit/
e0522e44fb771ca901811e7854da8a73aa52ad54
Michelle McDaniel [Thu, 8 Sep 2016 15:52:37 +0000 (08:52 -0700)]
Implement DecomposeUMod
This change implements DecomposeUMod for x86 RyuJIT. The only GT_UMOD
nodes that make it to decompose are ones where op2 is a cast from a
constant int to long. Because op2 is an int, we can guarantee that the
result will be an int. Therefore, in decompose, we change the type of the
GT_UMOD to be TYP_INT, and replace op2 with its lo part. We set the high
part of the GT_LONG to be 0, since the divisor < 0x3fffffff. In lower, we need
to make sure that loOp1 is in RAX and hiOp1 is in RDX, which is where
idiv expects them to be. We also increase the number of sources since
there are now three sources. In codegen, we need to make sure that the hi
and lo parts of the dividend are in the correct registers for idiv, then
we can just use the normal logic for GT_UMOD.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ed2c249fc79a8129a01056c6a3bbde8ccad63715
Pat Gavlin [Tue, 13 Sep 2016 00:34:49 +0000 (17:34 -0700)]
Merge pull request dotnet/coreclr#7126 from mikedn/x86-cast-long-int-overflow
Implement long to int casts with overflow for x86
Commit migrated from https://github.com/dotnet/coreclr/commit/
08de00f373d1ff509ba00769bb911db346489d79
Bruce Forstall [Mon, 12 Sep 2016 22:36:29 +0000 (15:36 -0700)]
Merge pull request dotnet/coreclr#7148 from BruceForstall/Fix7127
Restrict x86 legacy JIT struct promotion
Commit migrated from https://github.com/dotnet/coreclr/commit/
21e4eb9cd224c6fa257c810d270e3ff45b12a63e
Pat Gavlin [Mon, 12 Sep 2016 22:28:26 +0000 (15:28 -0700)]
Merge pull request dotnet/coreclr#7133 from mikedn/x86-cast-long-float
Implement long to float cast for x86
Commit migrated from https://github.com/dotnet/coreclr/commit/
52931c20b0e98fd0ad3145a43b8e2c4dbd9114c3
Vance Morrison [Mon, 12 Sep 2016 22:16:59 +0000 (15:16 -0700)]
Merge pull request dotnet/coreclr#7102 from vancem/ETWGCDumpFix.9-7-16
Fix Issue dumping GC heap with ETW more than once
Commit migrated from https://github.com/dotnet/coreclr/commit/
7d5bc8321058c6fce4a511e96ff4059171124ff3
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 dotnet/coreclr#7127, but the test fails with a crash in a later test case.
Commit migrated from https://github.com/dotnet/coreclr/commit/
095910a2b119d25bbafe90593c40bf93bf53f85c
Jan Kotas [Mon, 12 Sep 2016 20:39:11 +0000 (13:39 -0700)]
Merge pull request dotnet/coreclr#7136 from benaadams/enviro
Updated formatted GetResourceString code reduction
Commit migrated from https://github.com/dotnet/coreclr/commit/
762833dae43d312a3693b6a767771200e476fed9
Jose Perez Rodriguez [Mon, 12 Sep 2016 18:42:46 +0000 (11:42 -0700)]
Merge pull request dotnet/coreclr#7142 from joperezr/FillOutMissingStringMembers
Adding missing String members to coreclr
Commit migrated from https://github.com/dotnet/coreclr/commit/
cbd1f37b7b74647644686a9143d05fbdd15162c8
Davis Goodin [Mon, 12 Sep 2016 18:15:48 +0000 (13:15 -0500)]
Merge pull request dotnet/coreclr#6791 from dagood/upgrade-xunit-runner
Upgrade xunit runner to 2.2.0-beta2-build3300
Commit migrated from https://github.com/dotnet/coreclr/commit/
2508d5e3100039558941284651fc3181e0ff7ee3
Jose Perez Rodriguez [Mon, 12 Sep 2016 17:10:22 +0000 (10:10 -0700)]
Removing one String member to avoid depending on ArgIterator
Commit migrated from https://github.com/dotnet/coreclr/commit/
9e408b7d1539c184ea65f50411670069fa5e77f7
Jose Perez Rodriguez [Mon, 12 Sep 2016 16:44:39 +0000 (09:44 -0700)]
Adding missing String members to coreclr
Commit migrated from https://github.com/dotnet/coreclr/commit/
8d363be3973019a451a220aa8b49d3a3317dc357
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
398317d18b0845681671ba449b8d8d9ca2cd505c
Ben Adams [Sun, 11 Sep 2016 21:26:19 +0000 (22:26 +0100)]
Fix Environment no-inlining for mscorlib
Commit migrated from https://github.com/dotnet/coreclr/commit/
85f22161364a122ba047175e82d97ec96038e8c6
James Ko [Wed, 31 Aug 2016 15:12:13 +0000 (11:12 -0400)]
Reduce code bloat around formatted GetResourceString calls
Commit migrated from https://github.com/dotnet/coreclr/commit/
b28dc79e88dbd6a94d1a7eec23ed97cde1409174
Peter Kukol [Sat, 10 Sep 2016 00:27:19 +0000 (18:27 -0600)]
Merge pull request dotnet/coreclr#7067 from pkukol/timing_bit_rot
Fix some timing code bit rot, plus minor cleanup.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0df8ca52b6ccbceeb73798318681ff8ed2842b1f
Pat Gavlin [Fri, 9 Sep 2016 23:22:07 +0000 (16:22 -0700)]
Merge pull request dotnet/coreclr#7125 from pgavlin/ModelAssignByRefKillSet
Model the kill set for ASSIGN_BYREF and stop generating movsq on x86.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0e17ee468095df609921271e4c6513dac815f068
Bruce Forstall [Fri, 9 Sep 2016 22:02:29 +0000 (15:02 -0700)]
Merge pull request dotnet/coreclr#7122 from BruceForstall/Fix7092
Fix dotnet/coreclr#7092
Commit migrated from https://github.com/dotnet/coreclr/commit/
f5defca1cfbbe2b127ec251b911175f6ada626ec
Bruce Forstall [Fri, 9 Sep 2016 21:59:09 +0000 (14:59 -0700)]
Merge pull request dotnet/coreclr#7120 from BruceForstall/Fix7093
Fix dotnet/coreclr#7093
Commit migrated from https://github.com/dotnet/coreclr/commit/
cf251889bb85b807b8661311980dd1be462dbe73
Bruce Forstall [Fri, 9 Sep 2016 21:58:08 +0000 (14:58 -0700)]
Merge pull request dotnet/coreclr#7114 from BruceForstall/Fix7100
Fix dotnet/coreclr#7100
Commit migrated from https://github.com/dotnet/coreclr/commit/
ff53de3231bcd43e077f6a446c01520c2ed1bbea
Mike Danes [Fri, 9 Sep 2016 20:44:29 +0000 (23:44 +0300)]
Implement long to int casts with overflow for x86
Commit migrated from https://github.com/dotnet/coreclr/commit/
6942f3d49b1d2659cfc228b2c9168849fa0dbdf5
Bruce Forstall [Fri, 9 Sep 2016 17:47:45 +0000 (10:47 -0700)]
Fix dotnet/coreclr#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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
76d6e0f2f2c0707ff7a47bf0673fcfcf698f179b
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7dc24537a059284db2ba55f77458e6e4c78c7f43
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0224d864af72cc2fa414bf7daedeb6d559cb1140
Sivarv [Fri, 9 Sep 2016 17:16:16 +0000 (10:16 -0700)]
Merge pull request dotnet/coreclr#7111 from sivarv/jitstressregs2Fix
Fix to dotnet/coreclr#7087 - x86 RyuJIT JitstressRegs=2 assert failure
Commit migrated from https://github.com/dotnet/coreclr/commit/
4033fe5af8469d3e0c81d99cd2fa842c5baea57c
Kyungwoo Lee [Fri, 9 Sep 2016 16:32:39 +0000 (10:32 -0600)]
Merge pull request dotnet/coreclr#7108 from kyulee1/igmeta
ILDAMS: Ignore Metadata flag for CoreCLR
Commit migrated from https://github.com/dotnet/coreclr/commit/
e3924fd0e3c65b2cae1d7c9d844d7840115916fb
Sean Gillespie [Fri, 9 Sep 2016 16:32:24 +0000 (09:32 -0700)]
Merge pull request dotnet/coreclr#7121 from swgillespie/request-build-break
Only reference IGCHeap::gcHeapType when FEATURE_SVR_GC is defined
Commit migrated from https://github.com/dotnet/coreclr/commit/
bd2b72b3516b36a10d5e51fd255df1f2efbb665c
Sean Gillespie [Fri, 9 Sep 2016 13:53:48 +0000 (06:53 -0700)]
Only reference IGCHeap::gcHeapType when FEATURE_SVR_GC is defined
Commit migrated from https://github.com/dotnet/coreclr/commit/
c4d22a210bc28923906b205b219e8bf5c8e58926
Jan Vorlicek [Fri, 9 Sep 2016 08:57:45 +0000 (10:57 +0200)]
Fix enregistered max size constants on Unix AMD64 (dotnet/coreclr#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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
23c166d03a673e515131c2bb8777de308c0637ce
Jan Kotas [Fri, 9 Sep 2016 02:35:16 +0000 (19:35 -0700)]
Merge pull request dotnet/coreclr#7118 from dotnet/revert-6889-StaticField
Revert "Fix IMGREL32 static field addr value-num blindspot"
Commit migrated from https://github.com/dotnet/coreclr/commit/
14628f3218c4678817dedbb41f396ac62d139b8d
Bruce Forstall [Fri, 9 Sep 2016 01:09:34 +0000 (18:09 -0700)]
Fix dotnet/coreclr#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
```
Commit migrated from https://github.com/dotnet/coreclr/commit/
c16b6bc96c1aa1edd9a3085a12f12a9df4169da5
Jan Kotas [Fri, 9 Sep 2016 00:58:55 +0000 (17:58 -0700)]
Revert "Fix IMGREL32 static field addr value-num blindspot"
Commit migrated from https://github.com/dotnet/coreclr/commit/
9f7eabe48460518fb7215de1fabefdc4a6800af1
Sean Gillespie [Fri, 9 Sep 2016 00:45:58 +0000 (17:45 -0700)]
Merge pull request dotnet/coreclr#7116 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
193c5816dff234aa7504826eb559360607748563
dotnet-bot [Fri, 9 Sep 2016 00:24:16 +0000 (17:24 -0700)]
Fix a build break introduced by GHdotnet/coreclr#6764
[tfs-changeset: 1626397]
Commit migrated from https://github.com/dotnet/coreclr/commit/
1d90f2cbb3e52323e14354e6873c90b20fb63081
Bruce Forstall [Thu, 8 Sep 2016 23:42:22 +0000 (16:42 -0700)]
Fix dotnet/coreclr#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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
08f3ae19c6e07e6772ace96706012ed87e4e6f2e
Rahul Kumar [Thu, 8 Sep 2016 23:27:42 +0000 (16:27 -0700)]
Merge pull request dotnet/coreclr#7112 from rahku/appdomain
Add AppContext.UnhandledException to ref file
Commit migrated from https://github.com/dotnet/coreclr/commit/
01b87afda3e9b9f21af51c334eb7fb5854070c4d
Rahul Kumar [Thu, 8 Sep 2016 23:17:06 +0000 (16:17 -0700)]
Add AppContext.UnhandledException to ref file
Commit migrated from https://github.com/dotnet/coreclr/commit/
587840091d335f14ded4b6bec514487b8ac5e5e4
sivarv [Thu, 8 Sep 2016 22:39:08 +0000 (15:39 -0700)]
Fix to dotnet/coreclr#7087
Commit migrated from https://github.com/dotnet/coreclr/commit/
c526b321b89bd50b0da5858b9f5853f58b6b849f
Eugene Rozenfeld [Thu, 8 Sep 2016 22:28:47 +0000 (15:28 -0700)]
Merge pull request dotnet/coreclr#7071 from erozenfeld/StackOverflow
Make GT_LIST processing non-recursive to avoid StackOverflow.
Commit migrated from https://github.com/dotnet/coreclr/commit/
871bb909502f205bad8cf47036a37615fbd1ba7a
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f2e28ea518e4ff42345b99eea2d11e95b58a7dc0
Peter Kukol [Wed, 7 Sep 2016 15:58:44 +0000 (08:58 -0700)]
Fix the fixes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b529eb4a7377b9430d4da86f82e56949d68b087f
Peter Kukol [Tue, 6 Sep 2016 18:28:30 +0000 (11:28 -0700)]
Fix some timing code bit rot, plus minor cleanup.
Commit migrated from https://github.com/dotnet/coreclr/commit/
af6b1ce7d730a7c58c64cb63f3c44265484c5bd2
Pat Gavlin [Thu, 8 Sep 2016 20:24:00 +0000 (13:24 -0700)]
Merge pull request dotnet/coreclr#7107 from pgavlin/gh7089
Fix dotnet/coreclr#7089.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d54da68a2ba1c1b6345bf66931621b17e1d97f9e
Sean Gillespie [Thu, 8 Sep 2016 20:06:21 +0000 (13:06 -0700)]
Merge pull request dotnet/coreclr#6764 from swgillespie/gc-interface-3
Move the GC behind an interface and use that interface in the VM
Commit migrated from https://github.com/dotnet/coreclr/commit/
1c43df95410e57f0d40e6ee55012ef65bdac2487
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
Commit migrated from https://github.com/dotnet/coreclr/commit/
6519911fbccbec049f9592484f69c213b4b78264
Pat Gavlin [Thu, 8 Sep 2016 17:52:21 +0000 (10:52 -0700)]
Merge pull request dotnet/coreclr#7106 from pgavlin/DecompTP
Improve decomp throughput.
Commit migrated from https://github.com/dotnet/coreclr/commit/
65c2ff78e0e88f5052751747f6686084caab3d4c
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 dotnet/coreclr#7089.
Commit migrated from https://github.com/dotnet/coreclr/commit/
57d6887745844ea882b3dde4c54155e4f57f41ff
Rahul Kumar [Thu, 8 Sep 2016 16:44:01 +0000 (09:44 -0700)]
Merge pull request dotnet/coreclr#6995 from rahku/appdomain
Exposes runtime functionality to Appdomain implementation in corefx
Commit migrated from https://github.com/dotnet/coreclr/commit/
70fe825e7245a97c32d9af4212d668e6c1f1e3c5
Pat Gavlin [Thu, 8 Sep 2016 16:31:08 +0000 (09:31 -0700)]
Merge pull request dotnet/coreclr#4986 from mikedn/x86-cast-int-long
Implement integer to long/ulong casts for x86
Commit migrated from https://github.com/dotnet/coreclr/commit/
a04c2e30fc3a07640bb94d43d97976975a3676bc
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
db2281ccbcc610ca255d174a3d3e5cf287776089
Rahul Kumar [Tue, 30 Aug 2016 21:56:11 +0000 (14:56 -0700)]
Exposes runtime functionality to Appdomain implementation in corefx
Commit migrated from https://github.com/dotnet/coreclr/commit/
0535ab83944028bb8ed1b323c8537ca8ce5ac8e2
Pat Gavlin [Thu, 8 Sep 2016 15:20:47 +0000 (08:20 -0700)]
Merge pull request dotnet/coreclr#7011 from svick/earlyprop-unused-var
Fix BBF_HAS_NULLCHECK test
Commit migrated from https://github.com/dotnet/coreclr/commit/
c880f864bb91bddd83d5390a85a33c34eee04183
Mike Danes [Thu, 8 Sep 2016 12:14:32 +0000 (15:14 +0300)]
Add a NYI for a long compare codegen issue
Tracked by dotnet/coreclr#7038
Commit migrated from https://github.com/dotnet/coreclr/commit/
30803e00e1b4e132c74a9d2e55931e394c2a39b5
Mike Danes [Sun, 15 May 2016 11:04:13 +0000 (14:04 +0300)]
Implement integer to long/ulong casts for x86
Commit migrated from https://github.com/dotnet/coreclr/commit/
b0737c733f674f047cd23d272002a3427f26fad0
Yufei Huang [Thu, 8 Sep 2016 07:07:54 +0000 (15:07 +0800)]
Add constraint to Enum.Parse<TEnum> (dotnet/coreclr#7104)
Commit migrated from https://github.com/dotnet/coreclr/commit/
83629bab155c313e2cf91045be69d3b980f74f23
Joseph Tremoulet [Thu, 8 Sep 2016 05:04:25 +0000 (01:04 -0400)]
Merge pull request dotnet/coreclr#6889 from JosephTremoulet/StaticField
Fix IMGREL32 static field addr value-num blindspot
Commit migrated from https://github.com/dotnet/coreclr/commit/
200845408154acf072d8079236248c37a7133b24
Joseph Tremoulet [Thu, 8 Sep 2016 05:04:07 +0000 (01:04 -0400)]
Merge pull request dotnet/coreclr#6754 from hseok-oh/castd2ul
disable gtFoldExprConst for conversion from negative double to unsigned long
Commit migrated from https://github.com/dotnet/coreclr/commit/
2448e08eedea49b0c325a60ba567a21883e342fd
Bart J.F. De Smet [Thu, 8 Sep 2016 01:37:45 +0000 (18:37 -0700)]
Make TryEnsureSufficientExecutionStack public (dotnet/coreclr#7077)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ff7731cd78d11994e8d755f7f005ca010bf900b7
Jan Vorlicek [Thu, 8 Sep 2016 01:37:07 +0000 (03:37 +0200)]
Fix OSX build break in PAL tests (dotnet/coreclr#7101)
This fixes a build break in PAL tests introduced by a recent checkin
that converted PAL tests to C++.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9a845642ab71c8a742c3dc54b81df4866ae79250
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
Commit migrated from https://github.com/dotnet/coreclr/commit/
1d5c43f1da75b36707133a1a86666373938dfe40
Pat Gavlin [Wed, 7 Sep 2016 21:56:39 +0000 (14:56 -0700)]
Merge pull request dotnet/coreclr#7023 from pgavlin/X87MathIntrinsics
Stop treating sine/cosine/round as target intrinsics on x86.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ddc3d67def51efe26f613557db5701f7c016207c
Pat Gavlin [Wed, 7 Sep 2016 21:45:36 +0000 (14:45 -0700)]
Link dotnet/coreclr#7097 to the relevant code in ::IsTargetIntrinsic.
Commit migrated from https://github.com/dotnet/coreclr/commit/
13e41a6f4e2e29138f93d31f94611a5deb787714
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 (dotnet/coreclr#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
Commit migrated from https://github.com/dotnet/coreclr/commit/
4149bd2070e0a8beec6dedb238e6fd832a39611b
smile21prc [Wed, 7 Sep 2016 20:51:35 +0000 (13:51 -0700)]
Merge pull request dotnet/coreclr#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
Commit migrated from https://github.com/dotnet/coreclr/commit/
09133905fce3b541702044b6d2bbe942a6b40155
Pat Gavlin [Wed, 7 Sep 2016 20:19:31 +0000 (13:19 -0700)]
Merge pull request dotnet/coreclr#7098 from pgavlin/FixTestOutputPath
Fix the output path when building a single test.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4af09ac719a6ec7cd398b379c8062af8bd6f5e24
Smile Wei [Tue, 30 Aug 2016 19:31:25 +0000 (12:31 -0700)]
Create coreclr perf jobs for Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bd59a687114248831f6343c40d2b4b80c08b01b5
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
182dd9f60d900bb4de38f1069fa354e3d190793f
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 dotnet/coreclr#7097 tracks investigating a custom calling convention for
the appropriate helper calls if necessasry.
Commit migrated from https://github.com/dotnet/coreclr/commit/
32f661368e4f5e7eab667216e663c83913a73b5c
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a67f5698705dab8cb58bd07c733ac492e81ad28f
Michelle McDaniel [Wed, 7 Sep 2016 15:55:06 +0000 (08:55 -0700)]
Merge pull request dotnet/coreclr#7065 from adiaaida/multiplyLongMul_Hi
Enable long multiply
Commit migrated from https://github.com/dotnet/coreclr/commit/
df5fbfe2d68a73bc797a3d94120b809a1eaac9cd
Wes Haggard [Wed, 7 Sep 2016 15:54:26 +0000 (08:54 -0700)]
Merge pull request dotnet/coreclr#7081 from yufeih/enum_try_parse
Add Enum.TryParse and Enum.Parse<TEnum>
Commit migrated from https://github.com/dotnet/coreclr/commit/
b83b1a72387e342a4a3707df869ca30f5bb39d9e
Ben Adams [Wed, 7 Sep 2016 15:51:49 +0000 (16:51 +0100)]
ConcurrentDictionary<TKey, TValue> Exceptions to ThrowHelper (dotnet/coreclr#7079)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b8b530f8a928b6419ab9d944937e3480ec6c256a
Carol Eidt [Wed, 7 Sep 2016 15:39:42 +0000 (08:39 -0700)]
Merge pull request dotnet/coreclr#7068 from CarolEidt/FixArm64
Fix Arm64 build breaks
Commit migrated from https://github.com/dotnet/coreclr/commit/
6f027788c5aee2783a5f6db828f4b8da6876f4f4
Tarek Mahmoud Sayed [Wed, 7 Sep 2016 15:25:01 +0000 (08:25 -0700)]
Merge pull request dotnet/coreclr#7075 from tarekgh/DisableZh-CHS-CHT
Avoid creating zh-CHS/zh-CHT durng culture enumeration
Commit migrated from https://github.com/dotnet/coreclr/commit/
41aa1990bcd6b0e427e736c5d0253f5f9fcb890d
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef8acec1b92b4fc119b39fd15f7ac5d7df725f0f
Hyung-Kyu Choi [Wed, 7 Sep 2016 13:50:44 +0000 (22:50 +0900)]
Exclude smallFrame.sh test for ARM (dotnet/coreclr#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 dotnet/coreclr#7036)
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
88fbc55acaf4b64c06891663da0b1fc18d79731a
James Ko [Wed, 7 Sep 2016 13:01:33 +0000 (09:01 -0400)]
Correct the virtual overload of Stream.CopyTo (dotnet/coreclr#7082)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef5ceb0b52e3a34f614ab8fd943678b5e1ed1bd1
Yufei Huang [Wed, 7 Sep 2016 08:53:59 +0000 (16:53 +0800)]
Add Enum.TryParse and Enum.Parse<TEnum>
Commit migrated from https://github.com/dotnet/coreclr/commit/
0bba86cf2ddb0e5bc494e56632577fdb5fcebf7e
Ben Adams [Wed, 7 Sep 2016 05:49:53 +0000 (06:49 +0100)]
Task<T> Exceptions to ThrowHelper (dotnet/coreclr#7076)
Commit migrated from https://github.com/dotnet/coreclr/commit/
19346e58c6443638c245f85ee0b31a8c6e7af872
Hyeongseok Oh [Wed, 7 Sep 2016 04:26:05 +0000 (13:26 +0900)]
modify comment
Commit migrated from https://github.com/dotnet/coreclr/commit/
358846b9417e1043818cea18da0f18924ebc2a5d
Hyeongseok Oh [Wed, 7 Sep 2016 04:18:39 +0000 (13:18 +0900)]
add comment
Commit migrated from https://github.com/dotnet/coreclr/commit/
1fd05c6120036bf180b595aa2321d8656a02c3d7
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
Commit migrated from https://github.com/dotnet/coreclr/commit/
7ac54bcc7fc17792e283da809e72b44ae8da02a4
James Ko [Wed, 7 Sep 2016 01:19:51 +0000 (21:19 -0400)]
Make Stream.CopyTo virtual (dotnet/coreclr#7070)
Commit migrated from https://github.com/dotnet/coreclr/commit/
2142296ed4d866f0a6afbf20e4858b6310be5226
Rama krishnan Raghupathy [Wed, 7 Sep 2016 00:20:54 +0000 (17:20 -0700)]
Merge pull request dotnet/coreclr#7022 from lemmaa/prevent-build-output-contamination
[Script] Prevent build output contamination while building test overlay
Commit migrated from https://github.com/dotnet/coreclr/commit/
8bd85fe92fda9a2feff1a7d1388a174b64bab57b
Joseph Tremoulet [Tue, 6 Sep 2016 19:54:32 +0000 (15:54 -0400)]
Merge pull request dotnet/coreclr#7064 from JosephTremoulet/MakeCse
Fix GTF_ flag collision
Commit migrated from https://github.com/dotnet/coreclr/commit/
7ae29e81dc17f31b21caec5a5d95bf5e79511171
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fedf90c774d63c0423858f2948cb63d2dcd9de3a
Gaurav Khanna [Tue, 6 Sep 2016 19:42:14 +0000 (12:42 -0700)]
Merge pull request dotnet/coreclr#6922 from gkhanna79/WinArm32
Enable Arm32 Test Build
Commit migrated from https://github.com/dotnet/coreclr/commit/
84ce20baf0707e9e50f4fda6f483d0c9f3e8f622
Ben Adams [Tue, 6 Sep 2016 18:14:42 +0000 (19:14 +0100)]
Array<T> exceptions to ThrowHelper (dotnet/coreclr#7059)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0e1c7eb886ecf819f166a422d79eaa977258228a
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 (dotnet/coreclr#6956)
* Add support for lldb 'breakpoint set' for jitted code
* Updated after review
* Enlarge buffer for line program
Commit migrated from https://github.com/dotnet/coreclr/commit/
365fab07c3e49c9b3ca824aad822a17e3e8061c9
Hyung-Kyu Choi [Tue, 6 Sep 2016 17:13:31 +0000 (02:13 +0900)]
Move genIncRegBy() to codegenclassic.h (dotnet/coreclr#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>
Commit migrated from https://github.com/dotnet/coreclr/commit/
527edfc09a2bd1060bd66fcce1fc99932a332645
Hanjoung Lee [Tue, 6 Sep 2016 16:42:03 +0000 (01:42 +0900)]
[ARM] Remove ARM_HAZARD_AVOIDANCE (dotnet/coreclr#7019)
remove `ARM_HAZARD_AVOIDANCE` as it is a rare case.
For dotnet/coreclr#7003
Commit migrated from https://github.com/dotnet/coreclr/commit/
b9402adedcf9cf5204fd9ece52183ac61cef7c83
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). (dotnet/coreclr#7028)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e70de80ef88f15cdc694ed773006854c1ed0b681
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 dotnet/coreclr#7042.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4aae2404c2a74a1d3e7e8a37810e6c7c67aabb64
Sung-Jae Lee [Tue, 6 Sep 2016 15:45:33 +0000 (00:45 +0900)]
Add proper support for custom installed llvm tool chain. (dotnet/coreclr#7050)
* Add LLVM_HOME enviroment variable support
Commit migrated from https://github.com/dotnet/coreclr/commit/
cea91c3bced68cc36fcf2fbe167214f69940d3da
Hyeongseok Oh [Tue, 6 Sep 2016 15:43:39 +0000 (00:43 +0900)]
fix helpers' flag: ULDiv, ULMod can throw Div-by-zero exception (dotnet/coreclr#7052)
Commit migrated from https://github.com/dotnet/coreclr/commit/
237245c84f57d3dec091b9e10293eea4b2bd1a28
Ben Adams [Tue, 6 Sep 2016 14:23:37 +0000 (15:23 +0100)]
ArraySegment<T> exceptions to ThrowHelper (dotnet/coreclr#7058)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a90f60e90ef5d75b69d044ea91360f2b0437882e
Hyung-Kyu Choi [Tue, 6 Sep 2016 14:21:11 +0000 (23:21 +0900)]
Exclude two more tests for ARM (dotnet/coreclr#7062)
According to issue dotnet/coreclr#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>
Commit migrated from https://github.com/dotnet/coreclr/commit/
fc4444c02ceb7cceaee4fbbfd580fcc851a147f0
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`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e6621d062ecaaa104c674cd235e8499ce820ba39