platform/upstream/coreclr.git
8 years agoRename some IL tests whose names conflicted with C# tests
Russ Keldorph [Mon, 16 May 2016 22:23:15 +0000 (15:23 -0700)]
Rename some IL tests whose names conflicted with C# tests

For catchrettoinnertry, we appeared to have some redundant test projects.
I removed the redundant ones and cleaned up the remaining.

Fixes #3379

8 years agoMerge pull request #4985 from adiaaida/2442
Michelle McDaniel [Mon, 16 May 2016 22:03:35 +0000 (15:03 -0700)]
Merge pull request #4985 from adiaaida/2442

Update Boxing\xlang projs with correct project includes

8 years agoMerge pull request #4982 from LLITCHEV/Issue4853
Lubomir Litchev [Mon, 16 May 2016 20:42:06 +0000 (13:42 -0700)]
Merge pull request #4982 from LLITCHEV/Issue4853

Remove invalid tests.

8 years agoUpdate sin projs with correct project includes
Michelle McDaniel [Fri, 13 May 2016 15:15:20 +0000 (08:15 -0700)]
Update sin projs with correct project includes

All of the xlang sin ilprojs were missing includes to the correct
references. This change updates the proj files with those
ProjectReferences. Additionally, this change updates the includes in the
il tests to match the name of sinlib assemblies.

Fixes #2442.

8 years agoMerge pull request #4965 from adiaaida/disableRegPair
Michelle McDaniel [Mon, 16 May 2016 19:47:52 +0000 (12:47 -0700)]
Merge pull request #4965 from adiaaida/disableRegPair

Disable RegPair for x86 Longs

8 years agoMerge pull request #4905 from JeremyKuhne/JeremyKuhne-buildupdate
Jeremy Kuhne [Mon, 16 May 2016 18:52:36 +0000 (11:52 -0700)]
Merge pull request #4905 from JeremyKuhne/JeremyKuhne-buildupdate

Update windows instructions

8 years agoMerge pull request #4978 from ellismg/add-fedora-23
Matt Ellis [Mon, 16 May 2016 18:19:23 +0000 (11:19 -0700)]
Merge pull request #4978 from ellismg/add-fedora-23

Add Fedora 23 runs

8 years agoMerge remote-tracking branch 'origin/master' into Issue4853
Lubomir Litchev [Mon, 16 May 2016 17:35:30 +0000 (10:35 -0700)]
Merge remote-tracking branch 'origin/master' into Issue4853

Conflicts:
tests/testsFailingOutsideWindows.txt

8 years agoMerge pull request #4974 from RussKeldorph/xfails
Russ Keldorph [Mon, 16 May 2016 17:24:42 +0000 (10:24 -0700)]
Merge pull request #4974 from RussKeldorph/xfails

Test cleanup (mostly non-Windows failures)

8 years agoDisable RegPair for x86 Longs
Michelle McDaniel [Fri, 13 May 2016 15:35:23 +0000 (08:35 -0700)]
Disable RegPair for x86 Longs

We are not using regpairs for longs on x86 ryujit, so we need to turn off
CPU_LONG_USES_REGPAIR. This is the first step to getting var = call for
GT_CALLs with long return types on x86.

8 years agoMerge remote-tracking branch 'origin/master' into Issue4853
Lubomir Litchev [Mon, 16 May 2016 06:42:55 +0000 (23:42 -0700)]
Merge remote-tracking branch 'origin/master' into Issue4853

Conflicts:
tests/issues.targets
tests/src/JIT/Methodical/cctor/misc/tail.il
tests/src/JIT/Methodical/cctor/misc/threads3.il
tests/src/JIT/Methodical/cctor/simple/precise3.il
tests/x86_legacy_backend_issues.targets

8 years agoMerge pull request #4969 from gkhanna79/RelaxALC
Gaurav Khanna [Mon, 16 May 2016 03:55:02 +0000 (20:55 -0700)]
Merge pull request #4969 from gkhanna79/RelaxALC

Enable overriding assemblies from TPA

8 years agoRemove invalid tests.
Lubomir Litchev [Sun, 15 May 2016 22:54:30 +0000 (15:54 -0700)]
Remove invalid tests.

See comments at issue #4853 for the why these tests are invalid.

Other tests in the same directories are covering the valid cases, so
removing these.

Fixes #4853

