Mikhail Skvortcov [Mon, 6 Feb 2017 14:46:17 +0000 (17:46 +0300)]
RyuJIT/ARM32: Enable P/Invoke lowering.
Commit migrated from https://github.com/dotnet/coreclr/commit/
af94355b2ba32c4baa8b76c2e57d81322f1780d8
Jan Vorlicek [Tue, 28 Feb 2017 19:19:24 +0000 (20:19 +0100)]
Fix mismatch in the cmake script endif condition (dotnet/coreclr#9859)
This change fixes a mismatch in the cmake script endif condition introduced
by dotnet/coreclr#9809.
Commit migrated from https://github.com/dotnet/coreclr/commit/
98ae83d08bb97de3e6e4bb68453dcd4680949734
Gaurav Khanna [Tue, 28 Feb 2017 19:02:07 +0000 (11:02 -0800)]
Merge pull request dotnet/coreclr#9781 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx to beta-25028-02, stable, respectively (master)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8b9ae26e519517a3a00f790eabda465ebf0c0578
Bruce Forstall [Tue, 28 Feb 2017 17:57:34 +0000 (09:57 -0800)]
Merge pull request dotnet/coreclr#9852 from mskvortsov/ryujit-arm32-label
[RyuJIT/ARM32] enable CG for GT_LABEL nodes
Commit migrated from https://github.com/dotnet/coreclr/commit/
404c9fd12660a83d85f1e4ae1cafcfbb9b4c7ab0
Andy Ayers [Tue, 28 Feb 2017 17:15:14 +0000 (09:15 -0800)]
Remove some unused benchmarks (dotnet/coreclr#9843)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d1e688cb2bd37121c7de786b118b912ce0734c7
Pat Gavlin [Tue, 28 Feb 2017 16:30:46 +0000 (08:30 -0800)]
Merge pull request dotnet/coreclr#9796 from pgavlin/FixOurGetThreadCycles
Fix _our_GetThreadCycles for clang/xarch.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7bb285caa21608a65c32472a5531dfd0d9c15100
Hyeongseok Oh [Tue, 28 Feb 2017 13:09:37 +0000 (22:09 +0900)]
Fix cross component builderror - CMakeLists.txt for PAL (dotnet/coreclr#9819)
define & use PAL_ARCH_SOURCES_DIR in PAL CMakeLists.txt to build assembly based on platform architecture.
root/CMakeLists.txt defines ARCH_SOURCES_DIR based on target architecture.
Commit migrated from https://github.com/dotnet/coreclr/commit/
67032ee80de8d219146b9ac192609884f784f23b
Mikhail Skvortcov [Tue, 28 Feb 2017 13:01:20 +0000 (16:01 +0300)]
RyuJIT/ARM32: enable CG for GT_LABEL nodes
Commit migrated from https://github.com/dotnet/coreclr/commit/
d0f6e8fd3678e6144a8421fe6df76c05d7e45ca9
Frederik Carlier [Tue, 28 Feb 2017 12:55:59 +0000 (13:55 +0100)]
Disable DBGIPC_TRANSPORT_DI and DBGIPC_TRANSPORT_VM on Android (dotnet/coreclr#9809)
* Disable DBGIPC_TRANSPORT_DI and DBGIPC_TRANSPORT_VM on Android
Commit migrated from https://github.com/dotnet/coreclr/commit/
b0a0d52e7d273a46ec6e2c39dbc816d98dcbe217
Jonghyun Park [Tue, 28 Feb 2017 10:36:55 +0000 (19:36 +0900)]
Use BIT64 instead of _WIN64 for LONG helpers (dotnet/coreclr#9845)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5118a077796a0aeab826ee5702b254026e97f458
dotnet-bot [Tue, 28 Feb 2017 09:28:23 +0000 (09:28 +0000)]
Update CoreClr, CoreFx to beta-25028-02, stable, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
ae523d0eec109d87827000b13a4bff1642b6d794
Yongseop Kim [Tue, 28 Feb 2017 09:25:10 +0000 (18:25 +0900)]
[x86/linux] Implement BackPatchWorkerAsmStub (dotnet/coreclr#9690)
* [x86/linux] Implement BackPatchWorkerAsmStub
This implementation is ported from BackPatchWorkerAsmStub in
vm/i386/virtualcallstubcpu.hpp
Commit migrated from https://github.com/dotnet/coreclr/commit/
e9ad7cf9690fdca6f4f3f1b6bafdebe9406db9b7
Sergey Andreenko [Tue, 28 Feb 2017 04:14:27 +0000 (20:14 -0800)]
Merge pull request dotnet/coreclr#9774 from sandreenko/coreRT-fat-pointers-fix
coreRT fat pointer hidden argument fix for calls with retBufArg
Commit migrated from https://github.com/dotnet/coreclr/commit/
04e30172080b8292e00771275c0b5d64198f42dc
Dan Moseley [Tue, 28 Feb 2017 03:39:04 +0000 (19:39 -0800)]
Replace INSIDE_CLR with CORECLR (dotnet/coreclr#9841)
Commit migrated from https://github.com/dotnet/coreclr/commit/
dd40277667a6e72f499be8eded2122b69049e2e7
Alex Perovich [Tue, 28 Feb 2017 02:54:54 +0000 (20:54 -0600)]
Move Used interop sources into shared folder (dotnet/coreclr#9840)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6e32dcdda32b76b1767d55042c3a347c5fdbe8e3
Sergey Andreenko [Tue, 28 Feb 2017 02:41:40 +0000 (18:41 -0800)]
CC fix
Commit migrated from https://github.com/dotnet/coreclr/commit/
fdd63cdee5818cae8adb53af6720a21425d4622c
Andy Ayers [Tue, 28 Feb 2017 02:10:27 +0000 (18:10 -0800)]
Some tests for devirtualization (dotnet/coreclr#9834)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f8c2a6d20a408c955fee3c3167e557bf1b3ccba6
Jonghyun Park [Tue, 28 Feb 2017 02:06:38 +0000 (11:06 +0900)]
Use flags in exceptionhandling.cpp (dotnet/coreclr#9823)
* Add USE_FUNCLET_CALL_HELPER
* Use STACK_RANGE_BOUNDS_ARE_CALLER_SP
Commit migrated from https://github.com/dotnet/coreclr/commit/
0b64b09fb71fc997dd1e843a8745bd8b4bcc7753
Jonghyun Park [Tue, 28 Feb 2017 01:26:51 +0000 (10:26 +0900)]
[x86/Linux] Fix GetCurrentSP (dotnet/coreclr#9838)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c5dff6f62dd4e7b422b8931f60a7a1d9cb8364e0
Sergey Andreenko [Fri, 24 Feb 2017 21:39:36 +0000 (13:39 -0800)]
coreRT fat pointer hidden argument fix for calls with retBufArg
Commit migrated from https://github.com/dotnet/coreclr/commit/
792ffd6ac53ac576bc6893185c2bcaa68c589fa8
Aditya Mandaleeka [Mon, 27 Feb 2017 23:34:48 +0000 (15:34 -0800)]
Merge pull request dotnet/coreclr#9837 from adityamandaleeka/remove_useless_message
Remove useless message from runtest output.
Commit migrated from https://github.com/dotnet/coreclr/commit/
740b64d2513c68f8455444a90f477010f71093bf
Aditya Mandaleeka [Mon, 27 Feb 2017 23:30:15 +0000 (15:30 -0800)]
Remove useless message from runtest output.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4eb8117881e49efa90530ea9425dd1a8c388bb9c
Michal Strehovský [Mon, 27 Feb 2017 23:21:57 +0000 (15:21 -0800)]
Don't generate a runtime lookup for static base if not needed (dotnet/coreclr#9833)
`fgInitThisClass` makes sure that the type initializer for the type that
owns the method being compiled has run. On CoreCLR, the fallthrough code
somehow ends up not doing a runtime lookup if the owning type is not
canonical. We need to avoid it on CoreRT as well.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4fb2f0ff574502894ab7657fe89e9f9f99eafe1a
Pat Gavlin [Mon, 27 Feb 2017 21:05:59 +0000 (13:05 -0800)]
Merge pull request dotnet/coreclr#9795 from pgavlin/RefactorIsContained
Refactor isContained().
Commit migrated from https://github.com/dotnet/coreclr/commit/
6092f90e5a02c5a19d214b3d8f91a40550397ded
mikedn [Mon, 27 Feb 2017 20:44:27 +0000 (22:44 +0200)]
Improve BitConverter.ToIntNN methods (dotnet/coreclr#9803)
* Improve BitConverter.ToIntNN methods
- Avoid duplicate argument validation
- Fix failed optimization attempt: (uint)i < a.Length needs to be (uint) < (uint)a.Length otherwise it gets promoted to long and that's bad for 32 bit architectures
- Workaround JIT limitation: fixed variables cannot be enregistered
- Use Unsafe.ReadUnaligned to avoid alignment handling complications
- Use Unsafe.As instead of fixed as it generates shorter code
- Don't forward unsigned method to signed methods. The JIT doesn't want to inline the signed methods even though the generated code isn't significantly larger
Commit migrated from https://github.com/dotnet/coreclr/commit/
ac1dcaef3e9ddb5290b555db2aefca2adfe52419
mikedn [Mon, 27 Feb 2017 20:05:13 +0000 (22:05 +0200)]
Use Unsafe.ReadUnaligned/WriteUnaligned in UMA (dotnet/coreclr#9829)
Commit migrated from https://github.com/dotnet/coreclr/commit/
2556db9fd8cefffab59ce79dabb8e605b8dd7129
mikedn [Mon, 27 Feb 2017 16:40:51 +0000 (18:40 +0200)]
Add Unsafe.ReadUnaligned/WriteUnaligned (dotnet/coreclr#9808)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f569cfa36924ea49c4976a36140c098c8f796bab
Jonghyun Park [Mon, 27 Feb 2017 15:00:42 +0000 (00:00 +0900)]
Use WIN64EXCEPTIONS to declare EE_PERSONALITY_ROUTINE helpers (dotnet/coreclr#9821)
Commit migrated from https://github.com/dotnet/coreclr/commit/
446b2a2bb39b9a803f4df3bdfb2fef68acf1b1a6
Jonghyun Park [Mon, 27 Feb 2017 14:57:20 +0000 (23:57 +0900)]
[x86/Linux] Clean up unused NakedThrowHelper stub (dotnet/coreclr#9824)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d93d27243f5567178815ddcce8188e10b992f1db
Jonghyun Park [Mon, 27 Feb 2017 10:07:05 +0000 (19:07 +0900)]
[x86/Linux] 16-byte aligned Funclet Helpers (dotnet/coreclr#9810)
Commit migrated from https://github.com/dotnet/coreclr/commit/
38a7266eb596e56511b4503eb8c92e49de1f97ef
Jonghyun Park [Mon, 27 Feb 2017 05:21:19 +0000 (14:21 +0900)]
Clean up PInvokeStubForHost and PInvokeStubForHostInner (dotnet/coreclr#9815)
Commit migrated from https://github.com/dotnet/coreclr/commit/
62fd770f1e7b362081ad50412ad337d79aa53c53
Jonghyun Park [Mon, 27 Feb 2017 05:20:43 +0000 (14:20 +0900)]
Clean up nested WIN64EXCEPTIONS-ifdef (dotnet/coreclr#9817)
Commit migrated from https://github.com/dotnet/coreclr/commit/
87ffa9cbd595edab1aabc943b2ba440fbac83611
Jonghyun Park [Mon, 27 Feb 2017 04:09:10 +0000 (13:09 +0900)]
[x86/Linux] Use _X86_ instead of _TARGET_X86_ (dotnet/coreclr#9816)
Commit migrated from https://github.com/dotnet/coreclr/commit/
dbb1ae49988642015eac970330797ae56eea983b
Jonghyun Park [Mon, 27 Feb 2017 02:46:19 +0000 (11:46 +0900)]
[x86/Linux] Clean up PopSEHRecords (dotnet/coreclr#9812)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef468f2da6a9a773625a32c09a190ffc73551113
Jonghyun Park [Mon, 27 Feb 2017 02:45:50 +0000 (11:45 +0900)]
[x86/Linux] Clean up CallRtlUnwind (dotnet/coreclr#9813)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e77ce643719f3868669ba38aaa6fc3da266396a8
Jonghyun Park [Mon, 27 Feb 2017 02:41:48 +0000 (11:41 +0900)]
[x86/Linux] Clean up ARRAY STUB(s) (dotnet/coreclr#9811)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a2a132767ef30fcc807253978bcc6f92670ebc87
Jan Kotas [Sun, 26 Feb 2017 20:55:49 +0000 (12:55 -0800)]
Delete a bit of dead code (dotnet/coreclr#9801)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9a8106a6fc79649bd8296e84f457d10211eed9db
Pat Gavlin [Sun, 26 Feb 2017 05:10:01 +0000 (21:10 -0800)]
Merge pull request dotnet/coreclr#9789 from mikedn/le-intrinsic
Treat BitConverter.IsLittleEndian as an intrinsic
Commit migrated from https://github.com/dotnet/coreclr/commit/
c5e282295da8c3d17dafce5b84f47e23fec0b607
Eric Mellino [Sun, 26 Feb 2017 02:54:06 +0000 (18:54 -0800)]
Merge pull request dotnet/coreclr#9782 from mellinoe/ilasm-pathlength-fix
Increase the length of allowed parameters in ilasm
Commit migrated from https://github.com/dotnet/coreclr/commit/
3d775151e44099c9711b8558908e842efb4a5608
Jan Kotas [Sun, 26 Feb 2017 02:27:32 +0000 (18:27 -0800)]
Update BitConverter from CoreFX (dotnet/coreclr#9788)
* Update BitConverter from CoreFX
Related to dotnet/coreclr#9701
* Use ThrowHelper
Commit migrated from https://github.com/dotnet/coreclr/commit/
a5e01900f1b3f58006abb349ca2f96e33da47110
Ben Adams [Sun, 26 Feb 2017 00:02:14 +0000 (00:02 +0000)]
Better ArraySegment .ctor tests (dotnet/coreclr#9800)
Commit migrated from https://github.com/dotnet/coreclr/commit/
43647666150a40fd78caf1c58b2cc62e322f1e21
Hyung-Kyu Choi [Sat, 25 Feb 2017 19:24:16 +0000 (04:24 +0900)]
[ARM/CI] Fix arm32 CI git check failure (dotnet/coreclr#9798)
Because layout in corefx binary has been changed, it causes arm CI failure.
And skip arm32 tests because test is not working recently.
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
55382c594f7e1195b6fbff930bea6e1521495e07
Hyung-Kyu Choi [Sat, 25 Feb 2017 18:29:20 +0000 (03:29 +0900)]
[ARM/CI] Update arm CI to sync up with corefx change (dotnet/coreclr#9797)
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
318289269dc8e9ad48d6a8dff6a395d86759bb37
Pat Gavlin [Sat, 25 Feb 2017 18:09:00 +0000 (10:09 -0800)]
Fix _our_GetThreadCycles for clang/xarch.
The `"=A"` constraint in `asm volatile("rdtsc" : "=A"(cycles))` does not work as expected
on AMD64. Instead, the assembly must use an output constraint for both `eax` and `edx`
(i.e. `=a"(lo), "=d"(hi)`).
Commit migrated from https://github.com/dotnet/coreclr/commit/
6be8d477451eb69861cd000330990487ffa4fcc6
Pat Gavlin [Fri, 24 Feb 2017 19:19:27 +0000 (11:19 -0800)]
Refactor isContained().
This changes isContained to terminate early if it is not possible for the node in question
to ever be contained. There are many nodes that are statically non-containable: any node
that is not a value may not be contained along with a small number of value nodes. To avoid
the need for a `switch` to identify the latter, their node kinds have been marked with a
new flag, `GTK_NOCONTAIN`. The checks for identifying non-containable nodes are encapsulated
withing a new function, `canBeContained`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
350020d9b6a2bda08cf2e416d959c1801a717734
Jan Kotas [Sat, 25 Feb 2017 16:09:54 +0000 (08:09 -0800)]
Merge pull request dotnet/coreclr#9791 from dotnet/revert-9231-MinOptsSimplifiedGCtracking
Revert "Simplified MinOpts GC ref tracking."
Commit migrated from https://github.com/dotnet/coreclr/commit/
f6e419fa12f666c77841a8b97781d95cf30cd793
Jan Kotas [Sat, 25 Feb 2017 14:33:11 +0000 (06:33 -0800)]
Revert "Simplified MinOpts GC ref tracking."
Commit migrated from https://github.com/dotnet/coreclr/commit/
a77dae93c1708663e864e77159b16bdaee7c9635
Jan Vorlicek [Sat, 25 Feb 2017 10:08:35 +0000 (11:08 +0100)]
Fix GC hole when exception filter throws unhandled exception (dotnet/coreclr#9785)
The extra Unix specific piece of code in the StackFrameIterator::Filter that
handles the difference in the exception stack unwinding on Unix was not
skipping exception trackers belonging to filter clauses. But that was not
right, since filter funclet stack frames behave the same way on Windows and
Unix. They can be present on the stack when we reach their parent frame if
the filter hasn't finished running yet or they can be gone if the filter
completed running, either succesfully or with unhandled exception.
This change adds skipping of filter funclet related exception trackers at
that place so that the common code processes them.
This fixes the GC hole mentioned in the title that was discovered when
running some tests with GCStress mode 2.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f24ec95e0db5dcae011b394faf8c858c18d1bd65
Mike Danes [Sat, 25 Feb 2017 09:45:02 +0000 (11:45 +0200)]
Treat BitConverter.IsLittleEndian as an intrinsic
Commit migrated from https://github.com/dotnet/coreclr/commit/
9c6657e2339e9889d0680ec72c299ace4f33199b
James Ko [Sat, 25 Feb 2017 06:48:36 +0000 (01:48 -0500)]
Remove `this == null` checks from string.Equals (dotnet/coreclr#9768)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b5b8b1096171ffecfa0a7c1e643cae6cabd16a23
Alex Perovich [Sat, 25 Feb 2017 06:46:59 +0000 (00:46 -0600)]
Move S.Buffers and S.IO sources shared with corert into shared folder (dotnet/coreclr#9778)
Commit migrated from https://github.com/dotnet/coreclr/commit/
532c45a27aa2f804ed43448ef1666beeef6c96ae
Andy Ayers [Sat, 25 Feb 2017 01:51:10 +0000 (17:51 -0800)]
Merge pull request dotnet/coreclr#9756 from AndyAyersMS/RefCountGenericContext
JIT: keep ref count for runtime generic context lookups
Commit migrated from https://github.com/dotnet/coreclr/commit/
46994b9b3dd6de48f581f6d30eff0ad5c4092556
Stephen Toub [Sat, 25 Feb 2017 01:39:44 +0000 (20:39 -0500)]
Use clock_gettime(CLOCK_REALTIME) in DateTime.UtcNow (dotnet/coreclr#9772)
gettimeofday() is currently used in DateTime.UtcNow. Depending on the system, it may have accuracy and precision in line with either clock_gettime(CLOCK_REALTIME) or clock_gettime(CLOCK_REALTIME_COARSE), but in returning its data it's necessarily limited by struct timeval's tv_usec field (microseconds), whereas clock_gettime uses struct timespec which has tv_nsec (nanoseconds). This commit switches to use clock_gettime(CLOCK_REALTIME) to gain the additional precision (though the FILETIME through which the data is returned only supports 100-nsec precision). On my machine, there was no measurable impact to throughput.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3fe022eb723479d0b7acf17856e76a1973668ca6
Ahson Ahmed Khan [Sat, 25 Feb 2017 01:27:54 +0000 (17:27 -0800)]
Merge pull request dotnet/coreclr#9598 from ahsonkhan/OptimizeSpanClear
Optimize span clear
Commit migrated from https://github.com/dotnet/coreclr/commit/
da44463552689930c4d4ead5aa01a437fcbea622
Eric Mellino [Sat, 25 Feb 2017 00:48:50 +0000 (16:48 -0800)]
Increase the length of allowed parameters in ilasm.
The way this code is structured prevents parameters longer than 128 characters
from being passed. This change simply increases that to 1024 characters, although
a more robust change could be made in the future to account for platform differences.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f30a73fd453ecb104889c40a2ea92b1b72e99edb
Aditya Mandaleeka [Sat, 25 Feb 2017 00:37:26 +0000 (16:37 -0800)]
Remove optimizedtls.cpp (dotnet/coreclr#9777)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b927ad12373efd5840be34f011bb3c67ab1e156f
Jan Vorlicek [Fri, 24 Feb 2017 21:47:31 +0000 (22:47 +0100)]
Remove NakedThrowHelper and ifdef-out its callers (dotnet/coreclr#9771)
This change removes NakedThrowHelper function for Unix since it was not used.
It also ifdefs out its upstream callers.
Commit migrated from https://github.com/dotnet/coreclr/commit/
65053424c296f1fecb4c293276771accfe838e62
Andy Ayers [Fri, 24 Feb 2017 21:35:37 +0000 (13:35 -0800)]
review feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
b515aeee2d58c9bcf3d2d2114b8c1df60ce67368
Pat Gavlin [Fri, 24 Feb 2017 21:17:56 +0000 (13:17 -0800)]
Merge pull request dotnet/coreclr#9336 from mikedn/const-fold
Fix incorrect cast in gtFoldExprConst
Commit migrated from https://github.com/dotnet/coreclr/commit/
7a98a60545b94cb0be5e2998109222640a76654b
Ian Hays [Fri, 24 Feb 2017 21:08:17 +0000 (13:08 -0800)]
Merge pull request dotnet/coreclr#9769 from ianhays/filelock_osx
Remove OSX FileStream Lock/Unlock
Commit migrated from https://github.com/dotnet/coreclr/commit/
70d8a4d7b244ec08e5e5aa1a0998a8cbbd35d251
Jan Vorlicek [Fri, 24 Feb 2017 20:29:15 +0000 (21:29 +0100)]
Remove getcontext and setcontext usage (dotnet/coreclr#9759)
It turns out that the getcontext and setcontext that I have used in my stack
oveflow reporting change are not present e.g. on Alpine Linux or on Android.
So I am replacing their usage with RtlCaptureContext and RtlRestoreContext
instead.
I have also found that the addition of the .cfi_adjust_cfa_offset to the
PROLOG_SAVE_REG_PAIR has broken unwinding of all helpers that use
PROLOG_WITH_TRANSITION_BLOCK, because the PROLOG_STACK_ALLOC macro
updates the CFA offset. So I am fixing that by removing the CFA offset
updating from the PROLOG_STACK_ALLOC and adding explicit one to the
ARM64 CallSignalHandlerWrapper.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d97861ce3fecc41b35d4c2e61f60ab7e54eedee8
Bruce Forstall [Fri, 24 Feb 2017 20:28:50 +0000 (12:28 -0800)]
Merge pull request dotnet/coreclr#9732 from hseok-oh/fix_9442
Fix code generation for array length check in legacy JIT
Commit migrated from https://github.com/dotnet/coreclr/commit/
12f575c6043e0316429df7c331121ddaefe30097
Mike Danes [Sat, 4 Feb 2017 10:17:13 +0000 (12:17 +0200)]
Enable DevDiv_377155
Commit migrated from https://github.com/dotnet/coreclr/commit/
63b5b05fdfbac6bbff44c06abf5745b4dc2f145c
Mike Danes [Sat, 4 Feb 2017 10:14:54 +0000 (12:14 +0200)]
Fix incorrect cast in gtFoldExprConst
The fact that an operation is unsigned affects the operation itself but that doesn't mean that the result of the operation is also unsigned. Constants are stored as ssize_t and the node type is TYP_INT so the result has to be sign extended, not zero extended.
Otherwise code that uses the return of IconValue() without first narrowing it to int will behave incorrectly. Such code does exists, even gtFoldExprConst does this when folding shift operations:
uint a = uint.MaxValue;
uint b = 0;
int r = (int)checked(a + b);
Console.WriteLine((r >> 2).ToString("X"));
The above code prints
3FFFFFFF instead of the expected
FFFFFFFF.
This also makes gtFoldExprConst consistent with ValueNumStore::EvalFuncForConstantArgs which evaluates TYP_INT nodes as int and then casts to ssize_t.
Commit migrated from https://github.com/dotnet/coreclr/commit/
176e2c7964846bf5dea22557f0828475deac05e1
Ian Hays [Fri, 24 Feb 2017 19:46:25 +0000 (11:46 -0800)]
Update FileLock/Unlock PNSE message for OSX
Commit migrated from https://github.com/dotnet/coreclr/commit/
10c6689e4cff982b49300428ce7d6627bbbbbdf7
Justin Van Patten [Fri, 24 Feb 2017 19:08:08 +0000 (11:08 -0800)]
Avoid unnecessary branch in CultureAwareComparer (dotnet/coreclr#9767)
* Avoid unnecessary branch in CultureAwareComparer
Determine the CompareOptions up-front instead of during each operation.
Commit migrated from https://github.com/dotnet/coreclr/commit/
dc6b30e1b5d6fb2cb3aee084868c573c204a8338
William Godbe [Fri, 24 Feb 2017 18:54:40 +0000 (10:54 -0800)]
Merge pull request dotnet/coreclr#9749 from wtgodbe/XunitCopyStuff
Use -f instead of -n when copying from Core_Root in runtest.sh
Commit migrated from https://github.com/dotnet/coreclr/commit/
60969edc642693e82f34f091399aad55a86692b5
Ian Hays [Thu, 23 Feb 2017 22:46:15 +0000 (14:46 -0800)]
Remove OSX FileStream Lock/Unlock
OSX doesn't support usage of both fcntl and flock. Since we're already using one in FileShare for the entire file, we cannot enable partial file locking like we do on other Unix platforms. The alternative is to throw a PNSE and suggest using FileShare on the whole file instead.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0daa63e9ed40323b6f248ded8959530ea94f19aa
Stephen Toub [Fri, 24 Feb 2017 18:35:48 +0000 (13:35 -0500)]
Merge pull request dotnet/coreclr#9766 from discostu105/patch-1
fix typo in sos_md.h
Commit migrated from https://github.com/dotnet/coreclr/commit/
e75f17e47b874354f40dd038821fc3e06d47821b
Sean Gillespie [Fri, 24 Feb 2017 18:12:26 +0000 (10:12 -0800)]
[Local GC] Move workstation GC DAC globals to a struct shared between GC and DAC (dotnet/coreclr#9255)
* [Local GC] Move workstation GC DAC globals to a struct shared between
the GC and the DAC
* (Some) code review feedback and bug fixes for issues found while debugging on OSX
* Address some code review feedback:
1. Make g_gcDacGlobals a pointer and dacvar on the VM side, so
that publishing the GC dac vars is done atomically (through
a pointer assignment). This fixes a race that Noah noticed.
2. Remove the requirement for the GC's generation class struct
to be known at compile-time, by using a dacvar as the size
of the generation class at run-time (for pointer arithmetic)
3. Move all DAC-interesting fields to be at the start of GC
internal classes, so that the DAC does not need to know the
size or exact layout of the class past the fields it cares
about.
* Split the definition of the size of several arrays across the SOS/DAC and GC/DAC interfaces, and add static asserts that they are the same
* Repair the Windows Release build
* Implement the GC DAC scheme for Server GC and eliminate the duplicate GC dac vars
* Some work
* Decouple use of the GC generation table from a write barrier by having the EE store a copy of the global during initialization
* Actually make it work with server GC
* Checkpoint
* Checkpoint where everything works
* Code cleanup
* Fix debugger test failures
* Additional code cleanup
* Address code review feedback by adding a static assert and standardizing the way that we iterate over the generation table
* Repair the Windows x86 build
* Revert "Decouple use of the GC generation table from a write barrier by having the EE store a copy of the global during initialization"
This reverts commit dotnet/coreclr@
573f61a16b4fa8c2fc4c568c0b968a921230f31c.
* Revert "Repair the Windows x86 build"
This reverts commit dotnet/coreclr@
188c22d87e1d65abf00ab8fa28f46ad607a9028f.
* Partial revert, move `generation_table` back the global namespace for a single-proc allocation helper
* Fix a debugger test failure
* Repair crash dump scenarios
Commit migrated from https://github.com/dotnet/coreclr/commit/
6f6fda958dac38896abe9487def2242add822809
Christoph Neumüller [Fri, 24 Feb 2017 14:52:11 +0000 (15:52 +0100)]
fix typo in sos_md.h
Commit migrated from https://github.com/dotnet/coreclr/commit/
fb21c38e5a050f191dbdad64be70fab79d4e141c
Jonghyun Park [Fri, 24 Feb 2017 14:48:58 +0000 (23:48 +0900)]
[Linux/ARM,ARM64] Fix undefined FixContextHandler issue (dotnet/coreclr#9755)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3392356945aabd5a3ebac5317ff4a0e0361dc9ad
Sujin Kim [Fri, 24 Feb 2017 14:43:15 +0000 (23:43 +0900)]
Fix segmentation fault when using ZapImage::PrintStats() (dotnet/coreclr#9731)
Currently, ZapImage::PrintStats is not used anywhere. But I want to get detailed informations about Native Image(ni.dll) components.
So I just used ZapImage::PrintStats when called ZapImage::SaveImage. After that I met the segmentation fault likes dotnet/coreclr#9680.
I found the reason for this issue is accessing the null pointer to get sizes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e876e8147d06a213f562021a4d02a5a60ba63c99
John Gorter [Fri, 24 Feb 2017 14:41:42 +0000 (15:41 +0100)]
typo in CMakeLists.txt (dotnet/coreclr#9763)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7716164c1d69b10b32a46060ec55d17d77ff5bd8
Stephen Toub [Fri, 24 Feb 2017 12:43:36 +0000 (07:43 -0500)]
Merge pull request dotnet/coreclr#9738 from stephentoub/ordinalignorecase_hashing
Tweak OrdinalComparer for OrdinalIgnoreCase
Commit migrated from https://github.com/dotnet/coreclr/commit/
9d066ad753629d57d1d263851d6d6c7bd1674e9c
Hanjoung Lee [Fri, 24 Feb 2017 07:02:21 +0000 (16:02 +0900)]
[x86/Linux] Initial patch for EH funclet (dotnet/coreclr#9601)
- Generate a simple EH funclet frame and support SP-based stack unwinding for funclets.
- Introduce assembly helpers : CallEHFunclet and CallEHFilterFunclet
Commit migrated from https://github.com/dotnet/coreclr/commit/
77f2ad4c07b24fcfe1298dd7cd260876ef46e6c3
Bruce Forstall [Fri, 24 Feb 2017 06:34:58 +0000 (22:34 -0800)]
Merge pull request dotnet/coreclr#9758 from seanshpark/fixx86break
Fix build break for !FEATURE_FIXED_OUT_ARGS
Commit migrated from https://github.com/dotnet/coreclr/commit/
687e0fbfe1b753653968308d1cd17c079c5a87fc
Sivarv [Fri, 24 Feb 2017 04:35:39 +0000 (20:35 -0800)]
Merge pull request dotnet/coreclr#9723 from fiigii/is4byte
Simplify and streamline Is4ByteAVXInstruction() and Is4ByteSSE4Instruction() functions
Commit migrated from https://github.com/dotnet/coreclr/commit/
93c35cd5dd3ee76460ec31948f0d4d222cdbe70d
Stephen Toub [Thu, 23 Feb 2017 18:15:27 +0000 (13:15 -0500)]
Address PR feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
109feb786bf010b2c34a78e6219be763656c9e65
Stephen Toub [Thu, 23 Feb 2017 16:25:03 +0000 (11:25 -0500)]
Improve CompareOrdinalIgnoreCaseHelper by removing return from loop
Commit migrated from https://github.com/dotnet/coreclr/commit/
d2eed087d4e74361ef7fe71bc7b10e1d8a3edc26
Stephen Toub [Thu, 23 Feb 2017 16:37:23 +0000 (11:37 -0500)]
Strongly type StringComparer static comparer fields
Commit migrated from https://github.com/dotnet/coreclr/commit/
4e85fdd61991a898f2bd208df929a005c26b8805
Stephen Toub [Thu, 23 Feb 2017 14:28:30 +0000 (09:28 -0500)]
Split OrdinalIgnoreCaseComparer from OrdinalComparer
They're both used very frequently, and we can eliminate the branches on checking _ignoreCase from every operation.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a15b54477fb9503d2787b751e2c0b25c12becf37
Jan Kotas [Fri, 24 Feb 2017 02:51:03 +0000 (18:51 -0800)]
Reject byref-like object in FormatterServices.GetUninitializedObject (dotnet/coreclr#9754)
Fixes dotnet/coreclr#9739
Commit migrated from https://github.com/dotnet/coreclr/commit/
5957f2dde0f90c2bdaa4f0a83339c87140cc657b
Jonghyun Park [Fri, 24 Feb 2017 02:01:10 +0000 (11:01 +0900)]
[x86/Linux] Enable FEATURE_ARRAYSTUB_AS_IL (dotnet/coreclr#9752)
* [x86/Linux] Enable FEATURE_ARRAYSTUB_AS_IL
* Move FeatureStubsAsIL into Windows-specific block
Commit migrated from https://github.com/dotnet/coreclr/commit/
70b21c84b90aa2c37bb7366ea175f59a03512ae4
SaeHie Park [Fri, 24 Feb 2017 01:03:26 +0000 (10:03 +0900)]
Fix build break for !FEATURE_FIXED_OUT_ARGS
Commit migrated from https://github.com/dotnet/coreclr/commit/
3f21d76a5466838accb8e15cfa9c55a89743adf2
Bruce Forstall [Fri, 24 Feb 2017 01:03:58 +0000 (17:03 -0800)]
Merge pull request dotnet/coreclr#9681 from mskvortsov/ryujit-arm32-reload
[RyuJIT/ARM32] Fix helper kill mask and call target consuming
Commit migrated from https://github.com/dotnet/coreclr/commit/
f9749b431bf74c00b7e346a1f2e80e2032fd2b21
Stephen Toub [Fri, 24 Feb 2017 00:43:58 +0000 (19:43 -0500)]
Use GetSystemTimePreciseAsFileTime if available in DateTime.UtcNow (dotnet/coreclr#9736)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5ec5c2f859f8ff1dc99a2bb95b640b82d2937cc8
Tanner Gooding [Fri, 24 Feb 2017 00:36:20 +0000 (16:36 -0800)]
Merge pull request dotnet/coreclr#9717 from tannergooding/math-intrinsics2
Updating codegenxarch to support single-precision CORINFO_INTRINSIC_Sqrt
Commit migrated from https://github.com/dotnet/coreclr/commit/
6e494d0068d17b3692c88ab4247ca3c607a9b618
Andy Ayers [Sat, 18 Feb 2017 04:51:59 +0000 (20:51 -0800)]
JIT: keep ref count for runtime generic context lookups
Keep a ref count for runtime generic context lookups, and track when
an inlinee requires a runtime lookup but then ignores the resulting
context. Only report/keep the context alive if there are known uses.
This pattern happens frequently in inlined generic code that uses
type tests to extract properties of types.
Addresses dotnet/coreclr#1691.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5a1e02cd6f056cebdd1c240d400ac7a34234d43a
Sivarv [Fri, 24 Feb 2017 00:08:41 +0000 (16:08 -0800)]
Merge pull request dotnet/coreclr#9742 from sivarv/singleField
Enable promotion of structs containing fields of structs with a single pointer-sized scalar type field.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d3ee9301e88c6fea43072ac59fc451c7685a872a
Andy Ayers [Fri, 24 Feb 2017 00:08:23 +0000 (16:08 -0800)]
Merge pull request dotnet/coreclr#9748 from AndyAyersMS/FixJitTestDir
Move jit tests to directory with proper casing
Commit migrated from https://github.com/dotnet/coreclr/commit/
4def9e5bd59029fe9f84a260268ba12c25b5fb83
wtgodbe [Thu, 23 Feb 2017 22:29:41 +0000 (14:29 -0800)]
Use -f instead of -n when copying from Core_Root in runtest.sh
Commit migrated from https://github.com/dotnet/coreclr/commit/
3eab59fc71cf9fc99f0d555d41974e310465c54b
Alex Perovich [Thu, 23 Feb 2017 23:20:04 +0000 (17:20 -0600)]
Merge pull request dotnet/coreclr#9726 from alexperovich/codeFormat
Run dotnet/codeformatter on S.P.CoreLib sources.
Commit migrated from https://github.com/dotnet/coreclr/commit/
68f72dd2587c3365a9fe74d1991f93612c3bc62a
Andy Ayers [Thu, 23 Feb 2017 22:53:00 +0000 (14:53 -0800)]
Add jit test project checker as jit test (dotnet/coreclr#9721)
Add the tool used to fix/repair projects as a test case. It will
fail with an error code if any project file in the jit test subtree
needs fixing.
This test requires CORE_ROOT to point at the test overlay and
that directory be rooted under the repo (other test cases already
have similar requirements).
CodeGenBringUp tests are noted as needing fixes, but are accounted
for under the category of "deferred fixes".
Commit migrated from https://github.com/dotnet/coreclr/commit/
cdea3db0927e279c6d9bd6531bff84e4cbd94eaa
Andy Ayers [Thu, 23 Feb 2017 22:52:10 +0000 (14:52 -0800)]
JIT: defer setting outgoing args size until after optimization (dotnet/coreclr#9683)
For fixed out args ABIs, the jit currently computes the size of the
out arg area during morph, as it encounters calls that must pass arguments
via the stack.
Subsequently, the optimizer may delete calls, either because they are
pure and the results are unused, or because they are conditional and the
guarding predicates are resolved by the optimizer in such a way that
the call is no longer reachable.
In particular if all the calls seen by morph are subsequently removed by
the optimizer, the jit may generate a stack frame that it never uses and
doesn't need. If only some calls are removed then the stack frame may end
up larger than necessary.
One motivating example is the inlining of a shared generic method that
ignores its generic context parameter. The caller typically must invoke a pure
helper to determine the proper argument to pass. Post inline the call's result
is unused, and the helper call is deleted by the optimizer.
This change defers the outgoing arg size computation until fgSimpleLowering,
which runs after optimization. The code in morph now simply records the
needed size for each call in the associated fgArgInfo.
As before, the outgoing arg size computation ignores fast tail calls, since
they can use the caller-supplied scratch area for memory arguments.
The jit may introduce helper calls after optimization which could seemingly
invalidate the out args area size. The presumption here is that these calls
are carefully designed not to use the caller-supplied scratch area. The
current code makes the same assumption.
This change introduces some unanticipated diffs. Optcse estimates the
frame size to decide how aggressive it should be about cses of local
variable references. This size estimate included the out args area, which
appears to be something of an oversight; there are no cse opportunities
in this area and the offsets of the other local variables are not impacted
by the size of this area. With this change the out args area size is seen
as zero during optimization and so the cse strategy for a method may be
different.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eaf5835d6a0e914edfdbb6ad1a8af2660e87a08c
Pat Gavlin [Thu, 23 Feb 2017 22:20:45 +0000 (14:20 -0800)]
Merge pull request dotnet/coreclr#9582 from pgavlin/vzeroupper_x86_epilog
Do not report FP restores in x86 epilogs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0abb98f1dc88845c82722bd48b4127ed1c728534
Brian Sullivan [Thu, 23 Feb 2017 21:56:09 +0000 (13:56 -0800)]
Merge pull request dotnet/coreclr#9454 from mikedn/cgtun-to-cne
Morph (x GT_GT.unsigned 0) into (x GT_NE 0)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f47c6fd43ba50cd59fa77e523dbc562df7f98c2c
Andy Ayers [Thu, 23 Feb 2017 21:46:20 +0000 (13:46 -0800)]
Move jit tests to directory with proper casing
Closes dotnet/coreclr#9747.
Commit migrated from https://github.com/dotnet/coreclr/commit/
891773bc76162439e8fe8fd06f3bb7227879548a
Alex Perovich [Wed, 22 Feb 2017 23:23:44 +0000 (15:23 -0800)]
Run codeformatter on S.P.CoreLib sources
Commit migrated from https://github.com/dotnet/coreclr/commit/
ea9bee5ac2f96a1ea6b202dc4094b8d418d9209c
Alex Perovich [Wed, 22 Feb 2017 23:23:25 +0000 (15:23 -0800)]
Manual change to make codeformatter work
Commit migrated from https://github.com/dotnet/coreclr/commit/
2ace58ac2bba14ffd469ecb89f972b8e9b8fd61d