Pat Gavlin [Tue, 11 Oct 2016 23:41:21 +0000 (16:41 -0700)]
Merge pull request dotnet/coreclr#7571 from pgavlin/MkRefAnyFieldTypeX86
Fix the type of the data field of a typed ref on x86.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8f8887bd76fa7975af35b5ff613dee467d02b169
Rahul Kumar [Tue, 11 Oct 2016 23:05:04 +0000 (16:05 -0700)]
Merge pull request dotnet/coreclr#7574 from DrewScoggins/runtestfix
Fix runtest.cmd return code
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e7198530dd80406ab77455cc413321f19159c2b
Drew Scoggins [Tue, 11 Oct 2016 22:51:49 +0000 (15:51 -0700)]
Fix runtest.cmd return code
When running the GenerateLayoutOnly command of runtest.cmd the script
should return zero instead of one.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0122f4329e22b404ba1dabf4938882ae72c8b4e6
Pat Gavlin [Tue, 11 Oct 2016 22:05:03 +0000 (15:05 -0700)]
Fix the type of the data field of a typed ref on x86.
This field should be of type byref; not treating it as such causes GC
holes when passing typed references.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d756b9c2dad2d70aeb940b3e4e735a7da48176c8
Carol Eidt [Tue, 11 Oct 2016 20:55:33 +0000 (13:55 -0700)]
Merge pull request dotnet/coreclr#7310 from wateret/for-7002-2
[ARM] Generate direct call instructions for recursive calls
Commit migrated from https://github.com/dotnet/coreclr/commit/
8a1fe73ad03e8a28541e4f4bf99a18d247ef31de
Pat Gavlin [Tue, 11 Oct 2016 20:28:43 +0000 (13:28 -0700)]
Merge pull request dotnet/coreclr#7565 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
50128f84616377c0429cfbaf8cb23705e2614347
Pat Gavlin [Tue, 11 Oct 2016 18:25:40 +0000 (11:25 -0700)]
Merge pull request dotnet/coreclr#7560 from pgavlin/StoreBlkGCHole
Disable emit{Enable,Disable}GC for x86.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0be212e8ff3b8b1d6418713521310d582dc4bb86
ikopylov [Tue, 11 Oct 2016 17:02:38 +0000 (20:02 +0300)]
SemaphoreSlim performance improvement (dotnet/coreclr#137)
* Waiters notification by the value of releaseCount (reduce the number of false-wakeups).
Commit migrated from https://github.com/dotnet/coreclr/commit/
6317f26f79b55aeefadbb375c4c7e9a8db7a898a
Vance Morrison [Tue, 11 Oct 2016 16:10:11 +0000 (09:10 -0700)]
Update Readme.md to lead you through basic repo workflow (dotnet/coreclr#7552)
Update README.md to contain much more information about using the repo
Commit migrated from https://github.com/dotnet/coreclr/commit/
7c2cf60715c2aa9eeda16466a225cf77b425df69
Pat Gavlin [Tue, 11 Oct 2016 15:55:09 +0000 (08:55 -0700)]
Fix a build break in the ARM64 JIT.
[tfs-changeset: 1632696]
Commit migrated from https://github.com/dotnet/coreclr/commit/
24ee8721ffdeec2b4c20e9630b8e68200202b0b6
Pat Gavlin [Tue, 11 Oct 2016 15:26:02 +0000 (08:26 -0700)]
Merge pull request dotnet/coreclr#7562 from pgavlin/x86PreemptiveAssert
Remove an overly fragile assertion.
Commit migrated from https://github.com/dotnet/coreclr/commit/
db89cba9cc24822ed04e97e579f43ef4dcf96f0b
Pat Gavlin [Tue, 11 Oct 2016 04:21:23 +0000 (21:21 -0700)]
Remove an overly fragile assertion.
The GC stress infrastructure contained an assertion that was meant to
help detect managed code running in preemptive mode. Unfortunately, this
assertion was derived from the set of instructions emitted by the JIT at
the time at which it was added. As such, it is now out of date.
Because a failure of this assertion does not necessarily indicate a
correctness bug and because it is onerous to keep up-to-date, remove it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cf8cc2d94cc3f5115beab3ba02f05684c784949a
Michal Strehovský [Tue, 11 Oct 2016 01:56:09 +0000 (18:56 -0700)]
Remove AllowPartiallyTrustedCallers from a test (dotnet/coreclr#7555)
Partial trust is not part of .NET Core.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0600f6e6da5d366770f74818575ecdaeba1c0423
Pat Gavlin [Tue, 11 Oct 2016 00:09:29 +0000 (17:09 -0700)]
Disable emit{Enable,Disable}GC for x86.
The GC info encoding for this platform does not permit marking
arbitrary regions of generated code as non-interruptible.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5864690cc8411e4d512a7a14eb95a9bdaa4ccca6
Michelle McDaniel [Tue, 11 Oct 2016 00:21:07 +0000 (17:21 -0700)]
Merge pull request dotnet/coreclr#7518 from adiaaida/cmpByteable
Force byteable register for CMP if op2 is CNS_INT
Commit migrated from https://github.com/dotnet/coreclr/commit/
39376e83c09d5d23336c0a089eb0af9abe1da434
Jan Kotas [Tue, 11 Oct 2016 00:06:45 +0000 (17:06 -0700)]
Update adding_new_public_apis.md (dotnet/coreclr#7544)
Commit migrated from https://github.com/dotnet/coreclr/commit/
48ef84f75eb799bef07b74b3268b93a9af8dab37
Pat Gavlin [Tue, 11 Oct 2016 00:00:38 +0000 (17:00 -0700)]
Merge pull request dotnet/coreclr#7537 from pgavlin/PushStructArgsX86
Fix the codegen for by-value struct args on x86.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ea8a824c065d5e5972cd1a3cac6deac664dc893b
Michelle McDaniel [Fri, 7 Oct 2016 15:32:17 +0000 (08:32 -0700)]
Force byteable register for CMP if op2 is CNS_INT
On x86 we need to force byteable registers for compares not only when both
ops are typ_byte, but also when the first is of typ_byte and the second is
a constant int. The original condition for cmp only considered the first
case. This change adds the second condition.
Commit migrated from https://github.com/dotnet/coreclr/commit/
12c70e569d9c20fba1c7441dc0591db40b3fcda1
Pat Gavlin [Mon, 10 Oct 2016 20:30:00 +0000 (13:30 -0700)]
Address PR feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b734cc0593477de9fd232414cd6b863303284cf0
Rama krishnan Raghupathy [Mon, 10 Oct 2016 21:18:26 +0000 (14:18 -0700)]
Merge pull request dotnet/coreclr#7530 from ramarag/StrongNameKeyPair
Strong name key pair
Commit migrated from https://github.com/dotnet/coreclr/commit/
de4680918bc5f2f1feb95d28f8d6df7dd35b7f20
Rama Krishnan Raghupathy [Fri, 7 Oct 2016 23:36:46 +0000 (16:36 -0700)]
Exposing StrongNameKeyPair
Commit migrated from https://github.com/dotnet/coreclr/commit/
3bd4db20d58a40eabef2924435614ffb029e034e
Joseph Tremoulet [Mon, 10 Oct 2016 19:01:43 +0000 (15:01 -0400)]
Merge pull request dotnet/coreclr#7543 from JosephTremoulet/NoRngChecks_Rel
Stop making JitNoRngChecks debug-only
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e12fbf41a64112d27c20c647de180d5377193c6
John Chen [Mon, 10 Oct 2016 16:39:08 +0000 (09:39 -0700)]
Fix buffer length usage in UTF-8 to Unicode conversion (dotnet/coreclr#7540)
These changes are ported from desktop CLR.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e197c9e3bdc5f047689f69878fcc9ff72c438482
Hugh Bellamy [Mon, 10 Oct 2016 15:54:41 +0000 (16:54 +0100)]
Fix various CustomAttributeBuilder bugs (dotnet/coreclr#7206)
Fix various CustomAttributeBuilder bugs
Commit migrated from https://github.com/dotnet/coreclr/commit/
edc6bf9d65e84afb6425cd23ee12ca18c5029398
Joseph Tremoulet [Mon, 10 Oct 2016 14:48:56 +0000 (10:48 -0400)]
Stop making JitNoRngChecks debug-only
JitNoRngChecks is a flag, only available in special builds, that removes
all array bounds checks from generated code, which exists solely to
facilitate experiments measuring the cost of bounds checks. Commit
0aebfbef0 added support for it to RyuJit, but accidentally did so only for
debug builds; release `FEATURE_ENABLE_NO_RANGE_CHECKS` builds are
currently broken.
This change makes the jit flag's definition available in release builds
with `FEATURE_ENABLE_NO_RANGE_CHECKS` defined as well. The corresponding
code in clrconfigvalues.h already works that way.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6a6c96c5e22d4accdfa9a0e8be24a7ad07e8efa9
Pat Gavlin [Sat, 8 Oct 2016 02:03:10 +0000 (19:03 -0700)]
Fix the codegen for by-value struct args on x86.
Although the existing code generation for by-value struct args containing
GC references on x86 was correct with respect to the layout of the data
being passed, it was not correct with respect to the invariants necessary
for the GC info encoder.
The existing codegen for by-value struct args--whether represented by
`GT_OBJ` or `GT_FIELD_LIST` nodes--takes what is essentially the
following approach:
sub esp, argument_size
mov [esp + offset_0], field_0
mov [esp + offset_1], field_1
...
mov [esp + offset_n], field_n
Although this puts the correct data in the correct locations, the
emitter is unable to recognize that a GC info update is requires if any
of the `mov` instructions write a GC reference to the stack: instead,
on x86, `push` instructions must be used to write GC references on the
stack. Furthermore, the stack must be kept 4-byte aligned.
This change modifies the code generator to use `push` instructions to
write outgoing GC references to the stack while obeying the alignment
invariant required by the GC encoding. For outgoing by-value struct
args represented by `GT_OBJ`, this results in very straightforward code:
push [val_addr]
push [val_addr + 4]
...
push [val_addr + n]
For args represented by `GT_FIELD_LIST`, the picture is a bit more
complicated as the stack must be kept 4-byte aligned. Handling of these
args is split into two cases: if a field list contains no GC references
and is larger than 16 bytes or contains any fields that cannot be
treated as a 4-byte-aligned, int32-sized value, the argument is passed
using the `sub esp, arg_size; mov [esp + offset], field` approach.
Otherwise--if the struct contains any GC references or is smaller than
16 bytes and only contains fields that can be treated as slots--the
argument is passed using the following approach:
- If a field is a GC reference or can be treated as a 4-byte slot, the
field is stored to the stack using a `push` instruction.
- Otherwise, the stack pointer is first adjusted to the next 4-byte
aligned address after the offset of the field and the field is
stored to the appropriate address using a `mov`.
For example, given the following IR:
t55 = lclVar bool V06 tmp4 u:6 esi REG esi RV $40
t138 = dconst float 0.
00000000000000000 REG mm0 $80
/--* t138 float
+--* t55 bool
t139 = * <fldList> void float at offset 4 REG NA $180
/--* t139 void
t152 = * putarg_stk [+0x00] void REG NA
The backend will generate the following code:
sub esp, 8
movss dword ptr [esp+04H], xmm0
mov dword ptr [esp], esi
And given the following IR:
t13 = lclVar ref V04 tmp1 u:2 esi (last use) REG esi RV $1c0
t45 = lclVar int V05 tmp2 u:2 eax (last use) REG eax RV $200
/--* t45 int
+--* t13 ref
t46 = * <fldList> void int at offset 4 REG NA $240
The backend will instead generate the following:
push eax
push esi
These changes also produce beneficial diffs: for example, the native image
for System.Private.CoreLib.dll has diffs in ~1000 methods for an overall
size improvement of 1%.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9fa566912ad334c805f15f1e1fe33775b6eafa19
Gaurav Khanna [Sun, 9 Oct 2016 15:32:34 +0000 (08:32 -0700)]
Merge pull request dotnet/coreclr#7538 from dotnet-bot/master-UpdateDependencies
Update CoreClr to beta-24609-02 (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
54e43091d82aa92e70d57a759fcfd5a0b9fd9146
dotnet-bot [Sun, 9 Oct 2016 08:15:37 +0000 (08:15 +0000)]
Update CoreClr to beta-24609-02
Commit migrated from https://github.com/dotnet/coreclr/commit/
876de59c1bd18b9508b7d202615c5bd4a19af975
Michal Strehovský [Sun, 9 Oct 2016 04:59:20 +0000 (21:59 -0700)]
Add test to validate ByRef type unification (dotnet/coreclr#7534)
Make sure that `ldtoken SomeType&` leads to the same type as `ldtoken
SomeType` followed by `MakeByRefType`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d295c810e5aabafcc0b7168713a0786b462608dd
Stephen Toub [Sun, 9 Oct 2016 04:59:01 +0000 (00:59 -0400)]
Implement CultureNotFoundException id-based ctors (dotnet/coreclr#7536)
Commit migrated from https://github.com/dotnet/coreclr/commit/
71b817da9063df15274264ea039a761198072a85
Gaurav Khanna [Sun, 9 Oct 2016 02:27:48 +0000 (19:27 -0700)]
Merge pull request dotnet/coreclr#7531 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24609-01, beta-24608-01, respectively (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f9b7d0674eece73ca32754201bb138dbd6bba1c5
dotnet-bot [Sun, 9 Oct 2016 00:13:50 +0000 (00:13 +0000)]
Update CoreClr, CoreFx to beta-24609-01, beta-24608-01, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
27dc63a8494b145150121c304e65ee92d578d001
Vance Morrison [Sat, 8 Oct 2016 06:08:38 +0000 (23:08 -0700)]
Standardize on _echo name (dotnet/coreclr#7532)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f2aa3a6eb159abc79c527d164b54998459c4df5
Sergiy Kuryata [Sat, 8 Oct 2016 00:13:06 +0000 (17:13 -0700)]
Merge pull request dotnet/coreclr#7521 from vkvenkat/master
Fixed dotnet/coreclr#7519 - Dotnet crashes while saturating multiple CPU groups on Windows
Commit migrated from https://github.com/dotnet/coreclr/commit/
417042854170a2785b22d9c77c11ebbb626f4cd5
Sean Gillespie [Fri, 7 Oct 2016 22:11:32 +0000 (15:11 -0700)]
Return null on allocation failure due to OOM instead of throwing a exception from within the GC (dotnet/coreclr#7501)
Commit migrated from https://github.com/dotnet/coreclr/commit/
2d9b2ab82c67344aa1d9fee422d7b7d5760cae92
John Chen (CLR) [Fri, 7 Oct 2016 19:46:16 +0000 (12:46 -0700)]
Disable CER code that is causing access violation
Resolves issue dotnet/corefxdotnet/coreclr#12412.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e4a35f6d0fd23694ef57c1adf22c5a42152669b6
Gaurav Khanna [Fri, 7 Oct 2016 20:57:28 +0000 (13:57 -0700)]
Merge pull request dotnet/coreclr#7522 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24607-03, beta-24607-05, respectively (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
44bfc499cc485627ad13a041345ca51247d2c21c
Pat Gavlin [Fri, 7 Oct 2016 20:08:40 +0000 (13:08 -0700)]
Merge pull request dotnet/coreclr#7520 from pgavlin/PutStructArgStk
Refactor genPutStructArgStk for clarity.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e3adc1213b27d8901073841dfd4ccef7102b2774
Pat Gavlin [Fri, 7 Oct 2016 18:15:44 +0000 (11:15 -0700)]
Fix formatting.
Commit migrated from https://github.com/dotnet/coreclr/commit/
32b26e67eab64e650239b76f86a9efb152c52374
dotnet-bot [Fri, 7 Oct 2016 18:39:53 +0000 (18:39 +0000)]
Update CoreClr, CoreFx to beta-24607-03, beta-24607-05, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
24af9874a45228161fa50f5d8d7ea2262a81a67e
vkvenkat [Fri, 7 Oct 2016 16:53:09 +0000 (09:53 -0700)]
Fixed dotnet/coreclr#7519 - Dotnet crashes while saturating multiple CPU groups on Windows
Commit migrated from https://github.com/dotnet/coreclr/commit/
c0c2f37002baadc0b83379172457f8ce2e18cee3
Pat Gavlin [Fri, 7 Oct 2016 17:38:48 +0000 (10:38 -0700)]
Refactor genPutStructArgStk for clarity.
This also contains a minor CQ improvement: instead of always
incrementing the source and destination pointers when copying a struct
argument to the stack, we now only do so if there are more slots to
copy.
Commit migrated from https://github.com/dotnet/coreclr/commit/
532e9bfbfaf2ec45bbc3f4a9d9df259b12030084
Bruce Forstall [Fri, 7 Oct 2016 16:29:02 +0000 (09:29 -0700)]
Merge pull request dotnet/coreclr#7515 from BruceForstall/FixMerge
Fix bad merge
Commit migrated from https://github.com/dotnet/coreclr/commit/
c3781e152ea38f0468777adeea76a5da3d100b44
sandreenko [Fri, 7 Oct 2016 15:46:34 +0000 (08:46 -0700)]
Merge pull request dotnet/coreclr#7509 from sandreenko/master
Set missed default value for coreclr runtest.cmd dotnet/coreclr#7488.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b51786d7cccaaa303b322baa8b452df664d2b033
Gaurav Khanna [Fri, 7 Oct 2016 14:58:47 +0000 (07:58 -0700)]
Merge pull request dotnet/coreclr#7514 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24607-02, beta-24607-03, respectively (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c6eff2e7f2c8e596617ab7dcac1f44f625f1dece
Michelle McDaniel [Fri, 7 Oct 2016 13:56:45 +0000 (06:56 -0700)]
Merge pull request dotnet/coreclr#7466 from adiaaida/fix7224
Force byteable registers for indir op source
Commit migrated from https://github.com/dotnet/coreclr/commit/
b473f5973f1b5bff8d2a7d89f5a4271de2eb82b2
Michelle McDaniel [Mon, 3 Oct 2016 21:49:19 +0000 (14:49 -0700)]
Force byteable registers for indir op source
When we have a GT_STOREIND, we need to not only make sure that the
source and dest of the storeind are marked as requiring byteable
registers, but also the indirect op's source. For example:
```
GT_STOREIND(GT_ADD(TYP_INT, mem of TYP_BYTE, reg of TYP_INT or TYP_BYTE))
```
We need to make sure that the source reg of the GT_ADD is byteable.
This change fixes dotnet/coreclr#7224.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9e10f2282ba2d747341d2b2043dcfbee409ef17e
dotnet-bot [Fri, 7 Oct 2016 08:15:03 +0000 (08:15 +0000)]
Update CoreClr, CoreFx to beta-24607-02, beta-24607-03, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
f66f5f01cffa6c3b60c56acf5f145c1a41678ee9
Tarek Mahmoud Sayed [Fri, 7 Oct 2016 07:07:04 +0000 (00:07 -0700)]
Enable netstandard1.7 collations APIs (dotnet/coreclr#7502)
* Enable netstandard1.7 collations APIs
This change is adding the netstandard 1.7 APIs to CompareInfo class and adding support to SortKey and SortVersion classes
The change include some support in cultureinfo and culturedata for locale Id's too which is used by CompareInfo class
* optimize the globalization data so we'll have faster initialization
* Remove security attributes
Commit migrated from https://github.com/dotnet/coreclr/commit/
1485ac45ea94009ae490de5c340a3fbb775d5462
Sean Gillespie [Fri, 7 Oct 2016 01:51:10 +0000 (18:51 -0700)]
Restore some changes lost in a merge conflict (dotnet/coreclr#7512)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0be1f2169dc100473256dc1b24a2dcb91ed9f4ed
Bruce Forstall [Fri, 7 Oct 2016 00:36:59 +0000 (17:36 -0700)]
Fix bad merge
A previous checkin backed-out a change that moved one test out of
the RyuJIT/x86 section. I'm reverting that, and putting the test
exclusion back where it should be.
At the same time, now that there are no RyuJIT/x86 test exclusions,
I'm deleting the RyuJIT/x86 section.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4efebd6d8d85e20cd4f648737ee9c78ebc679f76
Bruce Forstall [Fri, 7 Oct 2016 00:24:32 +0000 (17:24 -0700)]
Merge pull request dotnet/coreclr#7490 from BruceForstall/EnableLegacy
Enable COMPlus_useLegacyJit=1 for CoreCLR for x86
Commit migrated from https://github.com/dotnet/coreclr/commit/
52ce4c917afa32bc16ffece55c40e3d5f8790023
Gaurav Khanna [Thu, 6 Oct 2016 20:15:03 +0000 (13:15 -0700)]
Merge pull request dotnet/coreclr#7507 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24606-03, beta-24606-02, respectively (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
2a3be33211ef766e259959e35e50529143b210a4
Pat Gavlin [Thu, 6 Oct 2016 19:37:58 +0000 (12:37 -0700)]
Merge pull request dotnet/coreclr#7504 from pgavlin/NormalizeSpills
Always normalize stores when spilling lclVars.
Commit migrated from https://github.com/dotnet/coreclr/commit/
278d72c8fc09b42d96fa4715182a495ecf9fabaf
Sergey Andreenko [Thu, 6 Oct 2016 18:56:40 +0000 (11:56 -0700)]
Set missed default value for coreclr runtest.cmd.
__MSBuildBuildArch is set to x64 by default like __BuildArch. Fix 7488.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c6776a3ef9984dcecaf743cc189089240486d8cc
Bruce Forstall [Tue, 4 Oct 2016 22:12:46 +0000 (15:12 -0700)]
Enable legacy JIT fallback for CoreCLR on Windows x86
This is to support the eventual case where RyuJIT/x86 becomes the default
x86 JIT, but we support fallback to the older, legacy JIT32/x86 (which
will be renamed compatjit.dll). This uses the same mechanism that was
built for .NET 4.6 when RyuJIT/x64 was shipped, and allowed fallback
to JIT64 as compatjit.dll.
However, we use a different configuration name to avoid conflicting
with the .NET 4.6 COMPlus_useLegacy name (and unintentionally causing
users to fall back to JIT64 with their .NET 4.6 apps).
The COMPlus variable is COMPlus_UseWindowsX86CoreLegacyJit=1. For the
dotnet.exe host, you can set `"System.JIT.UseWindowsX86CoreLegacyJit": true`
in the "configProperties" section of the app.runtimeconfig.json file.
There is a new COMPlus_RequireLegacyJit=1 option to aid testing JIT
fallback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c47362766e24ab4a7195fa1fb851d254c7b84373
Pat Gavlin [Thu, 6 Oct 2016 17:43:00 +0000 (10:43 -0700)]
Fix a typo and a formatting issue.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f91379ed52a305c973fe63ee2c7132d873a9348c
Pat Gavlin [Wed, 5 Oct 2016 20:43:10 +0000 (13:43 -0700)]
Always normalize stores when spilling lclVars.
In order to support the semantics of the MSIL evaluation stack, RyuJIT
normalizes all "small" lclVars (i.e. lclVars with a non-struct
type that is smaller than an int32) from the actual type of the lclVar
to int32. This normalization may be performed in one of two ways:
- the lclVar's may be normalized when the lclVar is used (load
normalization)
- at any point at which the value is defined, the value being stored to
the lclVar is normalized (store normalization)
Store normalization must not be used if the lclVar is aliasable, since
the contents of the upper bytes for that lclVar's slot may be modified
by some other alias. Load normalization must be used if the lclVar is
a method parameter, as there is no guarantee that the caller has
properly nomralized the arguments it has passed. As such, any lclVar
that is either aliasable or is a method parameter is load-normalized,
and any other lclVar is store-normalized. lclVars that are
store-normalized are assumed to be represented as properly zero- or
sign-extended 4-byte values at all times, and so can simply be loaded
as int32s.
This picture becomes somewhat more subtle after register allocation,
however: once a lclVar has been enregistered, the contents of its
register are guaranteed to be properly zero- or sign-extended for the
purposes of store normalization, and in order for the lclVar to have
been enregistered in the first place, it must not have been aliasable.
As such, all enregistered variables may be store-normalized (as well as
load-normalized, if they represent method parameters). This has a
particularly significant impact on spills, as it implies that even if
the lclVar being spilled is not normally considered store-normalized, it
may be considered so for the purposes of the spill. This is advantageous
for architectures such as x86, as it allows a small lclVar to be
successfully spilled from a register that is not addressable at the size
of the lclVar's type. This change switches both LSRA and the code
generator to always use the actual type of a spilled lclVar for the
corresponding store rather than making this behavior conditional on
whether or not the lclVar is store-normalized.
Fixes dotnet/coreclr#7236.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4319b49cdc3ef514dad2e93ec28ec8003f749aab
dotnet-bot [Thu, 6 Oct 2016 16:18:36 +0000 (16:18 +0000)]
Update CoreClr, CoreFx to beta-24606-03, beta-24606-02, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef75bce255150b966a4fec2492e06229a22721ec
Evgeny Pavlov [Thu, 6 Oct 2016 14:30:42 +0000 (17:30 +0300)]
Fix incorrect index for localsDebug array (dotnet/coreclr#7495)
Commit migrated from https://github.com/dotnet/coreclr/commit/
920bf1330d0148fc5a277d7ea18f4b7c95c89258
Gaurav Khanna [Thu, 6 Oct 2016 13:08:57 +0000 (06:08 -0700)]
Merge pull request dotnet/coreclr#7505 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24606-02, beta-24606-01, respectively (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a4cceedafade563e5028395830377fe9e4ca6a40
dotnet-bot [Thu, 6 Oct 2016 08:11:25 +0000 (08:11 +0000)]
Update CoreClr, CoreFx to beta-24606-02, beta-24606-01, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
f33a80445d901c38522298b51b746543ab231343
Carol Eidt [Wed, 5 Oct 2016 23:44:49 +0000 (16:44 -0700)]
Merge pull request dotnet/coreclr#7486 from CarolEidt/Fix7008
Support double-aligned frames for RyuJIT/x86
Commit migrated from https://github.com/dotnet/coreclr/commit/
fe91e18f3fe570a05c44c9854a5bf553f36dcc0c
Sivarv [Wed, 5 Oct 2016 23:08:34 +0000 (16:08 -0700)]
Merge pull request dotnet/coreclr#7500 from mikedn/and-cmp-to-test
Fix and-cmp to test recognition
Commit migrated from https://github.com/dotnet/coreclr/commit/
41b184d8e935125290ad5d52b6aaaa9b8c4c42c3
Carol Eidt [Tue, 4 Oct 2016 20:29:08 +0000 (13:29 -0700)]
Support double-aligned frames for RyuJIT/x86
This factors out the analysis for when to use a double-aligned frame from the legacy backend.
Doing so exposed an assert for a case where we turn an intrinsic into a call in the Rationalizer, but don't update the frame requirements.
There may be some remaining tuning opportunities, given that the (pre-existing) algorithm doesn't attempt to create a double-aligned frame if we need an EBP-based frame for other reasons.
Fix dotnet/coreclr#7008
Commit migrated from https://github.com/dotnet/coreclr/commit/
79b5840ce23b28f56e232f3c8a025c5113ba77f9
Mike Danes [Wed, 5 Oct 2016 19:55:48 +0000 (22:55 +0300)]
Fix and-cmp to test recognition
Containment is used by TreeNodeInfoInitCmp to tell genCompareInt that a "and-cmp to test" pattern has been recognized.
Before LSRA added "reg optional" the result of isContained was solely determined by TreeNodeInfoInit. Now LSRA can make operands contained and then that happens genCompareInt wrongly believes that TreeNodeInfoInitCmp recognized the pattern.
To fix this genCompareInt needs to recognize (x and c) == 0 in addition to checking isContained.
Commit migrated from https://github.com/dotnet/coreclr/commit/
424f61816a7c008d2c4f0b3dffef698002664764
Gaurav Khanna [Wed, 5 Oct 2016 18:11:32 +0000 (11:11 -0700)]
Merge pull request dotnet/coreclr#7498 from dotnet-bot/master-UpdateDependencies
Update CoreClr to beta-24605-03 (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
34efd0dae9413bf8da5d4fa2fc74fed5fb201153
dotnet-bot [Wed, 5 Oct 2016 16:17:39 +0000 (16:17 +0000)]
Update CoreClr to beta-24605-03
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f439a599b9fe3f1677fdce4c52173aaff41a293
Gaurav Khanna [Wed, 5 Oct 2016 13:40:25 +0000 (06:40 -0700)]
Merge pull request dotnet/coreclr#7492 from dotnet-bot/master-UpdateDependencies
Update CoreClr to beta-24605-02 (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
46931d3c387f5599b7e3199c2fcd25f117e6a303
Jan Kotas [Wed, 5 Oct 2016 13:33:32 +0000 (06:33 -0700)]
Delete mscorlib from CoreCLR targeting pack (dotnet/coreclr#7494)
Commit migrated from https://github.com/dotnet/coreclr/commit/
42ee0c1d7503e8ca97a1c6b4a9f685e0d42ec0f1
dotnet-bot [Wed, 5 Oct 2016 08:28:30 +0000 (08:28 +0000)]
Update CoreClr to beta-24605-02
Commit migrated from https://github.com/dotnet/coreclr/commit/
819a847f3b3dd1bae4d9d47ea81163144aa5e118
Gaurav Khanna [Tue, 4 Oct 2016 23:38:38 +0000 (16:38 -0700)]
Merge pull request dotnet/coreclr#7472 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24604-03, beta-24604-02, respectively (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
907313e0978b4764131d6b50a35f35e4ed97aa6f
Pat Gavlin [Tue, 4 Oct 2016 23:26:07 +0000 (16:26 -0700)]
Merge pull request dotnet/coreclr#7481 from pgavlin/RyuJITCrossgen
Add an option to crossgen S.P.CoreLib using the alt jit.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5202b9768f4130c6d2fb0aae85aa41099bb173b0
Pat Gavlin [Mon, 3 Oct 2016 19:49:17 +0000 (12:49 -0700)]
Add an option to crossgen S.P.CoreLib using the alt jit.
This also changes the x86/RyuJIT CI job to pass this option to
build.cmd. This leg will now use RyuJIT when crossgen'ing S.P.CoreLib
and when running tests.
Commit migrated from https://github.com/dotnet/coreclr/commit/
345a33c2ad93514152382ad371992adfb3b56eda
Atsushi Kanamori [Tue, 4 Oct 2016 20:11:39 +0000 (13:11 -0700)]
Merge pull request dotnet/coreclr#7436 from giuliohome/issue-7346
Issue 7346 ConstructorArguments from CustomAttributes for null array of enum
Commit migrated from https://github.com/dotnet/coreclr/commit/
0004cbba44f7e6f178286abfc6c69b5834fd550b
Michelle McDaniel [Tue, 4 Oct 2016 19:44:14 +0000 (12:44 -0700)]
Merge pull request dotnet/coreclr#7484 from adiaaida/assertOnNYI
Set default x86 test run to assert on nyi
Commit migrated from https://github.com/dotnet/coreclr/commit/
27f51cf7335f3cd4a7c4a62cc99ba1ce7d8cd3bf
giuliohome [Tue, 4 Oct 2016 00:04:06 +0000 (02:04 +0200)]
Issue 7346 ConstructorArguments with null array of enum
From http://stackoverflow.com/a/
39521919
In structure of the blob where the custom attribute is specified,
an enum argument is represented using the byte 0x55
followed by a string specifying the name and assembly of the enum type.
A null array is represented using a length of -1.
Unfortunately, what happens if you pass an array of enum as null is that
enum name is lost.
Fix dotnet/coreclr#7346
Commit migrated from https://github.com/dotnet/coreclr/commit/
c9ca0f6992bc2e9e1675b979ad0392da301f4d2f
Michelle McDaniel [Tue, 4 Oct 2016 18:03:05 +0000 (11:03 -0700)]
Set default x86 test run to assert on nyi
Now that we have eliminated all of the NYIs from the base test run, set
the default to be to assert on NYI, incase we expose new NYIs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1f0e4da897c01cc5165967b1ac375002e2674042
dotnet-bot [Tue, 4 Oct 2016 16:29:41 +0000 (16:29 +0000)]
Update CoreClr, CoreFx to beta-24604-03, beta-24604-02, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
699b0932c994aff20135cf47426201aa985c36a6
Pat Gavlin [Tue, 4 Oct 2016 13:49:50 +0000 (06:49 -0700)]
Merge pull request dotnet/coreclr#7476 from jkotas/security-annotations
Correct security annotations
Commit migrated from https://github.com/dotnet/coreclr/commit/
349542aebf82f2f4d02384598c3a6994aa0b8611
Evgeny Pavlov [Tue, 4 Oct 2016 11:17:14 +0000 (14:17 +0300)]
[Linux][GDB-JIT] Fix incorrect frame location when we have a lot of locals (dotnet/coreclr#7451)
* Fix incorrect frame location when we have a lot of (more than ten) locals or arguments
Commit migrated from https://github.com/dotnet/coreclr/commit/
75a94974e7032ee5dd7b0b69351c597b6262cf97
Daniel Podder [Tue, 4 Oct 2016 08:39:49 +0000 (01:39 -0700)]
Add PGO GENPROFILE support to coreclr and clrjit (dotnet/coreclr#7423)
* Add PGO GENPROFILE support to coreclr and clrjit
Update the cmake build system to enable support for Profile Guided
Optimization (PGO) on Windows, and enable this feature for two target
binaries (coreclr and clrjit).
With this change, toggle between instrumented and profile-optimized
settings for target binaries by passing pgoinstrument argument to the build.cmd
Assume profile-optimized mode by default. Fall back to regular non-PGO
optimized builds if profile data is not available.
Commit migrated from https://github.com/dotnet/coreclr/commit/
114b58869def96c720d0c2fd9b77ceccdc924b96
Ian Hays [Tue, 4 Oct 2016 07:16:55 +0000 (00:16 -0700)]
API: Move Synchronized from StreamReader to TextReader (dotnet/coreclr#7469)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4d6710d76ba222b1bf9aaef9b475a3229f827824
Jan Kotas [Tue, 4 Oct 2016 07:06:48 +0000 (00:06 -0700)]
Correct security annotations
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee46c6ba2d3672062195117308aea3958af2373a
Jan Kotas [Tue, 4 Oct 2016 07:01:10 +0000 (00:01 -0700)]
Merge pull request dotnet/coreclr#7473 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
928bdbc1626b4fe9744666d4c1999937e8d9b384
Rahul Kumar [Tue, 4 Oct 2016 06:57:06 +0000 (23:57 -0700)]
Remove coreclr checks from AppDomain apis (dotnet/coreclr#7471)
Commit migrated from https://github.com/dotnet/coreclr/commit/
93cff06963030967f999813e279dadc2c608ed65
Carol Eidt [Tue, 4 Oct 2016 05:22:33 +0000 (22:22 -0700)]
Merge pull request dotnet/coreclr#7468 from CarolEidt/Fix7460
Allow GT_FIELD_LIST as legal arg for RyuJIT/x86
Commit migrated from https://github.com/dotnet/coreclr/commit/
6e6dada99cea38cf671a255cb8a94fca179ffc7b
Bruce Forstall [Tue, 4 Oct 2016 01:00:28 +0000 (18:00 -0700)]
Merge pull request dotnet/coreclr#7467 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
44bb2cb4688e4ca26b4c0f0a2927ed73d4680414
Jan Vorlicek [Tue, 4 Oct 2016 00:56:42 +0000 (02:56 +0200)]
Add support for Alpine Linux (dotnet/coreclr#7440)
This change enables build of CoreCLR on Alpine Linux. Here is the list
of changes:
- Disable asserts checking RSP in arbitrary threads against cached stack limit
for the respective thread. The stack on Alpine obviously grows over the limit
reported by the pthread functions.
- Disable using XSTATE. This should be re-enabled after MUSL gets the _xstate,
_fpx_sw_bytes and related data structures added to the signal.h header.
- Disable setting rlimit of RLIMIT_NOFILE to the max value, since it breaks
debugging for some reason.
- Add skipping over the hardware signal trampoline in the PAL_VirtualUnwind.
While we were not trying to walk over it in a simple case, in a case where
an exception was thrown from a catch handler of a hardware exception, we
still attempted to walk over it and it fails on Alpine.
- Fix detection of Alpine Linux in the PAL's CMakeLists.txt so that it works
in Docker containers too.
- Modified PAL_VirtualUnwind to make the check for unwinding past the bottom
of the stack unconditional. We had a long list of platforms where we were
doing this check and it doesn't hurt to do it on platforms where it is not
needed. I have done that rather than adding a check for Alpine Linux as
another platform that needs it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9c506048df2e03002eda612966977b739b585aba
Carol Eidt [Mon, 3 Oct 2016 23:12:46 +0000 (16:12 -0700)]
Allow GT_FIELD_LIST as legal arg for RyuJIT/x86
The condition in GenTree::IsValidCallArgument() was not correct for
GT_FIELD_LIST, which is used for passing a struct on the stack in
RyuJIT/x86.
Fix dotnet/coreclr#7460
Commit migrated from https://github.com/dotnet/coreclr/commit/
28c8f0adc1c3e97ad7b15fba02eaefdafc1d212c
Pat Gavlin [Mon, 3 Oct 2016 22:58:06 +0000 (15:58 -0700)]
Merge pull request dotnet/coreclr#7464 from pgavlin/RyuJITPInvokeFrame
Fix P/Invoke call and method {pro,epi}logs in RyuJIT/x86.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3c67761c09e029569466ef1e96a2b0d67873c8a3
Pat Gavlin [Mon, 3 Oct 2016 22:26:01 +0000 (15:26 -0700)]
Mark new UnmanagedMemoryAccessor methods as SafeCritical.
[tfs-changeset: 1630680]
Commit migrated from https://github.com/dotnet/coreclr/commit/
6bcb7b4ae0a9718a6f12e1173a65b482b41d0794
Rahul Kumar [Mon, 3 Oct 2016 21:45:29 +0000 (14:45 -0700)]
Remove FirstChanceExceptionEventArgs from BCL folder. The file has been moved into mscorlib folder
[tfs-changeset: 1630635]
Commit migrated from https://github.com/dotnet/coreclr/commit/
f52182b8dfadfe38d29c1d20ec402dcca3e91ceb
Pat Gavlin [Mon, 3 Oct 2016 21:38:22 +0000 (14:38 -0700)]
Add comment anchors.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9bb28609338ce6ba7008704234477916165e7914
Pat Gavlin [Mon, 3 Oct 2016 20:27:06 +0000 (13:27 -0700)]
Fix P/Invoke call and method {pro,epi}logs in RyuJIT/x86.
The contract for methods that contain P/Invokes differs between 64- and
32-bit targets.
In the former case, the JIT must:
- In the method prolog, initialize the P/Invoke frame with a call to
CORINFO_HELP_INIT_PINVOKE_FRAME and push the frame on to the current
thread's frame list if the method is an IL stub.
- Before/after each call, if the method is *not* an IL stub, push/pop
the frame (respectively).
- In the method epilog, if the method is an IL stub, pop the P/Invoke
frame.
In the latter case, CORINFO_HELP_INIT_PINVOKE_FRAME pushes the P/Invoke
frame on to the current thread's frame list, and the frame need only
be popped in the method epilog.
This change adjusts P/Invoke lowering s.t. the 64-bit discipline is
only followed for 64-bit targets.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5e93edd7fd6f21e2364a864e18c1098148d81109
Hugh Bellamy [Mon, 3 Oct 2016 19:49:59 +0000 (20:49 +0100)]
Add Math.Clamp overloads to mscorlib.cs (dotnet/coreclr#7462)
Commit migrated from https://github.com/dotnet/coreclr/commit/
30c766ffab686d5552d61ffb9c14968062839ce0
Gaurav Khanna [Mon, 3 Oct 2016 18:39:19 +0000 (11:39 -0700)]
Merge pull request dotnet/coreclr#7445 from dotnet-bot/master-UpdateDependencies
Update CoreClr to beta-24603-03 (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
523c5a5da81e53b2028aa4758e160cb07dd58c93
Dmitri-Botcharnikov [Mon, 3 Oct 2016 18:05:00 +0000 (22:05 +0400)]
[Linux] [SOS.NETCore] Quick fix for Path.GetFileName (dotnet/coreclr#7441)
* Quick fix for Path.GetFileName
* Updated after review
Commit migrated from https://github.com/dotnet/coreclr/commit/
b338a938ba689d763829f4d80d33bd805049166a
Igor Kulaychuk [Mon, 3 Oct 2016 18:04:05 +0000 (21:04 +0300)]
Fix DWARF linetable info provided by GDBJIT (dotnet/coreclr#7444)
Extend PC to the end of function in DWARF linetable commands.
This allows the debugger to show source lines for all addresses
inside a function.
Commit migrated from https://github.com/dotnet/coreclr/commit/
449feba048bc80faf999ad0e014497fde1d12e60
dotnet-bot [Mon, 3 Oct 2016 16:24:37 +0000 (16:24 +0000)]
Update CoreClr to beta-24603-03
Commit migrated from https://github.com/dotnet/coreclr/commit/
2bb391b4c6b15a2e7d0ca833c9d0f74e3d48ab23