8 years agoMerge pull request #4979 from dotnet-bot/from-tfs
Jan Kotas [Sun, 15 May 2016 19:57:06 +0000 (12:57 -0700)]
Merge pull request #4979 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoEnable overriding assemblies from TPA
Gaurav Khanna [Fri, 13 May 2016 16:55:19 +0000 (09:55 -0700)]
Enable overriding assemblies from TPA

8 years agoFix arm and x86 build breaks
Jan Kotas [Sun, 15 May 2016 07:28:02 +0000 (00:28 -0700)]
Fix arm and x86 build breaks

[tfs-changeset: 1604843]

8 years agoAdd Fedora 23 runs
Matt Ellis [Sun, 15 May 2016 06:54:21 +0000 (23:54 -0700)]
Add Fedora 23 runs

8 years agoRemove unneeded INLINE_NDIRECT and INLINE_PINVOKE #ifdefs (#4977)
Bruce Forstall [Sun, 15 May 2016 06:53:51 +0000 (23:53 -0700)]
Remove unneeded INLINE_NDIRECT and INLINE_PINVOKE #ifdefs (#4977)

8 years agoMerge pull request #4976 from dotnet-bot/from-tfs
Matt Ellis [Sun, 15 May 2016 06:09:52 +0000 (23:09 -0700)]
Merge pull request #4976 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoMerge pull request #4967 from BruceForstall/Fix3235
Bruce Forstall [Sun, 15 May 2016 04:23:52 +0000 (21:23 -0700)]
Merge pull request #4967 from BruceForstall/Fix3235

Change referenced common.dll assembly to lower-case

8 years agoFix build breaks in arm64 and legacy internal amd64 builds
Jan Kotas [Sun, 15 May 2016 04:20:09 +0000 (21:20 -0700)]
Fix build breaks in arm64 and legacy internal amd64 builds

[tfs-changeset: 1604829]

