Mike Danes [Mon, 9 May 2016 22:01:12 +0000 (01:01 +0300)]
Optimize integer div/mod by const power of 2 in lowering
Optimizing GT_DIV/GT_UDIV/GT_MOD/GT_UMOD by power of 2 in codegen is problematic because the xarch DIV instruction has special register requirements. By the time codegen decides to perform the optimization the rax and rdx registers have been already allocated by LSRA even though they're not always needed (as it happens in the case of unsigned division where CDQ isn't used).
Since the JIT can't represent a CDQ instruction in its IR an arithmetic shift (GT_RSH) has been instead to extract the dividend sign. xarch's SAR is larger than CDQ but it has the advantage that it doesn't require specific registers. Also, arithmetic shifts are available on architectures other than xarch.
Example: method "static int foo(int x) => x / 8;" is now compiled to
mov eax, ecx
mov edx, eax
sar edx, 31
and edx, 7
add edx, eax
mov eax, edx
sar eax, 3
instead of
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
As a side-effect of this change the optimization now also works when the divisor is too large to be contained. Previously this wasn't possible because the divisor constant needed to be modified during codegen but the constant was already loaded into a register.
Example: method "static ulong foo(ulong x) => x /
4294967296;" is now compiled to
mov rax, rcx
shr rax, 32
whereas before a DIV instruction was used.
This change also fixes an issue in fgShouldUseMagicNumberDivide. The optimization that is done in lower can handle negative power of 2 divisors but fgShouldUseMagicNumberDivide handled those cases because it didn't check the absolute value of the divisor.
Example: method "static int foo(int x) => return x / -2;" is now compiled to
mov eax, ecx
mov edx, eax
shr edx, 31
add edx, eax
sar edx, 1
mov eax, edx
neg eax
instead of
mov eax, 0x7FFFFFFF
imul edx:eax, ecx
mov eax, edx
sub eax, ecx
mov edx, eax
shr edx, 31
add eax, edx
Commit migrated from https://github.com/dotnet/coreclr/commit/
d3647c10d7f01daa1f6b38fd601cd9606a08b687
Mike Danes [Sat, 14 Nov 2015 08:46:20 +0000 (10:46 +0200)]
Add tests for integer div/mod by const
Commit migrated from https://github.com/dotnet/coreclr/commit/
ade68f00f0dff0d0727bb65bae5cf9db8dbb5db5
Bruce Forstall [Sat, 7 May 2016 15:52:07 +0000 (08:52 -0700)]
Merge pull request dotnet/coreclr#4742 from lemmaa/fix-unit-test-script
Fix 'runtest.sh' script
Commit migrated from https://github.com/dotnet/coreclr/commit/
59a9008ddbf7ec8b83d1950bf51ffa3b09c372b5
Sivarv [Sat, 7 May 2016 15:20:57 +0000 (08:20 -0700)]
Merge pull request dotnet/coreclr#4836 from sivarv/simdPromotion
Mark simd type vars as lvRegStruct accurately.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ff7a57969edbb6da4983e823b690ca2c124e15d6
Rahul Kumar [Sat, 7 May 2016 14:21:37 +0000 (07:21 -0700)]
Fixes multidim array Get Accessor for enum datatype (dotnet/coreclr#4808)
Commit migrated from https://github.com/dotnet/coreclr/commit/
417a98fb0f82b1c05010cdc2c41eb5056f14541c
James Ko [Sat, 7 May 2016 14:20:18 +0000 (10:20 -0400)]
Use Buffer.BlockCopy in System.Reflection.Emit (dotnet/coreclr#4812)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8eec3c5ac8975734836c333187a2724d50bd9af9
Thomas Klausner [Sat, 7 May 2016 14:14:55 +0000 (16:14 +0200)]
Fix a typo in NetBSD documentation. (dotnet/coreclr#4841)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8bee2889882af4826e1955e3a64a060ec9e41063
James Ko [Sat, 7 May 2016 14:14:06 +0000 (10:14 -0400)]
Buffer.BlockCopy: Avoid double-typechecks for arrays of same type (dotnet/coreclr#4807)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9a67ab7affc527168578a6749410c64ec3233f55
Jan Vorlicek [Sat, 7 May 2016 08:47:59 +0000 (10:47 +0200)]
Remove FEATURE_HOSTED_BINDER definition (dotnet/coreclr#4838)
The FEATURE_HOSTED_BINDER is always on so remove it from all the sources.
Commit migrated from https://github.com/dotnet/coreclr/commit/
29fcfe2938e3890cd6fb302d2f8c6dabc1a09fc4
sivarv [Fri, 6 May 2016 21:36:58 +0000 (14:36 -0700)]
Mark simd type vars as lvRegStruct accurately.
Commit migrated from https://github.com/dotnet/coreclr/commit/
60d4c09a23dbc0e1ef5ccc348a05f6545bb6472d
Pat Gavlin [Fri, 6 May 2016 23:32:18 +0000 (16:32 -0700)]
Merge pull request dotnet/coreclr#4803 from pgavlin/RootBinDir
Add a `bindir` parameter to build.sh.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0ef1fc9aa3d65d41b5b9c8cd4911a1f8cdece049
Pat Gavlin [Fri, 6 May 2016 23:23:26 +0000 (16:23 -0700)]
Merge pull request dotnet/coreclr#4831 from pgavlin/gh2300
Move b12011 into testsUnsupportedOutsideWindows.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fbaa0827781be897a51b5d529cef305e569ca5cc
Russ Keldorph [Fri, 6 May 2016 22:57:36 +0000 (15:57 -0700)]
Merge pull request dotnet/coreclr#4826 from RussKeldorph/vararg
Move Windows-only vararg/arglist tests to the appropriate exclusion file
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef04d7d2083c8e6fb8f3cf6294f2ae06928dae10
Andy Ayers [Fri, 6 May 2016 22:22:03 +0000 (15:22 -0700)]
Merge pull request dotnet/coreclr#4815 from AndyAyersMS/LegacyPolicyInlineLimit
Inliner: add JitInlineLimit check to LegacyPolicy under debug
Commit migrated from https://github.com/dotnet/coreclr/commit/
5cdc97b5c80fe67f0ce06aced25b9d046e12a574
Maoni Stephens [Fri, 6 May 2016 21:53:23 +0000 (14:53 -0700)]
Merge pull request dotnet/coreclr#4770 from Maoni0/affi
enable affinity for GC threads and some bug fixes
Commit migrated from https://github.com/dotnet/coreclr/commit/
726d1a3244b80bf963fd0d51e57d4bb90af1e426
Jan Vorlicek [Fri, 6 May 2016 21:51:25 +0000 (23:51 +0200)]
Fix Windows x86 exception handling issue (dotnet/coreclr#4830)
This change fixes an exception handling issue that happens on x86 on Windows
when exception is raised in System.RuntimeType.MakeGenericType.
The problem was caused by GCPROTECT_HOLDER macro in RuntimeTypeHandle::GetTypeByName
that causes popping of GCFrame (and zeroing its m_next field) that's in the middle of the thread's frames list during
the stack unwinding.
That breaks the list and when UnwindFrames happen later and tries to walk the stack, the StackFrameIterator::NextRaw
asserts when checking the validity of the list.
The fix is to move the keepAlive to the managed caller of the RuntimeTypeHandle::GetTypeByName QCall, which removes
the need for the GCPROTECT_HOLDER.
Since it was the only usage of that holder and of the underlying FrameWithCookieHolder class, I've removed those.
In addition to that, I've modified COMModule::GetType and AssemblyNative::GetType to use the same pattern, since
they could also suffer from the problem the GCPROTECT_HOLDER was attempting to fix.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3c7e477ac50e50b616a64c72efb81388c045e63f
Sejong Oh [Fri, 6 May 2016 21:25:40 +0000 (14:25 -0700)]
Merge pull request dotnet/coreclr#4690 from sejongoh/use_rax_for_ret_buf
Return RetBuf address via RAX for Windows 64
Commit migrated from https://github.com/dotnet/coreclr/commit/
2308fbf2253abef97628bde2a04d8fb910ce1018
Sivarv [Fri, 6 May 2016 21:17:50 +0000 (14:17 -0700)]
Merge pull request dotnet/coreclr#4795 from sivarv/simdret
[x64 Unix] Avoid SIMD types returned in two return registers from requiring to go through memory.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b3be35f379519120acd8427485524e92cf911918
Kyungwoo Lee [Fri, 6 May 2016 20:45:36 +0000 (13:45 -0700)]
Merge pull request dotnet/coreclr#4791 from kyulee1/fasttailcall
ARM64: Enable Fast Tail Call
Commit migrated from https://github.com/dotnet/coreclr/commit/
06bc225c0117bbfd9ff31020e1f377ef33a561da
Kyungwoo Lee [Wed, 4 May 2016 20:26:33 +0000 (13:26 -0700)]
ARM64: Enable Fast Tail Call
Fixes https://github.com/dotnet/coreclr/issues/4420
Like x64, enable fast tail call but tail call opt is still off.
This means explicit tail call is converted to epilog + jmp IP0.
Tail call recursive/tail call via helper is still not enabled yet.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a9eee0c96fdb4eb8cc7c0312bb50bb923db177f4
Pat Gavlin [Fri, 6 May 2016 20:08:19 +0000 (13:08 -0700)]
Move b12011 into testsUnsupportedOutsideWindows.
This test requires COM interop.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4e0417947d47a5c632494353b943d44c33abdcc8
Pat Gavlin [Thu, 5 May 2016 22:13:40 +0000 (15:13 -0700)]
Add a `bindir` parameter to build.sh.
This parameter can be used to redirect the usual output path from
`./bin` to a different directory.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0e79232129f3a27305bc24141ff13dd54bc61e45
Bruce Forstall [Fri, 6 May 2016 19:48:04 +0000 (12:48 -0700)]
Merge pull request dotnet/coreclr#4814 from BruceForstall/FixGcRefAssert
Fix GC ref frame offset range assert
Commit migrated from https://github.com/dotnet/coreclr/commit/
4c246c5b8182d284ded69c4a5bc48e09711f2438
Bruce Forstall [Fri, 6 May 2016 19:47:11 +0000 (12:47 -0700)]
Merge pull request dotnet/coreclr#4811 from BruceForstall/FixFunctionTrace
Fix COMPlus_JitFunctionTrace=1 to work better with NYI
Commit migrated from https://github.com/dotnet/coreclr/commit/
f45cfa6dab8c5e40ebf613d98d1abf0a326727a5
Bruce Forstall [Fri, 6 May 2016 19:09:12 +0000 (12:09 -0700)]
Merge pull request dotnet/coreclr#4822 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
17549875be841b032770e2e11ad027986e44a549
Maoni0 [Wed, 4 May 2016 01:29:46 +0000 (18:29 -0700)]
enable affinity and numa for GC and some bug fixes
double the threshold for balancing onto a remote NUMA node - this was proven to be best with the asp.net benchmark.
enable cpu group
Commit migrated from https://github.com/dotnet/coreclr/commit/
73dfed727374982f0ce8804d82d9ca993a4b8bf1
Andy Ayers [Fri, 6 May 2016 18:45:46 +0000 (11:45 -0700)]
Merge pull request dotnet/coreclr#4806 from AndyAyersMS/FixInlineDump
Fix inline dump format issue
Commit migrated from https://github.com/dotnet/coreclr/commit/
1d561e7878288c109fab5183447d50b869fe8663
Russ Keldorph [Fri, 6 May 2016 14:58:47 +0000 (07:58 -0700)]
Move Windows-only vararg/arglist tests to the appropriate exclusion file
Our position on vararg/arglist is that it is supported on Windows only, so
I'm repurposing dotnet/coreclr#1440 to simply express that position in the exclusion
files rather than removing the tests.
Fixes dotnet/coreclr#1440
Commit migrated from https://github.com/dotnet/coreclr/commit/
6a267e9e8ee18589fbcc73db3d19405126d9533b
John Chen [Fri, 6 May 2016 06:59:13 +0000 (23:59 -0700)]
Merge pull request dotnet/coreclr#4797 from JohnChen0/master
Remove an assert in AssemblySpec::EmitToken
Commit migrated from https://github.com/dotnet/coreclr/commit/
9269fceccf0f134d312189f16d04037fede9d276
Bruce Forstall [Fri, 6 May 2016 03:21:57 +0000 (20:21 -0700)]
Merge pull request dotnet/coreclr#4810 from BruceForstall/Fix4666
Mark EDX as trashed by the no-gc helper calls
Commit migrated from https://github.com/dotnet/coreclr/commit/
a6c18c6d3c499087ac43cdb3bced708164600425
Bruce Forstall [Fri, 6 May 2016 03:07:13 +0000 (20:07 -0700)]
Merge pull request dotnet/coreclr#4819 from BruceForstall/FixRyujitX86CheckedTestRun
Disable tests which fail in a RyuJIT/x86 Checked build test run
Commit migrated from https://github.com/dotnet/coreclr/commit/
f4256993552b302c72df0afbc425ff5c05a9b208
Matt Ellis [Fri, 6 May 2016 01:27:21 +0000 (18:27 -0700)]
Merge pull request dotnet/coreclr#4821 from ellismg/fix-unix-builds
Fix conditional in Unix build definition
Commit migrated from https://github.com/dotnet/coreclr/commit/
bf61fa87d857381dfeeca258d1d366d62faf39be
Matt Ellis [Fri, 6 May 2016 01:12:44 +0000 (18:12 -0700)]
Fix conditional in Unix build definition
Commit migrated from https://github.com/dotnet/coreclr/commit/
cc284fb9c0ac4c2efbf1395efdbe8d8e0978dc92
Bruce Forstall [Fri, 6 May 2016 00:57:42 +0000 (17:57 -0700)]
Disable tests which fail in a RyuJIT/x86 Checked build test run
Commit migrated from https://github.com/dotnet/coreclr/commit/
0c29217d7f0de620248c30d2db92ce29af6858ef
Bruce Forstall [Thu, 5 May 2016 23:44:24 +0000 (16:44 -0700)]
Fix COMPlus_JitFunctionTrace=1 to work better with NYI
Commit migrated from https://github.com/dotnet/coreclr/commit/
4eb10dbf742604906019931ac4b1540b451f7322
Bruce Forstall [Fri, 6 May 2016 00:21:27 +0000 (17:21 -0700)]
Fix GC ref frame offset range assert
In emitSetFrameRangeGCRs(), on x86, there is the following assert:
assert(offsHi < 0);
This is saying that the highest offset of a stack frame gc reference
is negative w.r.t. the frame pointer. This is not quite true: the
highest offset is exclusive of the range (the lowest offset is inclusive).
I found a test case where the 'this' pointer, a gc ref, was located
immediately below the frame pointer, in range [ebp-4,ebp), so offsHi==0.
The reason we don't hit this more is because this assert is only in
the JitDump code (under #ifdef DEBUG and 'if (verbose)'). (This
also seems wrong.)
I changed the assert to (offsHi <= 0).
Commit migrated from https://github.com/dotnet/coreclr/commit/
16ca4a20ddd03479e101cea0d74705f1a2791ae5
Jeremy Kuhne [Fri, 6 May 2016 00:20:27 +0000 (17:20 -0700)]
This change ports the support files from NetFxDev1. It doesn't change behavior yet. Adding a feature for the app context switch for path compat as we don't intend to use it in core.
[tfs-changeset: 1602284]
Commit migrated from https://github.com/dotnet/coreclr/commit/
2ae90a015933dc85192b73c2bf8361cf59cef035
Andy Ayers [Thu, 5 May 2016 23:48:53 +0000 (16:48 -0700)]
Inliner: add JitInlineLimit check to LegacyPolicy under debug
Adds the ability to limit the number of inlines done by the LegacyPolicy.
Useful in trying to binary search for inlines that cause correctness
issues.
This limit impacts inlining in all methods, so effective isolation may
also require use of JitNoInlineRange to hone in on the root method that
is the source of problems.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0feeb4ff48a6f0beb614ee2e3d3604e85dfbca27
Bruce Forstall [Thu, 5 May 2016 23:35:44 +0000 (16:35 -0700)]
Mark EDX as trashed by the no-gc helper calls
Fixes dotnet/coreclr#4666
Commit migrated from https://github.com/dotnet/coreclr/commit/
f6796220664d3bfa4ea42d2ab86cf5a6e2edeae9
Andy Ayers [Thu, 5 May 2016 21:51:33 +0000 (14:51 -0700)]
Fix inline dump format issue
Lost some implict casts to float when I updated SIZE_SCALE to an enum
constant, so now make the casts explicit.
Just impacts dump output.
Also, add a newline to LegacyPolicy dump to keep messages distinct.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9614277d4fb85970871678601c9ffe0c4cbc6a97
Sejong Oh [Fri, 29 Apr 2016 21:05:16 +0000 (14:05 -0700)]
Return RetBuf address via RAX for Windows 64
The AMD64 native calling convention requires return buffer address to be
returned by callee in RAX. This changeset makes JIT follow this rule.
Especially, in case that a managed method returns a struct value to its
native caller, the caller reads a pointer to the return value from RAX.
Asm diffs show expected differences such as 'mov rax, reg' at the end of
functions and some different register assignments.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9b54e5ebee7838b3eb9c7cacbd9f66ac78dfb968
Jarret Shook [Thu, 5 May 2016 21:18:17 +0000 (14:18 -0700)]
Merge pull request dotnet/coreclr#4800 from jashook/x86_ci_fix
Fix x86 netci changes to build correctly.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3ddd9c43821bf617621f87d8d1519229e7d3b789
sivarv [Thu, 5 May 2016 01:32:46 +0000 (18:32 -0700)]
Avoid SIMD type return values from requiring to go through
memory for returning.
Commit migrated from https://github.com/dotnet/coreclr/commit/
75a96376d9b6760b63eefbc245572e9274eeb347
jashook [Thu, 5 May 2016 15:54:21 +0000 (08:54 -0700)]
Fixup netci changes to build correctly.
Also more verbosely show which jit and arch the job is.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5aca558718d3d57686bc301315034e76324d242c
Bruce Forstall [Thu, 5 May 2016 16:01:57 +0000 (09:01 -0700)]
Merge pull request dotnet/coreclr#4782 from BruceForstall/NyiLongExTree
RyuJIT/x86: convert SBCG to NYI for multi-level expression trees
Commit migrated from https://github.com/dotnet/coreclr/commit/
3496df6d9dbfa5fded802ab90b99a9545a43bc74
Davis Goodin [Thu, 5 May 2016 14:28:41 +0000 (09:28 -0500)]
Merge pull request dotnet/coreclr#4792 from dagood/remove-core_root-workaround
Remove CORE_ROOT workaround
Commit migrated from https://github.com/dotnet/coreclr/commit/
b0bbac3d22969796e0c424c22242f255c1cbe044
Sung-Jae Lee [Thu, 5 May 2016 14:08:27 +0000 (23:08 +0900)]
Following the review comments
Commit migrated from https://github.com/dotnet/coreclr/commit/
9290b53960f368ab9b6356ad029cb3cab69a12c6
John Chen (CLR) [Thu, 5 May 2016 06:11:15 +0000 (23:11 -0700)]
Remove an assert in AssemblySpec::EmitToken
AssemblySpec::EmitToken has a PRECONDITION that prohibits emitting AssemblyRef
tokens to WinMD files, except inside CrossGen. However, there are scenarios,
such as XML serialization, that need to emit such tokens. Thus this PRECONDITION
is removed.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c377b53dca090869ea10d95fe7098e70ac3c0847
Jarret Shook [Thu, 5 May 2016 05:08:39 +0000 (22:08 -0700)]
Merge pull request dotnet/coreclr#4790 from jashook/x86_netci_two
Add ryujit x86 pr trigger.
Commit migrated from https://github.com/dotnet/coreclr/commit/
22738816cf92bd763c3e993c8acdef0640f9428c
Rama krishnan Raghupathy [Thu, 5 May 2016 02:30:08 +0000 (19:30 -0700)]
Merge pull request dotnet/coreclr#4767 from ramarag/VSD_ResolveWorker_indirection
[Arm64] Initialize indirection cell for delegates
Commit migrated from https://github.com/dotnet/coreclr/commit/
f5c775dd83954f2e815e8c1b3adc8fc2cb7bfefb
Rama Krishnan Raghupathy [Wed, 4 May 2016 01:16:47 +0000 (18:16 -0700)]
[Arm64] Initialize indirection cell for delegates
Commit migrated from https://github.com/dotnet/coreclr/commit/
08b010a6cbd7803d178dd42da72d0aab072da9dc
Aditya Mandaleeka [Thu, 5 May 2016 01:50:00 +0000 (18:50 -0700)]
Merge pull request dotnet/coreclr#4765 from adityamandaleeka/array_alloc_bounds_check
Add fwrapv compile option
Commit migrated from https://github.com/dotnet/coreclr/commit/
dc71a169507810c1dafad6fa20dc3881c6e4d4ec
Rahul Kumar [Thu, 5 May 2016 01:25:37 +0000 (18:25 -0700)]
Merge pull request dotnet/coreclr#4780 from mkborg/fix_windows_linuxmscorlib_arm_build
Fix Windows 'linuxmscorlib arm' build
Commit migrated from https://github.com/dotnet/coreclr/commit/
b889f007480b6818a5cb144e726d3e2940fd5cd3
Mike McLaughlin [Thu, 5 May 2016 00:42:09 +0000 (17:42 -0700)]
Remove O_RDWR from sem_open and better error codes on failure (dotnet/coreclr#4772)
Remove O_RDWR from sem_open and better error codes on failure
Commit migrated from https://github.com/dotnet/coreclr/commit/
98577b986fbb79b74088a5ab3804a3ff00efbe7f
Andy Ayers [Thu, 5 May 2016 00:09:12 +0000 (17:09 -0700)]
Merge pull request dotnet/coreclr#4763 from AndyAyersMS/InlineIntoControlExamples
Add some tests for optimization of booleans
Commit migrated from https://github.com/dotnet/coreclr/commit/
7995c7db6626d77a2deac664a1557157c89271fc
Bruce Forstall [Wed, 4 May 2016 16:41:57 +0000 (09:41 -0700)]
RyuJIT/x86: convert SBCG to NYI for multi-level expression trees
In general, we decompose longs by walking the tree bottom-up. So, e.g.,
we'll decompose 'add' as follows:
+ (gt_long(lo1, hi1), gt_long(lo2, hi2))
=>
gt_long (+ (lo1, lo2), +Hi (hi1, hi2))
But what if lo1 is '+' and hi1 is '+Hi'? So,
+ (gt_long( + (lo3, lo4), +Hi (hi3, hi4) ), gt_long(lo2, hi2))
=>
gt_long (+ ( + (lo3, lo4), lo2), +Hi ( +Hi (hi3, hi4), hi2))
But we can't put any instructions between '+ (lo3, lo4)' and '+Hi (hi3, hi4)'
or we'll lose the carry bit.
We need to model this differently, or introduce temps. Until this is
done, convert the silent bad codegen into NYI fallback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d1d7a46db4d75f9ef323fc4ae5b4a1efc661476b
Aditya Mandaleeka [Wed, 4 May 2016 23:16:35 +0000 (16:16 -0700)]
Merge pull request dotnet/coreclr#4504 from krytarowski/netbsd-support-72
Add initial NetBSD documentation
Commit migrated from https://github.com/dotnet/coreclr/commit/
a12aed9422083394022752f282e7656d40206acd
Sivarv [Wed, 4 May 2016 23:15:32 +0000 (16:15 -0700)]
Merge pull request dotnet/coreclr#4755 from sivarv/mcall
Multi-reg call node support for x64 Unix
Commit migrated from https://github.com/dotnet/coreclr/commit/
7730864b3a7f0c0233c23c676e1a83e50cbd7116
Davis Goodin [Wed, 4 May 2016 22:50:19 +0000 (17:50 -0500)]
Remove CORE_ROOT workaround. .NET CLI no longer uses the value.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eeece8acff8f0d724c82552ddc064d07400114c8
jashook [Wed, 4 May 2016 22:08:48 +0000 (15:08 -0700)]
Add ryujit x86 pr trigger.
Adds ryujit x86 testing on pr, and collapses x86 lb to just run checked jobs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
53331c48fbff444568a67e73094d171f75e24b84
Kyungwoo Lee [Wed, 4 May 2016 20:19:52 +0000 (13:19 -0700)]
Merge pull request dotnet/coreclr#4723 from kyulee1/tailcall
ARM64: Enable Tail Call with Vararg
Commit migrated from https://github.com/dotnet/coreclr/commit/
af1961073ba02f76c58a86f5528066e5813c2bb1
Michelle McDaniel [Wed, 4 May 2016 20:06:50 +0000 (13:06 -0700)]
Merge pull request dotnet/coreclr#4727 from adiaaida/overflowLongArithmetic
Set overflow flag for add/sub hi on x86 TYP_LONG
Commit migrated from https://github.com/dotnet/coreclr/commit/
777936dd947986ae54119ad6fccc1711f52f1daf
sivarv [Wed, 4 May 2016 15:29:18 +0000 (08:29 -0700)]
Multi-reg call node support.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a88ba565faa592e5aeb59df22640961e81d8d037
Sean Gillespie [Wed, 4 May 2016 17:25:03 +0000 (10:25 -0700)]
Merge pull request dotnet/coreclr#4757 from swgillespie/gcstress-disable-tests
Disable two tests under GCStress for dotnet/coreclr#4748 and dotnet/coreclr#4708
Commit migrated from https://github.com/dotnet/coreclr/commit/
35c4b5bd36ac9e3e36dab3f8674a3e83b388aaf3
Bruce Forstall [Wed, 4 May 2016 17:13:32 +0000 (10:13 -0700)]
Merge pull request dotnet/coreclr#4760 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
4047cc5464c287cacf981fdc4c2a2996ed4e6e86
Kyungwoo Lee [Tue, 26 Apr 2016 21:41:05 +0000 (14:41 -0700)]
ARM64: Enable Tail Call with Vararg
Fixes https://github.com/dotnet/coreclr/issues/4475
I've run into `IMPL_LIMITATION("varags + CEE_JMP doesn't work yet")` in
importer.cpp. This change enables ARM64 tail call path same as other
targets.
1. Similar to amd64 `genFnEpilog`, I made the similar code under
`!FEATURE_FASTTAILCALL`. Since `EC_FUNC_TOKEN_INDIR` is not defined for
arm64, I've made NYI for such case.
2. Added two pseudo branch instructions 'b_tail' and 'br_tail' which form
jmp instruction encodings but follow call instruction semantics since
they are used for tail-call.
3. `GenJmpMethod` is enabled. Code is slightly changed to reflect correct
float argument handlings and multi-reg support.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f63d726b01f42fbbceb497e5de6f36a8622f4000
Mikhail I. Krivtsov [Wed, 4 May 2016 13:53:05 +0000 (16:53 +0300)]
Fix Windows 'linuxmscorlib arm' build
Commit migrated from https://github.com/dotnet/coreclr/commit/
9b1f7b6e281c9164faa4280e7a8e5b3601b62efd
Rahul Kumar [Wed, 4 May 2016 05:21:57 +0000 (22:21 -0700)]
Merge pull request dotnet/coreclr#4759 from rahku/crossgen
Fix checking of correct errorlevel for crossgen
Commit migrated from https://github.com/dotnet/coreclr/commit/
09d6a5d6536adc498917728d3224b1ee7f779d65
Kyungwoo Lee [Wed, 4 May 2016 04:45:14 +0000 (21:45 -0700)]
Merge pull request dotnet/coreclr#4771 from myungjoo/fix/4746
ildasm: incorrect signess usage with char
Commit migrated from https://github.com/dotnet/coreclr/commit/
7eb8accc6846757925ab6f7896d76a204f9fa509
MyungJoo Ham [Wed, 4 May 2016 04:28:31 +0000 (13:28 +0900)]
Unix/Build: use -fsigned-char
Some architectures including ARM assumes that plain char is
unsigned unlike x64.
Because CoreCLR has been assuming char is signed, we need to
explictly tell the toolchain the signedness of char type.
Fix dotnet/coreclr#4746
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
7f203ae2ca9f7c14239b4e7228b8f9638b3388f3
Pat Gavlin [Wed, 4 May 2016 04:11:55 +0000 (21:11 -0700)]
Merge pull request dotnet/coreclr#4478 from pgavlin/JitPackaging
Create JIT packages during the build.
Commit migrated from https://github.com/dotnet/coreclr/commit/
59bc1154459251a5724f4263c582180894dcd2ab
Aditya Mandaleeka [Wed, 4 May 2016 03:58:05 +0000 (20:58 -0700)]
Merge pull request dotnet/coreclr#4768 from adityamandaleeka/fix_ci_corefxbins
Add quotes around coreFxBinDir example in runtest.sh
Commit migrated from https://github.com/dotnet/coreclr/commit/
e88dca4eeaf7c2eedb7027118ad44ba3cf2e23e5
Andy Ayers [Wed, 4 May 2016 02:29:31 +0000 (19:29 -0700)]
Update per review feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2121c05ffad2a686679a3d4c685bf5ce690f3c56
Yi Zhang (CLR) [Wed, 4 May 2016 01:54:22 +0000 (18:54 -0700)]
Merge pull request dotnet/coreclr#4740 from yizhang82/interop_x86_test
Fix interop x86 tests by fixing mismatching calling convention, and enable [NativeCallable] for every architecture
Commit migrated from https://github.com/dotnet/coreclr/commit/
62845a015ec8e06e75229d9f5fbc786da0705f71
Aditya Mandaleeka [Wed, 4 May 2016 01:32:40 +0000 (18:32 -0700)]
Add quotes around coreFxBinDir example.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fef43d61b50d6a7d2e365a3234eff1971f6224d2
Andy Ayers [Wed, 4 May 2016 00:59:13 +0000 (17:59 -0700)]
Merge pull request dotnet/coreclr#4753 from AndyAyersMS/InlineForSize
Inliner: initial version of SizePolicy
Commit migrated from https://github.com/dotnet/coreclr/commit/
d474c289096d7a2af96ab5690be37c9fa8aec10e
Aditya Mandaleeka [Tue, 3 May 2016 23:49:58 +0000 (16:49 -0700)]
Add 'fwrapv' compile option.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e67df67213d1b4730d5d2c803c681bc55f009792
Andy Ayers [Wed, 4 May 2016 00:16:28 +0000 (17:16 -0700)]
Add some tests for optimization of booleans
Test case to stress inlining, expression opts, and control flow
simplification for booleans.
Test case has 100 methods named Idxx. All 100 should generate identical
code. On x64 windows we expect to get the 4 byte sequence
```
0FB6C1 movzx rax, cl
C3 ret
```
Only 22 of the variants get this codegen; there are at least 12 other
sequences ranging in size from 9 to 32 bytes of code.
Likely touches on the same issues raised in dotnet/coreclr#914.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8354d2b9b4c2b5dd6f3b111a93f05322007bb239
Kamil Rytarowski [Fri, 22 Apr 2016 09:29:08 +0000 (11:29 +0200)]
Add initial NetBSD documentation
Thanks for @coypoop for improving the English wording.
Commit migrated from https://github.com/dotnet/coreclr/commit/
229be2965ca36601980b5fcb398a76e5f6ca89ab
Russ Keldorph [Wed, 4 May 2016 00:07:57 +0000 (17:07 -0700)]
Merge pull request dotnet/coreclr#4705 from RussKeldorph/vector3interop
Disable Vector3Interop until failures are addressed
Commit migrated from https://github.com/dotnet/coreclr/commit/
db6f6d7a04b15a376a40d434fea91e07b9b6f13f
Aditya Mandaleeka [Tue, 3 May 2016 23:49:13 +0000 (16:49 -0700)]
Revert "Fix array allocation bounds checking."
This reverts commit dotnet/coreclr@
16c9dfbae5e5ce18ad0519b31df515820fed2579.
Commit migrated from https://github.com/dotnet/coreclr/commit/
835702ea450734c4ce1ac819ccafd99f5a790da8
MyungJoo Ham [Tue, 3 May 2016 23:09:10 +0000 (08:09 +0900)]
ARM: fix stack frame management (dotnet/coreclr#4641)
ARM: fix stack frame management
Fix dotnet/coreclr#4638
This commit revises the implementation of CallEHFunclet to establish
stack frame appropriately.
This commit allows libunwind to work correctly for the frame created by
CallEHFunclet.
Commit migrated from https://github.com/dotnet/coreclr/commit/
57185b4668e5b64855840655806c0d12524dbfb4
Aditya Mandaleeka [Tue, 3 May 2016 22:49:38 +0000 (15:49 -0700)]
Merge pull request dotnet/coreclr#4693 from adityamandaleeka/delegateinvoke_platnotsup
Make Delegate BeginInvoke/EndInvoke throw PlatformNotSupportedException
Commit migrated from https://github.com/dotnet/coreclr/commit/
2828f00b908866a08f0ce32a895bf93623b0e0e8
Aditya Mandaleeka [Tue, 3 May 2016 19:33:28 +0000 (12:33 -0700)]
Add test for Begin/EndInvoke throwing PlatformNotSupportedException.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8590bdf2146b86c179fd4cbe78f721d4f0b581c7
Rahul Kumar [Tue, 3 May 2016 22:20:29 +0000 (15:20 -0700)]
Fix checking of correct errorlevel for crossgen
Commit migrated from https://github.com/dotnet/coreclr/commit/
463322e4e0700d8d839acc4ceed36425bafa65c3
Bruce Forstall [Tue, 3 May 2016 22:09:53 +0000 (15:09 -0700)]
Merge pull request dotnet/coreclr#4738 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
f005f1e72012913fb779ab16e68cef6a75b9b3c3
Sean Gillespie [Tue, 3 May 2016 22:09:06 +0000 (15:09 -0700)]
Merge pull request dotnet/coreclr#4721 from swgillespie/gcsimulator
Add a "GCSimulator" CI run
Commit migrated from https://github.com/dotnet/coreclr/commit/
09043c6a8b4c32607ce0625bcca4567b7c4e7349
Sean Gillespie [Tue, 3 May 2016 21:27:34 +0000 (14:27 -0700)]
Disable two tests under GCStress for dotnet/coreclr#4748 and dotnet/coreclr#4708
Commit migrated from https://github.com/dotnet/coreclr/commit/
b757560a89c1adac9f1f7d713008b9d8caef4396
Pat Gavlin [Wed, 20 Apr 2016 21:03:56 +0000 (14:03 -0700)]
Create JIT packages during the build.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bb25183c7a7c3cd4ad1e77b74938af2b13537c27
Michelle McDaniel [Mon, 2 May 2016 20:52:39 +0000 (13:52 -0700)]
Set overflow flag for add/sub hi on x86 TYP_LONG
When we create the hi operation for add and sub on TYP_LONG, we don't
carry the overflow flag to the hi operation. This change sets the overflow
flag on hiResult in lower if it was set on loResult, and adds GT_ADD_HI
and GT_SUB_HI to the operations that can have overflow. We also need to
pass the unsigned flag to the high part in the instance that we are
dealing with an add or subtract with overflow. Fixes dotnet/coreclr#4596.
Commit migrated from https://github.com/dotnet/coreclr/commit/
230d693afc8b253df012fb4569e42ba731e6f5d2
Pat Gavlin [Tue, 3 May 2016 19:58:16 +0000 (12:58 -0700)]
Remove SEH interactions between the JIT and the EE.
This change replaces the final uses of SEH between the JIT and the EE with a new method
on ICorJitInfo, `ICorJitInfo::runWithErrorTrap`. This method runs a given function under an
error trap that prevents recoverable errors from propagating out of the call. This allows
the JIT to make calls to JIT/EE interface functions that may throw exceptions without
needing to be aware of the EH ABI, exception types, etc. The method returns true if the
given function completed successfully and false otherwise. This change deprecates
all other SEH-related functionality on the JIT/EE interface (e.g. `ICJI::FilterException` and
`ICJI::HandleException`).
This change does not completely eliminate SEH over the JIT/EE interface: there are still a
handful of places where the JIT expects to be able to catch exceptions thrown by
SuperPMI. These uses of SEH will be removed later on.
Fixes dotnet/coreclr#3058 and dotnet/coreclr#4130.
[tfs-changeset: 1601288]
Commit migrated from https://github.com/dotnet/coreclr/commit/
8f71b159a1edb4fbb187bcc95c6e20bc9e2ea4d8
Sean Gillespie [Fri, 29 Apr 2016 00:03:51 +0000 (17:03 -0700)]
GCSimulator test run
Commit migrated from https://github.com/dotnet/coreclr/commit/
87b1d117ed005e0719e857b10d2be92436ba999b
Andy Ayers [Sat, 30 Apr 2016 00:27:40 +0000 (17:27 -0700)]
Inliner: initial version of SizePolicy
Add a new inline policy that tries to inline as much as possible
without increasing method size.
Fix one test that had an expected inline that doesn't happen under
the SizePolicy, by marking a method with AggressiveInline.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f57f3737a356f12fb494945c5750980fe14af020
Pat Gavlin [Tue, 3 May 2016 16:18:51 +0000 (09:18 -0700)]
Merge pull request dotnet/coreclr#4728 from pgavlin/FixTRTContracts
Fix contracts in `tryResolveToken`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
92f671fe9f0fc583805d4f9c3116126444dabcf4
Deepak Shankargouda [Tue, 3 May 2016 16:17:27 +0000 (09:17 -0700)]
Fixing issue with perf targets restoring test runtime (dotnet/coreclr#4686)
Commit migrated from https://github.com/dotnet/coreclr/commit/
eabea995f603cbd38cc1a5fdebe305737e13b5ad
Yi Zhang (CLR) [Tue, 3 May 2016 04:00:21 +0000 (21:00 -0700)]
Fix calling convention mismatch in 7 interop tests and enable [NativeCallable] in all architectures.
Commit migrated from https://github.com/dotnet/coreclr/commit/
dfef0a390443379c3991b97d8871f301321c36f6
Bruce Forstall [Tue, 3 May 2016 14:59:25 +0000 (07:59 -0700)]
Merge pull request dotnet/coreclr#4732 from BruceForstall/SignedIntToLongCastNYI
Convert signed int=>long cast SBCG to NYI
Commit migrated from https://github.com/dotnet/coreclr/commit/
cb42cbf1dca78a548deca358764500fb8a48e06b
Bruce Forstall [Tue, 3 May 2016 00:58:01 +0000 (17:58 -0700)]
Convert signed int=>long cast SBCG to NYI
This causes many tests that fail with silent bad codegen to pass
with NYI fallback. Many tests are removed from the issues.targets
failing tests exclusion list, but added to the
ryujit_x86_no_fallback_issues.targets exclusion list.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2175553aca9e492c39a00be26f8aad20549dda7a
Pat Gavlin [Mon, 2 May 2016 23:40:26 +0000 (16:40 -0700)]
Fix contracts in `tryResolveToken` et. al.
`isValidToken`'s contract was too conservative: it was needlessly marked
`THROWS`, `GC_TRIGGERS`, and `MODE_PREEMPTIVE`. Its contract and those
of its callers have been tightened to `NOTHROW`, `GC_NOTRIGGER`, and
`MODE_ANY`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8686653b0266b82a5ffb6d7aca4116d72c88df86
Jan Vorlicek [Tue, 3 May 2016 08:42:40 +0000 (10:42 +0200)]
Merge pull request dotnet/coreclr#4726 from adityamandaleeka/array_alloc_bounds_check
Fix array allocation bounds checking on Unix
Commit migrated from https://github.com/dotnet/coreclr/commit/
92d709193a8ee3d8da3519811912ec0f7a552993