Jonghyun Park [Tue, 6 Dec 2016 01:56:58 +0000 (10:56 +0900)]
[x86/Linux] Fix unknown pragma build error (dotnet/coreclr#8427)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6c1b9cc682eccae1e655d8037f06c0f516f2f90b
Drew Scoggins [Tue, 6 Dec 2016 01:19:53 +0000 (19:19 -0600)]
Merge pull request dotnet/coreclr#8468 from DrewScoggins/LinuxPerfFixup
Fix calls to curl in prep script
Commit migrated from https://github.com/dotnet/coreclr/commit/
fd976d67c775ea4820279bfd7236c42b06b1d774
Drew Scoggins [Tue, 6 Dec 2016 01:14:59 +0000 (17:14 -0800)]
Fix calls to curl in prep script
Before we were calling curl without the -L configuration. This would
cause it not follow redirects and several of the files we needed have
now started using redirects. This fixes that issue.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d6615c8a205060dfc5da6e87b81478ef10747fb
Jonghyun Park [Tue, 6 Dec 2016 01:01:57 +0000 (10:01 +0900)]
[x86/Linux] Port gmsasm.asm (dotnet/coreclr#8456)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ea8387f07031f42708e419a5629c53d7fbf384d7
Jonghyun Park [Tue, 6 Dec 2016 00:37:53 +0000 (09:37 +0900)]
[x86/Linux] Mark several Windows-specific functions in excepx86.cpp as NYI (dotnet/coreclr#8424)
* Mark several Windows-specific functions as NYI
* Use FEATURE_PAL instead of PLATFORM_UNIX
* Revert the change in threads.h
Commit migrated from https://github.com/dotnet/coreclr/commit/
61ffc9f3fbf80a6b8a04eb2674b057c6cce465f0
Jonghyun Park [Tue, 6 Dec 2016 00:37:41 +0000 (09:37 +0900)]
Add UnhandledExceptionHandlerUnix Stub (dotnet/coreclr#8425)
FuncEvalHijack in dbghelpers.S uses UnhandledExceptionHandlerUnix as a
personality routine, but UnhandledExceptionHandlerUnix is not avaiable
for x86 (UnhandledExceptionHandlerUnix is available only when
WIN64EXCEPTIONS which is not defined for x86).
This commit adds UnhandledExceptionHandlerUnix to fix dangling
reference.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4e21d57d09174addc4900b64a23d15b3b62de02d
Sivarv [Tue, 6 Dec 2016 00:28:37 +0000 (16:28 -0800)]
Merge pull request dotnet/coreclr#8461 from sivarv/shiftFix
Compare opt against zero involving a shift oper.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1c8d3d9d61542801be93044ba993860cd7c9f61c
Drew Scoggins [Tue, 6 Dec 2016 00:12:42 +0000 (18:12 -0600)]
Merge pull request dotnet/coreclr#8195 from DrewScoggins/LinuxPerfAuto
Add Linux perf support to Jenkins
Commit migrated from https://github.com/dotnet/coreclr/commit/
5c1caba131a85b729ce5f566b09094f5978b587a
Jonghyun Park [Mon, 5 Dec 2016 23:58:20 +0000 (08:58 +0900)]
[x86/Linux] Enclose ArrayOpStub Exceptions with FEATURE_ARRAYSTUB_AS_IL (dotnet/coreclr#8445)
* Enclose ArrayOpStub Exceptions with FEATURE_ARRAYSTUB_AS_IL
* Fix unmatched ifdef
* Fix unmatched ifdef
Commit migrated from https://github.com/dotnet/coreclr/commit/
23eaa4756468d89b84c6d2efc9be38a3f1f63c81
SaeHie Park [Mon, 5 Dec 2016 23:54:51 +0000 (08:54 +0900)]
[x86/Linux] Fix no known conversion from 'void ()' to 'void *' (dotnet/coreclr#8450)
Fix compile error for x86/Linux
- this will fix "no known conversion from 'void ()' to 'void *'" for "CallRtlUnwindSafe"
- for compiler clang 3.8
Commit migrated from https://github.com/dotnet/coreclr/commit/
fdc4efd22703b5fa0cd52882b0cf4568a0f7708a
Jonghyun Park [Mon, 5 Dec 2016 23:54:41 +0000 (08:54 +0900)]
[x86/Linux] add a stub for THROW_CONTROL_FOR_THREAD_FUNCTION (dotnet/coreclr#8455)
THROW_CONTROL_FOR_THREAD_FUNCTION is defined as ThrowControlForThread
for x86/Linux, but unixstubs implements RedirectForThrowControl (which
corresponds to x64/Linux).
This commit renames RedirectForThrowControl as ThrowControlForThread to
fix dangling ThrowControlForThread reference in x86/Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
528508ccee9925c663ef86fd842d60883760db02
sivarv [Mon, 5 Dec 2016 19:59:57 +0000 (11:59 -0800)]
Compare opt against zero involving a shift oper.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b22b27b984545259d139e6ff8b8e85e9f067251c
Jeremy Kuhne [Mon, 5 Dec 2016 22:42:51 +0000 (14:42 -0800)]
Copy CoreFX environment variable code (dotnet/coreclr#8405)
Tweak the core code to match up with what we had done in CoreFX and expose
so that we can have a single source of environment truth. This is
particularly important for Unix as we use a local copy of the state.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e06afa73cc284c6659a03eb475eb426d08938e77
Bruce Forstall [Mon, 5 Dec 2016 22:33:27 +0000 (14:33 -0800)]
Merge pull request dotnet/coreclr#8109 from BruceForstall/FixSimd12NYI
RyuJIT/x86: Implement TYP_SIMD12 support
Commit migrated from https://github.com/dotnet/coreclr/commit/
44a7d097a38c4ed33b633bf422eb2b79a12e38dd
Drew Scoggins [Fri, 11 Nov 2016 17:29:07 +0000 (09:29 -0800)]
Add Linux perf support to Jenkins
This change adds perf support for CoreCLR on Ubuntu 14.04 to Jenkins.
This is mostly work extending what Smile had already done. The main
changes were to build CoreCLR rather then grab it from CI, and work to
get the upload portion finished.
Commit migrated from https://github.com/dotnet/coreclr/commit/
90c0d32ffd9eab3383f4f9a59b5e58c8ab79fb0b
Ian Hays [Mon, 5 Dec 2016 20:57:09 +0000 (12:57 -0800)]
Merge pull request dotnet/coreclr#8306 from jamesqo/better-bulk-add
Better bulk adds for List.
Commit migrated from https://github.com/dotnet/coreclr/commit/
78d2ea048edbd86de9e9a510c3f3ec7789c44fe8
Jonghyun Park [Mon, 5 Dec 2016 20:41:00 +0000 (05:41 +0900)]
[x86/Linux] Re-enable FrameHandlerExRecord for x86/Linux (dotnet/coreclr#8409)
* Re-enable FrameHandlerExRecord for x86/Linux
* Use _TARGET_X86_ instead of WIN64EXCEPTIONS
Commit migrated from https://github.com/dotnet/coreclr/commit/
493132ca95fdfc1fe380e92882122e81230db217
Jonghyun Park [Mon, 5 Dec 2016 20:29:56 +0000 (05:29 +0900)]
[x86/Linux] Fix dangling ClrCaptureContext (dotnet/coreclr#8453)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c7a649255975920b8aaba2a7048823ca17384067
Jonghyun Park [Mon, 5 Dec 2016 20:20:53 +0000 (05:20 +0900)]
Fix dangling StubLinkerCPU::EmitDelegateInvoke in x86/Linux (dotnet/coreclr#8444)
Several methods in StublicLinkerCPU (including EmitDelegateInvoke) are
available only when FEATURE_STUBS_AS_IL is defined.
This commit encloses their declaration with appropriate macro
(FEATURE_STUBS_AS_IL), and fix related build erros.
Commit migrated from https://github.com/dotnet/coreclr/commit/
14bcf6ddf93ae4f7e897e219aaa8c0e43bb99415
Jonghyun Park [Mon, 5 Dec 2016 20:08:33 +0000 (05:08 +0900)]
[x86/Linux] Enclose stub-linking methods with FEATURE_STUBS_AS_IL (dotnet/coreclr#8432)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0c952dcef303e2ee80e892bca7bf5d0950e225cd
Jonghyun Park [Mon, 5 Dec 2016 20:06:49 +0000 (05:06 +0900)]
[x86/Linux] Fix dangling CLR_ImpersonateLoggedOnUser reference (dotnet/coreclr#8435)
src/vm/securityprincipal.cpp is not included in x86/Linux build, and
thus all the reference to the functions in it will be dangling. (i.e.
COMPrincipal::CLR_ImpersonateLoggedOnUser).
This commit hides COMPrincipal for non-Windows platforms, and marks
COMPlusThrowCallbackHelper as NYI.
Commit migrated from https://github.com/dotnet/coreclr/commit/
46483e11a314a167eecc557ef3f246dcc95bee99
Hyeongseok Oh [Mon, 5 Dec 2016 18:55:40 +0000 (03:55 +0900)]
Fix runtest.sh: delete ni file and lock correctly (dotnet/coreclr#8081)
Commit migrated from https://github.com/dotnet/coreclr/commit/
55b1bb4e35807220a48391548238e29b075102bb
Jonghyun Park [Mon, 5 Dec 2016 12:20:32 +0000 (21:20 +0900)]
[x86/Linux] Mark LeaveCatch as NYI (dotnet/coreclr#8384)
* Disable LeaveCatch for non-Windows platforms
* Mark LeaveCatch as NYI
* Use #ifndef as before
Commit migrated from https://github.com/dotnet/coreclr/commit/
75a625faaddcd45b5ab396019dc1623dfe3b35c1
SaeHie Park [Mon, 5 Dec 2016 08:04:41 +0000 (17:04 +0900)]
[x86/Linux] Fix all paths through this function will call itself (dotnet/coreclr#8451)
Fix compile error for x86/Linux
- disable "infinite-recursion" for "recursiveFtn" function
- only for clang
Commit migrated from https://github.com/dotnet/coreclr/commit/
7200e78258623eb889a46aa7a90818046bd1957d
Jonghyun Park [Mon, 5 Dec 2016 08:02:25 +0000 (17:02 +0900)]
[x86/Linux] Use Portable LMul JIT Helper (dotnet/coreclr#8449)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3891c5f681eccd262f1ccca4bfa34a582573ce1d
SaeHie Park [Mon, 5 Dec 2016 07:45:38 +0000 (16:45 +0900)]
[x86/Linux] Fix indirection of non-volatile null pointer will be deleted (dotnet/coreclr#8452)
Fix compile error for x86/Linux
- fix error "indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference]"
- using clang 3.8
Commit migrated from https://github.com/dotnet/coreclr/commit/
9f84a04da21622944a96b2e77d3330910f5af263
Jonghyun Park [Mon, 5 Dec 2016 07:37:17 +0000 (16:37 +0900)]
Use Portable Floating-point Arithmetic Helpers (dotnet/coreclr#8447)
This commit enables portable floating-point arithmetic helpers for
x86/Linux build.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fdc9e6c0397a28cdbbd28f10ee55494387498fbc
Jonghyun Park [Mon, 5 Dec 2016 07:35:52 +0000 (16:35 +0900)]
[x86/Linux] Fix dangling DoubleToNumber and NumberToDouble (dotnet/coreclr#8446)
This commit enables portable DoubleToNumber and NumberToDouble for
x86/Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
933073140a0a7ca1f83084943e7516015f7e2ae8
Jon Hanna [Mon, 5 Dec 2016 07:22:10 +0000 (07:22 +0000)]
Fix several misspellings of exception and "a exception". (dotnet/coreclr#8442)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e5946c901f3f82f668ee4322b300f195c43cecaf
Jonghyun Park [Mon, 5 Dec 2016 07:19:41 +0000 (16:19 +0900)]
[x86/Linux] Revert UMThkCallFrame-related changes (dotnet/coreclr#8434)
* [x86/Linux] Revert UMThkCallFrame-related code
* [x86/Linux] Fix dangling 'TheUMEntryPrestub' reference
This commit re-enables GenerateUMThunkPrestub and its related code in
order to remove TheUMEntryPrestub reference.
* [x86/Linux] Re-enable several methods in StubLinkerCPU
This commit re-enables the following methods for x86/Linux:
- StubLinkerCPU::EmitSetup
- StubLinkerCPU::EmitComMethodStubProlog
- StubLinkerCPU::EmitComMethodStubEpilog
In addtion, EmitComMethodStubEpilog is marked as NYI.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6ed21c52f25243b7cc1c64b19a47bbd4beb69314
Jonghyun Park [Mon, 5 Dec 2016 07:15:41 +0000 (16:15 +0900)]
[x86/Linux] Fix unused function warning (dotnet/coreclr#8429)
* Delete the unused code
Commit migrated from https://github.com/dotnet/coreclr/commit/
7f533e516a5b0f8fd83bc616cd9241e294d24aaf
Sean Gillespie [Mon, 5 Dec 2016 04:02:21 +0000 (20:02 -0800)]
Ensure MSBuild properties get persisted to child MSBuild tasks, fixes a race condition in the build (dotnet/coreclr#8404)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b51bcf1dafdb2d726e3203db5535794bbc193295
Bruce Forstall [Mon, 14 Nov 2016 03:35:32 +0000 (19:35 -0800)]
RyuJIT/x86: Implement TYP_SIMD12 support
There is no native load/store instruction for Vector3/TYP_SIMD12,
so we need to break this type down into two loads or two stores,
with an additional instruction to put the values together in the
xmm target register. AMD64 SIMD support already implements most of
this. For RyuJIT/x86, we need to implement stack argument support
(both incoming and outgoing), which is different from the AMD64 ABI.
In addition, this change implements accurate alignment-sensitive
codegen for all SIMD types. For RyuJIT/x86, the stack is only 4
byte aligned (unless we have double alignment), so SIMD locals are
not known to be aligned (TYP_SIMD8 could be with double alignment).
For AMD64, we were unnecessarily pessimizing alignment information,
and were always generating unaligned moves when on AVX2 hardware.
Now, all SIMD types are given their preferred alignment in
getSIMDTypeAlignment() and alignment determination in
isSIMDTypeLocalAligned() takes into account stack alignment (it
still needs support for x86 dynamic alignment). X86 still needs to
consider dynamic stack alignment for SIMD locals.
Fixes dotnet/coreclr#7863
Commit migrated from https://github.com/dotnet/coreclr/commit/
e401df83de9a4f135e71ca2ab06eff19c112a881
Jonghyun Park [Fri, 2 Dec 2016 11:14:24 +0000 (20:14 +0900)]
[x86/Linux] fix several parentheses compile warnings (dotnet/coreclr#8428)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a0a055ba3cf8265055a37a14f206e9e30836bc18
Jan Kotas [Fri, 2 Dec 2016 11:06:55 +0000 (03:06 -0800)]
Introduce CORINFO_EH_CLAUSE_SAMETRY flag for CoreRT ABI (dotnet/coreclr#8422)
CORINFO_EH_CLAUSE_SAMEBLOCK flag is returned on mutually protecting EH clauses for CoreRT ABI. It is set on EH clauses that cover same try block as the previous one. The runtime cannot reliably infer this information from native code offsets without full description of duplicate clauses because of different try blocks can have same offsets. Alternative solution to this problem would be inserting extra nops to ensure that different try blocks have different offsets.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fcc57b23e2f2072e07d69154faab61f7d52e594b
Jan Kotas [Fri, 2 Dec 2016 04:54:11 +0000 (20:54 -0800)]
Merge pull request dotnet/coreclr#8419 from jkotas/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24801-03, beta-24721-02, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
cb4ac230e8d0a55a7a972fa7e433703fc25629f1
Jan Kotas [Thu, 1 Dec 2016 21:34:08 +0000 (13:34 -0800)]
Disable test against dotnet/coreclr#8418 to unblock corefx updates
Commit migrated from https://github.com/dotnet/coreclr/commit/
28e4d0d2422cd88839944686c550529904915b5b
Jonghyun Park [Fri, 2 Dec 2016 02:48:52 +0000 (11:48 +0900)]
[x86/Linux] Use portable JIT helpers (dotnet/coreclr#8392)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3e5eb34d820637c584976ba37d7d0ec02565fa2
Jonghyun Park [Fri, 2 Dec 2016 01:01:29 +0000 (10:01 +0900)]
[x86/Linux] Disable Watson-related code for non-Windows platforms (dotnet/coreclr#8410)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1a1da83f1750c45cfe6e62080608f328d9b36978
Jonghyun Park [Fri, 2 Dec 2016 00:58:37 +0000 (09:58 +0900)]
[x86/Linux] Add Portable PopSEHRecords as NYI (dotnet/coreclr#8412)
Commit migrated from https://github.com/dotnet/coreclr/commit/
731bb02df3aa410d69641226364fb52c3567faba
Jonghyun Park [Fri, 2 Dec 2016 00:57:46 +0000 (09:57 +0900)]
Resolve duplicated functions (dotnet/coreclr#8413)
Several functions are implemented in both cgenx86.cpp and unixstubs.cpp,
which results in linking errors.
This commit disables functions in cgenx86.cpp to resolve linking errors.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7c1fb28db6cd0e0bdd83494054d743a30c3287b6
Jonghyun Park [Fri, 2 Dec 2016 00:55:18 +0000 (09:55 +0900)]
[x86/Linux] Adjust the definition of FnStaticBaseHelper for x86 (dotnet/coreclr#8390)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8d800dfe9c0461a4b60df076b5e71149c1748a0d
Bruce Forstall [Thu, 1 Dec 2016 19:04:55 +0000 (11:04 -0800)]
Merge pull request dotnet/coreclr#8414 from BruceForstall/FixSimdRegressions
Fix recent x86 SIMD regressions
Commit migrated from https://github.com/dotnet/coreclr/commit/
eed8ab262a5a47643e26f35b2c529f71f2d0c9a8
dotnet-bot [Thu, 1 Dec 2016 17:36:24 +0000 (17:36 +0000)]
Update CoreClr, CoreFx to beta-24801-03, beta-24721-02, respectively
Commit migrated from https://github.com/dotnet/coreclr/commit/
cbed6c3609c5959f018ec05b4b64361e556694bf
Phil Christensen [Thu, 1 Dec 2016 11:53:23 +0000 (03:53 -0800)]
fix permissive C++ code (MSVC /permissive-) (dotnet/coreclr#8337)
* fix permissive C++ code (MSVC /permissive-)
These were found by the C++ compiler group when doing "Real world code"
build tests using /permissive-. We are sharing these with you to help you clean up
your code before the new version of the compiler comes out. For more information on /permissive-
see https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/.
----------------------------
Under /permissive-, skipping the initialization of a variable is not allowed.
As an extension the compiler allowed this when there was no destructor for the type.
void func(bool b)
{
if(b) goto END;
int value = 0; //error C2362: initialization of 'value' is skipped by 'goto END'
int array[10]; //Okay, not initialized.
//... value used here
END:
return;
}
Fix 1) Limit the scope of value:
{
int value = 0;
//... value used here
}
END:
Fix 2) Initialize/declare value before the 'goto'
int value = 0;
if(b) goto END;
//... value used here
END:
Fix 3) Don't initialize value in the variable declaration.
int value;
value = 0
//... value used here
END:
-------------------
Alternative token representations.
The following are reserved as alternative representations for operators:
and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq
//Can't use reserved names for variables:
static int and = 0; // Change name (possibly to 'and_')
void func()
{
_asm {
xor edx,edx // xor is reserved, change to uppercase XOR
or eax,eax // or is reserved, change to uppercase OR
}
}
* Apply formatting patch.
* fixes from code review.
I addressed @janvorli requests from the pull request code review.
Commit migrated from https://github.com/dotnet/coreclr/commit/
20275aa647c5733bc5b1929cba3fd1094c67fb1d
Jonghyun Park [Thu, 1 Dec 2016 10:57:07 +0000 (19:57 +0900)]
Re-enable UMThkCallFrame and fix compile errors (dotnet/coreclr#8411)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3f4680c80dc510a96efa322054145a807480bab7
Jonghyun Park [Thu, 1 Dec 2016 10:52:25 +0000 (19:52 +0900)]
Fix build error in ARM64 code (dotnet/coreclr#8407)
CONTEXT struct for ARM64 does not contain X29 field.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6aa53dc3703b49dba774f3c1ea1e988a85e69274
Jonghyun Park [Thu, 1 Dec 2016 09:24:32 +0000 (18:24 +0900)]
Add EXCEPTION_REGISTRATION_RECORD for x86/Linux (dotnet/coreclr#8408)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d06220f50d7cc05424aeecb0eee990abb522d37b
Bruce Forstall [Thu, 1 Dec 2016 08:15:53 +0000 (00:15 -0800)]
Fix recent x86 SIMD regressions
1. Recent PUTARG_STK work didn't consider SIMD arguments.
2. SSE3_4 work caused underestimation of instruction sizes for SSE4
instructions (e.g., pmulld).
Commit migrated from https://github.com/dotnet/coreclr/commit/
76390e45acb3aa5379d56cceb6f54f9555f96181
Alex Ghiondea [Thu, 1 Dec 2016 07:52:29 +0000 (23:52 -0800)]
Remove the BinaryCompatibility class as it is not useful on .NET Core… (dotnet/coreclr#8396)
* Remove the BinaryCompatibility class as it is not useful on .NET Core and creates issues on Debug builds when the TFM on the AppDomain is not recognized.
* Update the code for DateTimeFormatInfo to not use BinaryCompatibility
* Remove initialization of preferExistingTokens now that we removed its usage
Commit migrated from https://github.com/dotnet/coreclr/commit/
eca37b41de5cf03681c510aa9f94577c76aa2c26
Jan Vorlicek [Thu, 1 Dec 2016 07:51:52 +0000 (08:51 +0100)]
Add printing managed assert message to console (dotnet/coreclr#8399)
I have discovered that when GUI assertion dialogs are disabled, the assert
message is not shown anywhere and the app just silently exits.
This change adds printing the message and stack trace to console in such case.
Commit migrated from https://github.com/dotnet/coreclr/commit/
32d03bb66a51c7ed6712c4cdd319de0cc7cbbf37
Jan Kotas [Thu, 1 Dec 2016 05:52:35 +0000 (21:52 -0800)]
Skip emitting duplicate clauses for CoreRT (dotnet/coreclr#8400)
Fixes https://github.com/dotnet/corert/issues/2262
Commit migrated from https://github.com/dotnet/coreclr/commit/
746d0330e19a764c4d23160e56e8a281335b8e56
Jonghyun Park [Thu, 1 Dec 2016 02:26:08 +0000 (11:26 +0900)]
Add parentheses aroung logical operations (dotnet/coreclr#8406)
This commit fixes logical-op-parentheses compile error for x86/Linux build.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4e17522078fd30bcc4e83a43c03a673a1f98eee1
Jan Kotas [Thu, 1 Dec 2016 01:16:45 +0000 (17:16 -0800)]
Merge pull request dotnet/coreclr#8209 from stephentoub/arraypool_perf
Improve ArrayPool implementation and performance
Commit migrated from https://github.com/dotnet/coreclr/commit/
32e6bf8b03aafe84e6d24e0c36a65dd18d2054ed
Bruce Forstall [Thu, 1 Dec 2016 00:47:24 +0000 (16:47 -0800)]
Merge pull request dotnet/coreclr#8382 from BruceForstall/FixShift
Fix x86 encoder to use 64-bit type to accumulate opcode/prefix bits
Commit migrated from https://github.com/dotnet/coreclr/commit/
392748e2df331ca3cfb9f7b08655f2a4379fc527
Jonghyun Park [Wed, 30 Nov 2016 23:39:55 +0000 (08:39 +0900)]
Exclude jithelp.asm for x86/Linux (dotnet/coreclr#8393)
Commit migrated from https://github.com/dotnet/coreclr/commit/
04820d1435f0df7a5f592dbc6ff420543f447702
Bruce Forstall [Wed, 30 Nov 2016 02:57:18 +0000 (18:57 -0800)]
Fix x86 encoder to use 64-bit type to accumulate opcode/prefix bits
The encoder was using size_t, a 32-bit type on x86, to accumulate opcode
and prefix bits to emit. AVX support uses 3 bytes for prefixes that are
higher than the 32-bit type can handle. So, change all code byte related types
from size_t to a new code_t, defined as "unsigned __int64" on RyuJIT x86
(there is precedence for this type on the ARM architectures).
Fixes dotnet/coreclr#8331
Commit migrated from https://github.com/dotnet/coreclr/commit/
b90516fe443d50cacfe6635d8c1be595d41b8a90
Bruce Forstall [Wed, 30 Nov 2016 21:31:42 +0000 (13:31 -0800)]
Merge pull request dotnet/coreclr#8395 from BruceForstall/FixNYI
Change NYI to be a noway_assert if ALT_JIT is not defined
Commit migrated from https://github.com/dotnet/coreclr/commit/
0b0d51ebfbb2dfd6defe43892d681e42ca9122d0
Jonghyun Park [Wed, 30 Nov 2016 20:23:58 +0000 (05:23 +0900)]
Disable PrintSEHChain for non-Windows platforms (dotnet/coreclr#8379)
PrintSEHChain uses 'EXCEPTION_REGISTRATION_RECORD' which is not
available for non-Windows platforms.
This commit disables PrintSEHChain for non-Windows platforms to fix
build error in x86/Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3ce1795cb62b223029d5d418ca8d8a9dfd25aefc
Jonghyun Park [Wed, 30 Nov 2016 20:19:36 +0000 (05:19 +0900)]
Declare CtorFtnType only when it is used (dotnet/coreclr#8378)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5a8a0c8efb309313399a67b31089c38a77c135bd
Jonghyun Park [Wed, 30 Nov 2016 20:09:36 +0000 (05:09 +0900)]
Disable EHWatsonBucketTracker for non-window platforms (dotnet/coreclr#8373)
Commit migrated from https://github.com/dotnet/coreclr/commit/
883f856ee614f48ab698c627b893c055cd1fb585
Jonghyun Park [Wed, 30 Nov 2016 20:08:20 +0000 (05:08 +0900)]
Disable Windows-specific code for x86/Linux (dotnet/coreclr#8371)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e562be52f31791e51acf4c2f890dce908d72f163
Jonghyun Park [Wed, 30 Nov 2016 20:07:16 +0000 (05:07 +0900)]
Fix mismatch between longfilepathwrappers.cpp and longfilepathwrappers.h (dotnet/coreclr#8370)
'longfilepathwrappers.h' declares several functions without WINAPI
attribute, but 'longfilepathwrappers.cpp' implements them with WINAPI
attributes.
This commit makes the declarations in 'longfilepathwrappers.h'
consistent with the implementations in 'longfilepathwrappers.cpp'.
Commit migrated from https://github.com/dotnet/coreclr/commit/
73c2dc7771ff782ccfdd4a9287d83f807d646131
Jonghyun Park [Wed, 30 Nov 2016 20:06:13 +0000 (05:06 +0900)]
Fix mismatch between sortversioning.h and sortversioning.cpp (dotnet/coreclr#8366)
Commit migrated from https://github.com/dotnet/coreclr/commit/
072408770267ef635fc85adcef81c2f718c0d689
Vance Morrison [Wed, 30 Nov 2016 19:45:17 +0000 (11:45 -0800)]
Fix to avoid stalling the process when ETW is doing a rundown (dotnet/coreclr#8357)
This only matters when there are MANY JIT compiled methods, but Bing operates
in exactly this mode, and thus it stalls for several seconds while rundown completes.
This fix does not fix the problem completely, but it makes it MUCH less likely, and is
a trivial, safe fix. The problem is that as part of a GC, we do cleanup of any removed
JIT code. To do this we take a JIT code manager lock, but this is also a lock that the
JIT code iterator takes and is used during ETW rundown. Thus rundown blocks GCs.
Almost all the time, we DON'T have JIT code manager cleanup to do, so we just avoid
taking the lock in that case, and this makes the stall MUCH less likely.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e26e3551994fd89f9360da7a463628cb7dbe67c5
Jonghyun Park [Wed, 30 Nov 2016 19:42:31 +0000 (04:42 +0900)]
[x86/Linux] Fix mismatch over LPOVERLAPPED_COMPLETION_ROUTINE (dotnet/coreclr#8364)
* Fix the mismatch over LPOVERLAPPED_COMPLETION_ROUTINE
Those functions are compared with Function variable of
LPOVERLAPPED_COMPLETION_ROUTINE type, but has inconsistent type,
- WaitIOCompletionCallback,
- CallbackForInitiateDrainageOfCompletionPortQueue
- CallbackForContinueDrainageOfCompletionPortQueue
This inconsistency results in compile error for x86/Linux build.
This commit fixes such inconsistency.
* Revises 'CallbackForContinueDrainageOfCompletionPortQueue'
Commit migrated from https://github.com/dotnet/coreclr/commit/
0dca8982abf9e3ecdc757b9e8f455eefe8e81c30
Jonghyun Park [Wed, 30 Nov 2016 19:41:10 +0000 (04:41 +0900)]
Emits compile error on portability issue only when PORTABILITY_CHECK is specified (dotnet/coreclr#8340)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a8eebfdd91c9164c9b925f4ee62d9939ab5bf6f1
Jonghyun Park [Wed, 30 Nov 2016 19:40:17 +0000 (04:40 +0900)]
[x86/Linux] Disable FEATURE_AVX_SUPPORT (dotnet/coreclr#8335)
* Disable FEATURE_AVX_SUPPORT for x86/Linux
This commit disables FEATURE_AVX_SUPPORT for x86/Linux to fix dotnet/coreclr#8331.
* Disable FEATURE_AVX_SUPPORT only for x86/Linux
* Disable FEATURE_SIMD for x86/Linux
* Simplify nested if in CMakeList.txt
Commit migrated from https://github.com/dotnet/coreclr/commit/
9883c466a5c73e3c3a9c6850e795071458abeb3b
Jonghyun Park [Wed, 30 Nov 2016 19:39:53 +0000 (04:39 +0900)]
[x86/Linux] Add missing files in x86/Linux PAL (dotnet/coreclr#8318)
* (Partially) Enable x86/Linux PAL
* Fix personality routine address encoding
* Fix build warnings
Commit migrated from https://github.com/dotnet/coreclr/commit/
fc46f78d8f1c2124a0a463dce5bcbba1f6929408
Jonghyun Park [Wed, 30 Nov 2016 19:39:21 +0000 (04:39 +0900)]
Uses portable ROTATE_LEFT for x86/Linux (dotnet/coreclr#8367)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8421585791a6a8d7c7237b673944474643f06a6b
Stephen Toub [Wed, 30 Nov 2016 19:33:11 +0000 (14:33 -0500)]
Merge pull request dotnet/coreclr#8401 from svick/task-action-delegate
Change the type of Task.m_action to Delegate
Commit migrated from https://github.com/dotnet/coreclr/commit/
ed559fb98b7221128e4ef31967651b1a863da913
Jonghyun Park [Wed, 30 Nov 2016 14:23:29 +0000 (23:23 +0900)]
Fix mismatch between signature and implementation of ActivationFunctions (dotnet/coreclr#8394)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1ab34fa83f5f5479065b85d3d902e533e167ec2d
SaeHie Park [Wed, 30 Nov 2016 14:21:04 +0000 (23:21 +0900)]
[x86/Linux] Fix prototype for GCThreadStub (dotnet/coreclr#8397)
Fix compile error for x86/Linux
- fix "cannot initialize a parameter of type 'LPTHREAD_START_ROUTINE'"
- add __stdcall GCThreadStub as it's Windows/Linux common code
Commit migrated from https://github.com/dotnet/coreclr/commit/
fa6222d52a81c24077206cf5082b2f3967e67ebc
Matt Warren [Wed, 30 Nov 2016 07:45:21 +0000 (07:45 +0000)]
Adding missing ctor - 'public Span(T[] array, int start)' (dotnet/coreclr#8354)
Commit migrated from https://github.com/dotnet/coreclr/commit/
fb5f8d70e8b85e084af2cb52b70914b3428652a1
Jonghyun Park [Wed, 30 Nov 2016 07:44:11 +0000 (16:44 +0900)]
Updates m_LastRedirectIP and m_SpinCount only for non-Unix platforms (dotnet/coreclr#8386)
Both variables are available only for non-Unix platforms.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ce9a231f1498719eb665e2017611d7bfeb41ed49
SaeHie Park [Wed, 30 Nov 2016 07:42:25 +0000 (16:42 +0900)]
[x86/Linux] Fix extraneous parentheses (dotnet/coreclr#8388)
Fix compile error for x86/Linux
- fix "equality comparison with extraneous parentheses" for LEGACY_BACKEND
Commit migrated from https://github.com/dotnet/coreclr/commit/
5c4fe045b9b6873158a85cec2458af80c5570d0a
SaeHie Park [Wed, 30 Nov 2016 07:41:44 +0000 (16:41 +0900)]
[x86/Linux] Fix error: '&&' within '||' (dotnet/coreclr#8391)
Fix compile error for x86/Linux
- place parentheses around the '&&' expression to silence this
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d6db5301fdea84ac8c798dcc3c051dc85f3411e
Bruce Forstall [Wed, 30 Nov 2016 06:43:26 +0000 (22:43 -0800)]
Change NYI to be a noway_assert if ALT_JIT is not defined
We recently changed RyuJIT/x86 to be the default JIT. However, there
are still a few NYI that can happen, such as when enabling SIMD,
which is not enabled yet. However, there is no "fallback" JIT anymore.
So just treat all NYI as asserts.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bea51b77342bf326ae7178bc06c3e79e3d697624
John Chen [Wed, 30 Nov 2016 03:50:09 +0000 (19:50 -0800)]
Capture YMM registers on OSX (dotnet/coreclr#8365)
Also fixed checking of context flags on OSX (issue dotnet/coreclr#8116)
Commit migrated from https://github.com/dotnet/coreclr/commit/
85c0a5641d60aabe028a9e4b4ef07a7b58a2181b
Jonghyun Park [Wed, 30 Nov 2016 03:08:19 +0000 (12:08 +0900)]
[x86/Linux] Add virtual dtor for ArrayStubCache class (dotnet/coreclr#8339)
* Adds virtual dtor for ArrayStubCache class
* Remove unnecessary default destructor
Commit migrated from https://github.com/dotnet/coreclr/commit/
89440daa5cfe3ad814b9caac6bd47c5d7ffc6d9b
Andy Ayers [Wed, 30 Nov 2016 03:00:26 +0000 (19:00 -0800)]
Remove one virtual call from StreamHelpers.ValidateCopyToArgs (dotnet/coreclr#8361)
Check CanWrite on the destination stream first.
In the common case CanWrite is true, and CanRead is only needed to
determine which kind of exception to throw when CanWrite is false.
Commit migrated from https://github.com/dotnet/coreclr/commit/
85a1a1d4e981e184f2f5d91c41a4d3be2a4ea3fa
Jonghyun Park [Wed, 30 Nov 2016 02:57:27 +0000 (11:57 +0900)]
Fix inconsistency between the signatures of GetAppDomain (dotnet/coreclr#8368)
Commit migrated from https://github.com/dotnet/coreclr/commit/
defed5e515109252cef6e000ffb4139424ae89f6
SaeHie Park [Wed, 30 Nov 2016 02:55:33 +0000 (11:55 +0900)]
[x86/Linux] Disable WIN64EXECPTION and fix related changes (dotnet/coreclr#8375)
Fix compile error for x86/Linux
- undo some changes to disable WIN64EXCEPTION so the x86/Linux builds
Commit migrated from https://github.com/dotnet/coreclr/commit/
a6efd617d94845de4327e2347b78c9e44edc58f9
Pat Gavlin [Wed, 30 Nov 2016 00:24:22 +0000 (16:24 -0800)]
Merge pull request dotnet/coreclr#8315 from mikedn/disasm
Fix various disassembly issues
Commit migrated from https://github.com/dotnet/coreclr/commit/
dcc36dfeb6d912fd69f467725837b4797b2158ba
Michelle McDaniel [Tue, 29 Nov 2016 21:49:49 +0000 (13:49 -0800)]
Merge pull request dotnet/coreclr#8355 from adiaaida/formattingFix
Fix formatting in files
Commit migrated from https://github.com/dotnet/coreclr/commit/
513d7e51a644beef0214906f6e9f40e1bfbff6aa
Sivarv [Tue, 29 Nov 2016 20:12:50 +0000 (12:12 -0800)]
Merge pull request dotnet/coreclr#8291 from sivarv/sse34
Enable use of SSE3_4 instruction set for SIMD codegen.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6549b7ac4129578e40e3bc2c5df5f7bba21bf137
Michelle McDaniel [Tue, 29 Nov 2016 19:02:20 +0000 (11:02 -0800)]
Fix formatting in files
In morph and flowgraph, we had an instance where an opening/closing
brace was inside a #if when it should not have been, which broke our
formatting on these files. This change fixes that error and reformats
the files.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8667ae142c3c5f500a2f112fb4f541f7cc0d9d84
Bruce Forstall [Tue, 29 Nov 2016 18:39:11 +0000 (10:39 -0800)]
Merge pull request dotnet/coreclr#8330 from BruceForstall/FixSSE2Assert
Force enable SSE2 on RyuJIT/x86 on desktop
Commit migrated from https://github.com/dotnet/coreclr/commit/
9acf67c52a0448f45ac8da79369bc229a40ef4d0
Jan Kotas [Tue, 29 Nov 2016 18:09:54 +0000 (10:09 -0800)]
Merge pull request dotnet/coreclr#8351 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
03e5bfc4f364f6efb77558b13229ed3c6e838703
Jan Vorlicek [Tue, 29 Nov 2016 18:09:35 +0000 (19:09 +0100)]
Fix shared library dependencies verification on some platforms (dotnet/coreclr#8349)
The existing way of verifying shared library dependencies, used for
System.Globalization.Native.so, doesn't work on platforms that don't
have ldd or where ldd doesn't support the `-r` option.
This change makes the check happen on non-Alpine Linux only for now.
It also refactors the way the check is performed. Instead of doing it
post build in the build.sh, it is now performed as a postbuild phase
of the System.Globalization.Native target and it is also generalized
so that we can easily add such verification to other build targets.
The new verify-so.sh script is also used in corefx.
Commit migrated from https://github.com/dotnet/coreclr/commit/
74816870ce9ff5ec41d30455a7dcc3b5d327bf45
John Chen [Tue, 29 Nov 2016 17:10:40 +0000 (09:10 -0800)]
Disable CER feature as it is not used (dotnet/coreclr#8218)
Use FEATURE_CER to scope CER code,
and disable CER feature in CoreCLR.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e67851210d1c03d730a3bc97a87e8a6713bbf772
Petr Onderka [Tue, 29 Nov 2016 17:06:16 +0000 (18:06 +0100)]
Use invariant culture in test (dotnet/coreclr#8327)
This makes sure the test passes on machines
where the decimal separator of the default culture is comma.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c1e15f43e313d33bb60cdc04131e6cf720d7150f
Bruce Forstall [Tue, 29 Nov 2016 16:56:19 +0000 (08:56 -0800)]
Fix AMD64 CTP build break
[tfs-changeset: 1639770]
Commit migrated from https://github.com/dotnet/coreclr/commit/
3b21d92f677251957eabcece8fd9490f140d8945
Jan Vorlicek [Tue, 29 Nov 2016 14:12:02 +0000 (15:12 +0100)]
Fix phantom TEXTREL in libcoreclr.so (dotnet/coreclr#8347)
This change fixes the problem where scanelf tool reported that libcoreclr.s
contains TEXTRELs, however it was unable to find any.
It turns out there actually were TEXTRELs, but not in the program code or
program data, but rather in the DWARF tables. The NESTED_ENTRY macro for
ARM64 and AMD64 uses .cfi_personality with encoding 0, which means
absolute address. This is the source of the TEXTREL.
Changing the encoding to 0x1b - DW_EH_PE_pcrel | DW_EH_PE_sdata4 fixes the
problem - the scanelf tool no longer reports any TEXTRELs in libcoreclr.so.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a60661ea96f6760d6cfd8e1e86c370f7e7052ed0
Jonghyun Park [Tue, 29 Nov 2016 12:58:07 +0000 (21:58 +0900)]
Uses 'W' to fix build error (dotnet/coreclr#8345)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6c870a3e37bead1aecf2fa898fcefbefd8e7543a
Jonghyun Park [Tue, 29 Nov 2016 11:24:51 +0000 (20:24 +0900)]
Fix the mistmatch between gc_thread_stub and GCThreadFunction (dotnet/coreclr#8336)
Commit migrated from https://github.com/dotnet/coreclr/commit/
31c5791b1c81800703655f7d306b030e3cde9bd2
Jonghyun Park [Tue, 29 Nov 2016 11:14:22 +0000 (20:14 +0900)]
Fix ignored attribute warning for x86/Linux build (dotnet/coreclr#8334)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3f85c4c9c5a0ad78a4ed0f12c389b5c50c4527d6
Mike Danes [Fri, 25 Nov 2016 08:00:58 +0000 (10:00 +0200)]
Fix various disassembly issues
- (null) being displayed instead of ymmword ptr
- lack of a space between some instructions and their first operand
- incorrect display of pmovmskb's first operand (was something like yrax)
- displaying ymm registers in cases where xmm registers were actually used
- displaying mm instead of xmm/ymm (e.g. cmpps mm1, mm2)
Commit migrated from https://github.com/dotnet/coreclr/commit/
10f3d635975ebb9b70ec6173562dd9c11227dfc9
Bruce Forstall [Tue, 29 Nov 2016 02:19:07 +0000 (18:19 -0800)]
Force enable SSE2 on RyuJIT/x86 on desktop
SSE2 is required for RyuJIT/x86; there is no x87 code path.
The .NET Core VM sets the JIT flag enabling this, and we assert
it does. On desktop, however, especially under NGEN, it does not.
We ignore that, and generate SSE2 code anyway.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a7ee82d87e6c4d40c70e77adeae2aa4978d6f5fa
Jan Kotas [Tue, 29 Nov 2016 02:00:57 +0000 (18:00 -0800)]
Disable PSPSym and LocAllocSPvar for CoreRT (dotnet/coreclr#8319)
The establisher frame definition differs between CoreRT ABI and CoreCLR ABI. In CoreRT ABI created by @russellhadley and @smosier while back, the establisher frame is always the SP value at the point that control left the frame in which execution would resume after a catch handler completes. This mismatch leads to crashes when PSPSym is recomputed in funclets of methods with localloc.
Fixed by disabling PSPSym for CoreRT since it does not need it. Also disabled LocAllocSPvar while I was on it since it is not needed for CoreRT either.
Fixes https://github.com/dotnet/corert/issues/2255
Commit migrated from https://github.com/dotnet/coreclr/commit/
8de587f3b6d45be23f5178f510e260e470f2ef4f