8 years agoUse different value for win32resource for System.Private.CoreLib. (#4964)
AlexGhiondea [Sun, 15 May 2016 04:15:16 +0000 (21:15 -0700)]
Use different value for win32resource for System.Private.CoreLib. (#4964)

When building both mscorlib and System.Private.CoreLib we should use a different name to avoid conflicting on this file.

8 years agoTest cleanup (mostly non-Windows failures)
Russ Keldorph [Sat, 14 May 2016 13:52:19 +0000 (06:52 -0700)]
Test cleanup (mostly non-Windows failures)

Clean up the hodgepodge of failures in #2450.  Many of them are simply bad
exclusions for tests that don't exist either because they were deleted or
never actually ported.  The rest were fixed more or less as recommended by
@LLITCHEV.

Fixes #2450

8 years agoMerge pull request #4972 from RussKeldorph/fix2235
Russ Keldorph [Sun, 15 May 2016 00:41:18 +0000 (17:41 -0700)]
Merge pull request #4972 from RussKeldorph/fix2235

Re-enable arrres.il test

8 years agoChange referenced common.dll assembly to lower-case
Bruce Forstall [Fri, 13 May 2016 16:42:17 +0000 (09:42 -0700)]
Change referenced common.dll assembly to lower-case

Also, change ILPart.dll to lower-case.

Fixes a bunch of tests that were failing on Ubuntu. Re-enable those.

Fixes #3235.

8 years agoAdd support for reverse PInvoke callouts to the JIT (#4952)
Jan Kotas [Sat, 14 May 2016 06:40:00 +0000 (23:40 -0700)]
Add support for reverse PInvoke callouts to the JIT (#4952)

8 years agoMerge pull request #4927 from ramarag/ModifyBuildOnly
Rama krishnan Raghupathy [Sat, 14 May 2016 05:32:52 +0000 (22:32 -0700)]
Merge pull request #4927 from ramarag/ModifyBuildOnly

Removing Redundant  Projects that are BuildOnly:

8 years agoRe-enable arrres.il test
Russ Keldorph [Sat, 14 May 2016 04:19:36 +0000 (21:19 -0700)]
Re-enable arrres.il test

arrres.il is a quesionable test case because it relies on finalizers being
run even though the JIT is allowed to extend the lifetime of objects
beyond the point where finalizer effects are checked.  The test could be
fixed, but for now I'm just marking it as requiring optimization, which is
what has been done previously.  I'm deleting the "dbg" project because it
is the same as the "rel" project except that it disables optimization.

Fixes #2330

8 years agoInitial implementation of generic dictionary access for R2R. (#4519)
Fadi Hanna [Sat, 14 May 2016 03:35:54 +0000 (20:35 -0700)]
Initial implementation of generic dictionary access for R2R. (#4519)

For now, only TypeHandle dictionary entry slots are supported and encoded in a R2R version resilient format (the rest to come soon).
Support is only limited for x64 Windows platforms (rest is still TODO)

The basic idea: each dictionary access is initally a call to a DynamicHelper R2R cell that computes the dictionary signature, and patches the R2R cell address with an assembly stub that performs the dictionary lookup.

8 years agoRemoving Redundant Projects that are BuildOnly :
Rama krishnan Raghupathy [Thu, 12 May 2016 06:56:29 +0000 (23:56 -0700)]
Removing Redundant Projects that are BuildOnly :
RunOnly Projects should refer to only BuildAndRun projects
BuildOnly projects are to be used only for Non-Execution cases
and custom execution drivers

8 years agoPort string.PadLeft and string.PadRight from CoreRT (#4968)
Bruce Bowyer-Smyth [Sat, 14 May 2016 02:25:22 +0000 (12:25 +1000)]
Port string.PadLeft and string.PadRight from CoreRT (#4968)

8 years agoMerge pull request #4970 from dotnet-bot/from-tfs
Jan Kotas [Sat, 14 May 2016 02:24:38 +0000 (19:24 -0700)]
Merge pull request #4970 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoFix a PCH-related issue in the jitstdout change.
Pat Gavlin [Fri, 13 May 2016 23:39:52 +0000 (16:39 -0700)]
Fix a PCH-related issue in the jitstdout change.

[tfs-changeset: 1604771]

8 years agoMerge pull request #4901 from LLITCHEV/Issue4801
Jarret Shook [Fri, 13 May 2016 23:37:32 +0000 (16:37 -0700)]
Merge pull request #4901 from LLITCHEV/Issue4801

Add a issues target file with tests to be excluded on jit32 x86.

8 years agoAdd a issues target file with thests to be excluded on jit32 x86.
Lubomir Litchev [Tue, 10 May 2016 23:44:40 +0000 (16:44 -0700)]
Add a issues target file with thests to be excluded on jit32 x86.

8 years agoMerge pull request #4922 from adityamandaleeka/remove_getfilenamefromsymlink
Aditya Mandaleeka [Fri, 13 May 2016 21:45:27 +0000 (14:45 -0700)]
Merge pull request #4922 from adityamandaleeka/remove_getfilenamefromsymlink

Change how PAL file I/O functions treat symbolic links

8 years agoMerge pull request #4958 from swgillespie/disable-gcstress
Sean Gillespie [Fri, 13 May 2016 21:13:21 +0000 (14:13 -0700)]
Merge pull request #4958 from swgillespie/disable-gcstress

Exclude from GCStress a few tests that take an unreasonably long time to complete

8 years agoMerge pull request #4942 from pgavlin/gh4832
Pat Gavlin [Fri, 13 May 2016 21:02:56 +0000 (14:02 -0700)]
Merge pull request #4942 from pgavlin/gh4832

Use a JIT-specific stdout `FILE*`.

8 years agoMerge pull request #4957 from RussKeldorph/fix2235
Russ Keldorph [Fri, 13 May 2016 20:55:41 +0000 (13:55 -0700)]
Merge pull request #4957 from RussKeldorph/fix2235

Reenable passing tests

8 years agoMerge pull request #4961 from AndyAyersMS/RandomInlineBudgetLimit
Andy Ayers [Fri, 13 May 2016 20:23:49 +0000 (13:23 -0700)]
Merge pull request #4961 from AndyAyersMS/RandomInlineBudgetLimit

Add budget check to RandomPolicy

8 years agoMerge pull request #4955 from briansull/fix-asmdiff
Brian Sullivan [Fri, 13 May 2016 19:51:37 +0000 (12:51 -0700)]
Merge pull request #4955 from briansull/fix-asmdiff

Fix issue with Arm64 AsmDiffs

8 years agoMerge pull request #4956 from mmitche/gcstress-no-push
Matt Mitchell [Fri, 13 May 2016 19:02:43 +0000 (12:02 -0700)]
Merge pull request #4956 from mmitche/gcstress-no-push

Run gcstress pri1r2r only a few times a week

8 years agoMerge pull request #4959 from tijoytom/master
tijoytom [Fri, 13 May 2016 18:44:26 +0000 (11:44 -0700)]
Merge pull request #4959 from tijoytom/master

Renaming to StringToCoTaskMemUTF8

8 years agoAdd budget check to RandomPolicy
Andy Ayers [Fri, 13 May 2016 18:32:49 +0000 (11:32 -0700)]
Add budget check to RandomPolicy

Prevents RandomPolicy from being overly aggressive with small methods
that can lead to excessive inlining.

Closes #4711. Undoes #4704.

8 years agoRenaming the API StringToCoTaskMemUTF8 since we
tijoytk [Fri, 13 May 2016 18:07:28 +0000 (11:07 -0700)]
Renaming the API StringToCoTaskMemUTF8 since we
need to be consistent with existing one.Also
fixing a merge conflict.

8 years agoExclude from GCStress a few tests that take an unreasonably long time to complete
Sean Gillespie [Fri, 13 May 2016 17:38:19 +0000 (10:38 -0700)]
Exclude from GCStress a few tests that take an unreasonably long time to complete

8 years agoRun gcstress pri1r2r only a few times a week
Matt Mitchell [Fri, 13 May 2016 17:19:57 +0000 (10:19 -0700)]
Run gcstress pri1r2r only a few times a week

Currently this is set on push, but since it can take days to run this is a bad idea

8 years agoReenable passing tests
Russ Keldorph [Fri, 13 May 2016 17:12:52 +0000 (10:12 -0700)]
Reenable passing tests

Many of the tests listed in #2235 are now passing since their dependencies
have been fixed.  b57367 is a notable exception; it's static dependency is
now satisfied, but at runtime it loads a type that is not present in .NET
Core.  I'm deleting it because I verified there are other tests that test
the same load/invoke pattern (on different types).

The rest of the tests listed in #2235 have already been deleted for other
reasons.

Fixes #2235

8 years agoFix issue with Arm64 AsmDiffs
Brian Sullivan [Fri, 13 May 2016 17:11:58 +0000 (10:11 -0700)]
Fix issue with Arm64 AsmDiffs

8 years agoMerge pull request #4911 from tijoytom/master
tijoytom [Fri, 13 May 2016 17:08:23 +0000 (10:08 -0700)]
Merge pull request #4911 from tijoytom/master

Marshaling helpers for MarshalAs LPUTF8Str.

8 years agoMerge pull request #4813 from pgavlin/gh3058
Pat Gavlin [Fri, 13 May 2016 13:30:46 +0000 (06:30 -0700)]
Merge pull request #4813 from pgavlin/gh3058

Disable FEATURE_MERGE_JIT_AND_ENGINE on *nix.

8 years agoMerge pull request #4921 from AndyAyersMS/InlineReplay
Andy Ayers [Fri, 13 May 2016 07:34:40 +0000 (00:34 -0700)]
Merge pull request #4921 from AndyAyersMS/InlineReplay

Inliner: introduce ReplayPolicy

8 years agoAddress code review feedback.
Pat Gavlin [Fri, 13 May 2016 03:48:39 +0000 (20:48 -0700)]
Address code review feedback.

Flip the order of the PID and activation function checks in the activation
signal handler.

8 years agoChain activation signal handlers in the PAL.
Pat Gavlin [Wed, 11 May 2016 20:41:07 +0000 (13:41 -0700)]
Chain activation signal handlers in the PAL.

The handler for the PAL's activation signal (`SIGRTMIN` on Linux) was
not properly chaining to the previous handler. This caused problems
with thread suspension on Linux in the case that multiple PALs were
loaded in a process: whichever PAL was loaded last would handle the
signal, and if that PAL was not configured to perform the appropriate
thread suspension, the runtime would hang.

8 years agoMerge pull request #4941 from gkhanna79/Fix4938
Gaurav Khanna [Fri, 13 May 2016 03:42:13 +0000 (20:42 -0700)]
Merge pull request #4941 from gkhanna79/Fix4938

Enable SHA256 to be used as hashing algorithm for compiler/assembler

8 years agoMerge pull request #4945 from dotnet-bot/from-tfs
Matt Ellis [Fri, 13 May 2016 02:48:23 +0000 (19:48 -0700)]
Merge pull request #4945 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoStop using SYS_delete syscall for deleting files.
Aditya Mandaleeka [Fri, 13 May 2016 01:04:47 +0000 (18:04 -0700)]
Stop using SYS_delete syscall for deleting files.

8 years agoAdd tests for file IO functions operating on symlinks.
Aditya Mandaleeka [Wed, 11 May 2016 23:58:54 +0000 (16:58 -0700)]
Add tests for file IO functions operating on symlinks.

8 years agoMerge pull request #4932 from JohnChen0/r2r
John Chen [Fri, 13 May 2016 00:39:03 +0000 (17:39 -0700)]
Merge pull request #4932 from JohnChen0/r2r

Fix contract violations in Ready to Run code

8 years agoMerge pull request #4933 from dotnet-bot/from-tfs
Kyungwoo Lee [Fri, 13 May 2016 00:00:18 +0000 (17:00 -0700)]
Merge pull request #4933 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoInliner: introduce ReplayPolicy
Andy Ayers [Tue, 10 May 2016 21:19:41 +0000 (14:19 -0700)]
Inliner: introduce ReplayPolicy

The ReplayPolicy reads an external script to determine which inlines
to perform. The script is the same Xml syntax that's produced by
the inliner when JitInlineDumpXml is enabled. This format can be edited
by hand or tool to force particular inlining patterns to occur. Methods
or calls sites not mentioned in the script are considered as noinline.

There's a bunch of work still left to make this fully robust, but in
testing it works well enough for my immediate use case that I'll hold
off on further polish until it's needed. But, for future reference,
here's a laundry list:

* Need better ways to identify methods. Token and hash are not enough.
* Need better ways to identify call sites. Callee token is not enough.
* Consider preparsing or mapping the script into memory.
* Consider caching node positions in the InlineContexts.
* Make it robust for multithreading.
* Handle the prejit root case somehow.
* Possibly allow overriding of inline attributes.

8 years agoUpdate first-class-structs.md
Carol Eidt [Thu, 12 May 2016 23:34:00 +0000 (16:34 -0700)]
Update first-class-structs.md

Update some progress and fix some formatting

8 years agoUse a JIT-specific stdout `FILE*`.
Pat Gavlin [Thu, 12 May 2016 21:32:13 +0000 (14:32 -0700)]
Use a JIT-specific stdout `FILE*`.

Historically, the JIT has had issues with logging inside of processes
that change the output mode of stdout (e.g. crossgen). This change
replaces the previous solution (which relied on #ifdefs) by dup'ing
the stdout file and wrapping it in a new `FILE*` set to a known
output mode.

8 years agoEnable SHA256 to be used as hashing algorithm for compiler/assembler
Gaurav Khanna [Thu, 12 May 2016 23:08:10 +0000 (16:08 -0700)]
Enable SHA256 to be used as hashing algorithm for compiler/assembler

8 years agoSmall formatting fix
Russ Keldorph [Thu, 12 May 2016 23:07:27 +0000 (16:07 -0700)]
Small formatting fix

8 years agoMerge pull request #4899 from swgillespie/gcsimulator-fixup
Sean Gillespie [Thu, 12 May 2016 21:55:12 +0000 (14:55 -0700)]
Merge pull request #4899 from swgillespie/gcsimulator-fixup

Enable the GCSimulator CI run to run on a regular basis

8 years agoMarshaling helpers for MarshalAs LPUTF8Str.
tijoytk [Wed, 11 May 2016 17:00:52 +0000 (10:00 -0700)]
Marshaling helpers for MarshalAs LPUTF8Str.

8 years agoMerge pull request #4915 from tarekgh/FixLowerAsciiCharChecks
Tarek Mahmoud Sayed [Thu, 12 May 2016 20:17:40 +0000 (13:17 -0700)]
Merge pull request #4915 from tarekgh/FixLowerAsciiCharChecks

Fix the optimization check to call ordinal

8 years agoFix contract violations in Ready to Run code
John Chen (CLR) [Thu, 12 May 2016 17:02:33 +0000 (10:02 -0700)]
Fix contract violations in Ready to Run code

8 years agoApply the JIT interface changes needed for Fadi's upcoming shared generics change.
Pat Gavlin [Thu, 12 May 2016 19:57:13 +0000 (12:57 -0700)]
Apply the JIT interface changes needed for Fadi's upcoming shared generics change.

[tfs-changeset: 1604316]

8 years agoUpdate unix-test-instructions.md
Aditya Mandaleeka [Thu, 12 May 2016 19:51:46 +0000 (12:51 -0700)]
Update unix-test-instructions.md

Add quotes around coreFxBinDir in unix-test-instructions document.

8 years agoFix trival build break, with warning treated as error for jmpDist usage
Brian Sullivan [Thu, 12 May 2016 18:21:17 +0000 (11:21 -0700)]
Fix trival build break, with warning treated as error for jmpDist usage

[tfs-changeset: 1604285]

8 years agoMerge pull request #4931 from dotnet-bot/from-tfs
Bruce Forstall [Thu, 12 May 2016 17:59:50 +0000 (10:59 -0700)]
Merge pull request #4931 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoMerge pull request #4419 from ellismg/change-default-locale
Matt Ellis [Thu, 12 May 2016 17:42:33 +0000 (10:42 -0700)]
Merge pull request #4419 from ellismg/change-default-locale

Change how we detect the default locale

8 years agoMerge pull request #4919 from kyulee1/switch
Kyungwoo Lee [Thu, 12 May 2016 17:24:56 +0000 (10:24 -0700)]
Merge pull request #4919 from kyulee1/switch

ARM64: Switch Expansion Using Jump Table

8 years agoARM64: Switch Expansion Using Jump Table
Kyungwoo Lee [Thu, 12 May 2016 04:48:40 +0000 (21:48 -0700)]
ARM64: Switch Expansion Using Jump Table

Fixes #3332
To validate various addressing in #4896, I just enable this.
Previously, we only allow a load operation to JIT data (`ldr` or
`IF_LARGELDC`).
For switch expansion, jump table is also recorded into JIT data.
In this case, we only get the address of jump table head, and
load the right entry after computing offset. So, basically `adr` or
`IF_LARGEADR` is used to not only load label within code but also refer to
the location of JIT data.
The typical code sequence for switch expansion is like this:

```
  adr     x8, [@RWD00]          // load address of jump table head
  ldr     w8, [x8, x0, LSL #2]  // load jump entry from table addr + x0 * 4
  adr     x9, [G_M56320_IG02]   // load address of current baisc block
  add     x8, x8, x9            // Add them to compute the final target
  br      x8                    // Indirectly jump to the target
```

8 years agoFix desktop build
Jan Kotas [Thu, 12 May 2016 15:54:17 +0000 (08:54 -0700)]
Fix desktop build

[tfs-changeset: 1604234]

8 years agoMerge pull request #4926 from mylibero/issue4925
Kyungwoo Lee [Thu, 12 May 2016 15:46:53 +0000 (08:46 -0700)]
Merge pull request #4926 from mylibero/issue4925

Fixed a build error on ARM

8 years agoFixed a build error on ARM
Dongyun Jin [Thu, 12 May 2016 06:24:07 +0000 (15:24 +0900)]
Fixed a build error on ARM

The recent commit (61fe464) breaks ARM build.
It defines emitInsToJumpKind twice in src/jit/emit.h on ARM.

Signed-off-by: Dongyun Jin <dongyun.jin@samsung.com>
Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
8 years agoMerge pull request #4872 from vancem/FixETWArgs
David Mason [Thu, 12 May 2016 04:45:31 +0000 (21:45 -0700)]
Merge pull request #4872 from vancem/FixETWArgs

Fix problem getting arguments from ETW to an EventSource.

8 years agoMerge pull request #4896 from kyulee1/longjmp
Kyungwoo Lee [Thu, 12 May 2016 04:37:47 +0000 (21:37 -0700)]
Merge pull request #4896 from kyulee1/longjmp

ARM64: Enable Long Address

8 years agoMerge pull request #4920 from pgavlin/JitStandaloneDefs
Pat Gavlin [Thu, 12 May 2016 04:21:47 +0000 (21:21 -0700)]
Merge pull request #4920 from pgavlin/JitStandaloneDefs

Remove the use of `CROSSGEN_COMPILE` in jitconfigvalues.h.

8 years agoARM64: Enable Long Address
Kyungwoo Lee [Fri, 6 May 2016 15:11:08 +0000 (08:11 -0700)]
ARM64: Enable Long Address

Fixes https://github.com/dotnet/coreclr/issues/3668
Currently ARM64 codegen can have reference within +/-1 MB due to encoding
restriction in `b<cond>/adr/ldr` instructions. This is normally okay
assuming each function is reasonably small, but certainly not working for large method which also
can be formed with an aggressive inlining probably like crossgen/corert scenarios.
In addition, for hot/cold code separation long address is a prerequisite
since reference can be across different regions which are arbitrary.
In fact, we need additional relocations which are not in this change yet.

In details, this supports long address for conditional jump/address loading/constant
loading operations by default while they can be shortened later by
`emitJumpDistBind()` if they can fit into the smaller encoding. Logically
those operations now can reach within +/-4GB address range.
Note I haven't extended unconditional jump in this change for simplicity
so it can reach within +/-128MB same as before.
`emitOutputLJ` is extended to finally encode these operations.

There are 3 pseudo instructions introduced. These can be expanded either
short/long form.

1. Conditional jump. See `emitIns_J()`
   a. Short form(`IF_BI_0B`): `b<cond> rel_addr`
   b. Long form(`IF_LARGEJMP`):
   ```
     b<rev cond> $LABEL
     b rel_addr (unconditional jump)
   $LABEL:
   ```

2. Load label(address computation). See `emitIns_R_L()`
   a. Short form(`IF_DI_1E`): `adr x, [rel_addr]`
   b. Long form(`IF_LARGEADR`):
   ```
      adrp x, [rel_page_addr]
      add x, x, page_offs
   ```

3. Load constant (from JIT data). See `emitIns_R_C()`
   a. Short form(`IF_LS_1A`): `ldr x, [rel_addr]`
   b. Long form(`IF_LARGLDC`):
   ```
      adrp x, [rel_page_addr]
      ldr x, [x, page_offs]
     (fmov v, x in case loading vector constant)
   ```

In addition, JIT data is aligned on 8 byte to be accessible from large
load. Replaced JitLargeBranches by JitLongAddress to test stress on these
operations.

8 years agoFix the optimization check to call ordinal
Tarekm Mahmoud Sayed [Wed, 11 May 2016 17:38:21 +0000 (10:38 -0700)]
Fix the optimization check to call ordinal

we have some optimization to check if we can perform the string search as ordinal
operation instead of lingustic operation. we used to check if the string is Ascii
which check if all chars in the string are in range 0~7F.
This check was not enough because in Linux, ICU do some special handling for some
characters in the Ascii range. so we need to avoid calling the ordinal operation
when encountering such chracters.
The fix is to take the advantage of String.IsFastSort which do exactly what we need

8 years agoMerge pull request #4917 from LLITCHEV/Issue2329
Lubomir Litchev [Thu, 12 May 2016 02:10:31 +0000 (19:10 -0700)]
Merge pull request #4917 from LLITCHEV/Issue2329

Increase timeout for GCStress jobs. Set the gcstress15_pri1r2r to be a

8 years agoRemove the use of `CROSSGEN_COMPILE` in jitconfigvalues.h.
Pat Gavlin [Wed, 11 May 2016 22:18:54 +0000 (15:18 -0700)]
Remove the use of `CROSSGEN_COMPILE` in jitconfigvalues.h.

This symbol was previously used to ensure that noway failures did not trigger
debugger breaks when running non-release builds of the JIT in crossgen on the
desktop CLR. We believe that this behavior is no longer necessary nor desirable.

8 years agoMerge pull request #4916 from BruceForstall/TweakLongs
Bruce Forstall [Wed, 11 May 2016 22:23:37 +0000 (15:23 -0700)]
Merge pull request #4916 from BruceForstall/TweakLongs

Small tweaks to RyuJIT/x86 LONG handling

8 years agoIncrease timeout for GCStress jobs. Set the gcstress15_pri1r2r to be a
Lubomir Litchev [Wed, 11 May 2016 18:46:31 +0000 (11:46 -0700)]
Increase timeout for GCStress jobs. Set the gcstress15_pri1r2r to be a
GCStress job.

8 years agoAvoid following symlinks in PAL move/delete functions.
Aditya Mandaleeka [Wed, 11 May 2016 22:08:36 +0000 (15:08 -0700)]
Avoid following symlinks in PAL move/delete functions.

8 years agoMerge pull request #4809 from ramarag/ZapUnwindInfo
Rama krishnan Raghupathy [Wed, 11 May 2016 21:15:11 +0000 (14:15 -0700)]
Merge pull request #4809 from ramarag/ZapUnwindInfo

[Arm64]: Implement GetUnwindDataBlob

8 years agoMerge pull request #1241 from mikedn/modopt
Bruce Forstall [Wed, 11 May 2016 18:39:04 +0000 (11:39 -0700)]
Merge pull request #1241 from mikedn/modopt

Extend the DIV/MOD dividend into RDX:RAX only if needed

8 years agoMerge pull request #4762 from geoffkizer/ecsopt
Geoff Kizer [Wed, 11 May 2016 18:29:50 +0000 (11:29 -0700)]
Merge pull request #4762 from geoffkizer/ecsopt

Optimize async invocation

8 years agoMerge pull request #4848 from mikedn/lsra-counts
Carol Eidt [Wed, 11 May 2016 18:21:07 +0000 (11:21 -0700)]
Merge pull request #4848 from mikedn/lsra-counts

Remove unnecessary LSRA members

8 years agoSmall tweaks to RyuJIT/x86 LONG handling
Bruce Forstall [Wed, 11 May 2016 17:35:47 +0000 (10:35 -0700)]
Small tweaks to RyuJIT/x86 LONG handling

1. Display GT_LONG trees in JitDump as gt_long, not just "long". This
helps distinguish them from the pervasive "long" type, making them easier
to see and search for.
2. Change the "hi" operator GT_* node definition to not include GTK_EXOP.
3. Dump the lva table after lvaPromoteLongVars().

8 years agoMerge pull request #4890 from AlexGhiondea/BuildRefAssemblyPerTargetOS
Wes Haggard [Wed, 11 May 2016 17:22:29 +0000 (10:22 -0700)]
Merge pull request #4890 from AlexGhiondea/BuildRefAssemblyPerTargetOS

Fix the reference assembly for mscorlib to match the surface area of the OS

8 years agoMerge pull request #4903 from BruceForstall/MoveToLegacy
Bruce Forstall [Wed, 11 May 2016 17:13:06 +0000 (10:13 -0700)]
Merge pull request #4903 from BruceForstall/MoveToLegacy

Move some LEGACY_BACKEND code to codegenlegacy.cpp

8 years agoMerge pull request #4900 from BruceForstall/PartialFix4817c
Bruce Forstall [Wed, 11 May 2016 17:12:39 +0000 (10:12 -0700)]
Merge pull request #4900 from BruceForstall/PartialFix4817c

Fix kill set of rep stos to include ECX

8 years agoMerge pull request #4895 from tijoytom/master
tijoytom [Wed, 11 May 2016 16:57:46 +0000 (09:57 -0700)]
Merge pull request #4895 from tijoytom/master

Cleaning up a bunch of warnings.

8 years agoMerge pull request #4898 from dotnet-bot/from-tfs
Jan Kotas [Wed, 11 May 2016 11:17:04 +0000 (04:17 -0700)]
Merge pull request #4898 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoLinux/ARM: Use -O1 level to avoid segfault in release-build for Linux/ARM (#4904)
Geunsik Lim [Wed, 11 May 2016 08:44:36 +0000 (17:44 +0900)]
Linux/ARM: Use -O1 level to avoid segfault in release-build for Linux/ARM (#4904)

We cannot still run 'hello world' console application even though
the cross compilation of CoreCLR is successfully completed.
In release-build, the segmentation fault of 'hello world'
is made by the misalignment of thread local storage (TLS) section
because of the aggressive optimization level of clang compiler for
code optimization(e.g., file size and execution speed).
It means that Clang/LLVM has a bug in case of the usage of O2/O3 flag.

Below is the major difference among the optimization levels of Clang.
* -O2 is based on -O1:
  .adding: -gvn -constmerge -globaldce -slp-vectorizer -mldst-motion -inline
  .removing: -always-inline
* -O3 is based on -O2:
  .adding: -argpromotion

ver2:
- Corerun is loading 'libcoreclr.so' using dlopen() library call. So, we can not
  use initial-exec TLS model (ver1) because of the thread-safe issue of
  the multi-threaded. (Reported by @janvorli)
- In the release-build, Let's replace -O3 with -O1 to avoid the segmentation
  fault due to the aggressive optimization level of the Clang until fixing
  the bug of the Clang/LLVM.

ver1:
- The default value of clang is "global-dynamic". However, the thread-local
storage (TLS) model of Clang/LLVM does not guarantee the normal execution
of TLS's symbol relocation due to the misaligned __tls_get_addr symbol in
case of the aggressive optimizations of Clang on Linux/ARM.
- Let's enable initial-exec TLS model instead of the dynamic TLS model.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
CC: Jan Kotas <jkotas@microsoft.com>
CC: Jan Vorlicek <janvorli@microsoft.com>