Skip to content

Sync with upstream main branch #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 156 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
5906521
[wasm] Fix scenario specific tests (#64800)
maraf Feb 5, 2022
dbd4cbb
Set up an analyzer exception filter to make intermittent failures mor…
jkoritzinsky Feb 5, 2022
d8c0170
Add ActivitySource support to DiagnosticsHandler (#64753)
ManickaP Feb 5, 2022
9086f1e
fix broken outerloop test (#64858)
AndyAyersMS Feb 5, 2022
5b1b341
[mono] Allow missing assemblies in llvmonly+interp mode. (#64294)
vargaz Feb 6, 2022
d936a66
JIT: contained memory safety analysis fixes and improvements (#64843)
AndyAyersMS Feb 6, 2022
ef817df
[mono] Add an 'allow-errors' AOT option. (#64640)
vargaz Feb 6, 2022
aeb7b91
Add support for `TYP_BYREF` `LCL_FLD`s to VN (#64501)
SingleAccretion Feb 6, 2022
db1bbf4
Fix link in readytorun-format.md (#64878)
AustinWise Feb 6, 2022
207f2b6
Mark promoted SIMD locals used by HWIs as DNER (#64855)
SingleAccretion Feb 6, 2022
3610ac1
Fix operator precedence consistency in ASCIIUtility.GetIndexOfFirstNo…
akoeplinger Feb 6, 2022
2a5602d
JIT: clear lvMustInit from dependent locals (#64877)
AndyAyersMS Feb 7, 2022
3c43ef6
Delete ReflectionModule::m_pCreatingAssembly and PEAssembly::m_creato…
jkotas Feb 7, 2022
c86b338
Propagate exception sets for assignments (#64882)
SingleAccretion Feb 7, 2022
bc9cdd1
Improvements for SpanHelpers.IndexOf (#64872)
EgorBo Feb 7, 2022
af1c2db
Normalize returns after optimizing returned indirs (#64881)
jakobbotsch Feb 7, 2022
179ffff
[mobile] Add extra HttpClientHandler linker substitution (#64818)
steveisok Feb 7, 2022
931b70a
Bump coverlet version to 3.1.2 (#64875)
MarcoRossignoli Feb 7, 2022
71393d0
[mono] Remove OP_FCONV_TO_U opcode (#64618)
uweigand Feb 7, 2022
ec4d084
Explicit test for injecting scoped IServiceProvider (#63225) (#64558)
lord-executor Feb 7, 2022
116ee71
[wasm][debugger] Fixing race condition (#64394)
thaystg Feb 7, 2022
a512284
Improve backport.yml to only check start of line and instructions for…
akoeplinger Feb 7, 2022
805a5e4
Turn off -ffp-contract on Unix (#64847)
am11 Feb 7, 2022
07a7215
Turn off flaky RapidJSON optimization on x64 (#64851)
am11 Feb 7, 2022
ebcd332
Skip System.Net.NetworkInformation.Tests.PingTest.SendPingWithIPAddre…
MaximLipnin Feb 7, 2022
26c7d7d
Move one more 20H2 queue to server 2022 (#64919)
sbomer Feb 7, 2022
2a1b15d
62606 Return fully qualified path from FileSystemEventArgs (#63051)
slask Feb 7, 2022
3e4acf4
vtable setup fix for generic default interface methods in mono runtim…
bholmes Feb 7, 2022
e9a7a3f
Console.Unix: fix missing terminal configuration on SIGINT/SIGQUIT/SI…
tmds Feb 7, 2022
3c8e496
[main] Update dependencies from 8 repositories (#64806)
dotnet-maestro[bot] Feb 7, 2022
c07e3c6
Delete unnecessary entries from ApiCompatBaseline.netcoreapp.netstand…
jkotas Feb 7, 2022
d2e5183
Streamline bool.TryParse/Format (#64782)
stephentoub Feb 7, 2022
cf3aeb1
Add S.S.C.Cose with COSE Sign1 support (#64461)
jozkee Feb 7, 2022
c003339
[Group 2] Enable nullable annotations for `Microsoft.Extensions.Cachi…
maxkoshevoi Feb 7, 2022
c70e282
Preserve existing keys in dictionary (#63834)
mapogolions Feb 7, 2022
48f1ac5
Increase default HostOptions.ShutdownTimeout to 30 seconds (#63712)
ReubenBond Feb 7, 2022
1b34163
Remove spin lock from SocketAsyncEventArgs on Windows (#64770)
stephentoub Feb 8, 2022
8c30c33
[main] Update dependencies from dotnet/linker (#64848)
dotnet-maestro[bot] Feb 8, 2022
8ee59f4
Fix SymbolixRegexRunner handling of "beginning" (#64946)
stephentoub Feb 8, 2022
b11469f
NativeAOT ARM64 libraries testing (#64373)
MichalStrehovsky Feb 8, 2022
012278b
Local heap optimizations on Arm64 (#64481)
echesakov Feb 8, 2022
73a075e
Improve SSL platform detection (#64923)
wfurt Feb 8, 2022
af42c8e
Fix runtime tests on Android (#64950)
akoeplinger Feb 8, 2022
4c662b1
Add user-facing docs and samples for NativeAOT (#64894)
MichalStrehovsky Feb 8, 2022
56fcb74
[Mono] Fix potential crash when handling image load event. (#64908)
lateralusX Feb 8, 2022
e696177
Fix card marking issue (#64748)
PeterSolMS Feb 8, 2022
b256be8
Improve Directory.Move and DirectoryInfo.MoveTo (#63675)
adamsitnik Feb 8, 2022
a24364a
Reduce the cost of creating a MemoryMappedFile (#63790)
adamsitnik Feb 8, 2022
faaa900
[mono] Fix is_byreflike_set on big-endian platforms (#64903)
uweigand Feb 8, 2022
75589ae
Delete StructLayoutAttribute.Pack adjustment (#64965)
jkotas Feb 8, 2022
713c8dd
Take into account zero-offset field sequences when propagating locals…
SingleAccretion Feb 8, 2022
427c203
JIT: fix morph's tree rethreading/recosting logic (#64954)
AndyAyersMS Feb 8, 2022
b305a17
JIT: fix containment safety check in LowerHWIntrinsicGetElement (#64960)
AndyAyersMS Feb 8, 2022
3fc8b09
Add JIT support for control-flow guard on x64 and arm64 (#63763)
jakobbotsch Feb 8, 2022
54c910e
JIT: more stringent interference checks in forward sub (#64933)
AndyAyersMS Feb 8, 2022
567c7c4
Test and comment one-shot CFB8 with extra padding
vcsjones Feb 8, 2022
a702712
Including FastFloat in parsing process (#62301)
CarlVerret Feb 8, 2022
871438f
Temporarily disable core dumps when running libraries tests on macOS …
elinor-fung Feb 8, 2022
97fc0a4
Update Android to r23b image (#64567)
Feb 8, 2022
3ae8739
Initial roll out of !! (#64720)
stephentoub Feb 8, 2022
05dbb13
Add `runtime-wasm` pipeline (#64830)
radical Feb 8, 2022
87777b6
Change the way we build CoreCLR tests for NativeAOT (#64738)
MichalStrehovsky Feb 8, 2022
829fe59
Fix size estimates (#64826)
SingleAccretion Feb 8, 2022
826896f
Use generic collections in System.ComponentModel.TypeConverter implem…
MattKotsenas Feb 8, 2022
da5888a
Fix outerloop build break (#65027)
jakobbotsch Feb 8, 2022
570b8e2
Enable merging of platform-variant tests
trylek Feb 8, 2022
205f70e
Fix System.Runtime reference versions and several test project names …
trylek Feb 8, 2022
49e46e3
Fix error during unwrap existing instance (#64996)
kant2002 Feb 9, 2022
da2df7e
improve SslStream tests on misconfigured systems (#64966)
wfurt Feb 9, 2022
7128a77
update expected exception for cases when all requested TLS versions a…
wfurt Feb 9, 2022
0c28639
Override DictionaryEntry.ToString to match KeyValuePair.ToString (#64…
jeffhandley Feb 9, 2022
c4c1c3a
Disable ILVerify for source build (#64833)
jkotas Feb 9, 2022
f51fe4b
Add a new wrapper `runtime-wasm.yml` to be used from azdo (#65032)
radical Feb 9, 2022
0e1cada
improve SslStream tests on server 2022 (#64968)
wfurt Feb 9, 2022
32111e1
Fix mono native warnings from wasm targets (#64650)
am11 Feb 9, 2022
6c72db8
Run System.Collections instead of System.Runtime tests (#65044)
MichalStrehovsky Feb 9, 2022
e21eacb
Disable SendPingWithHostAndTimeoutAndBuffer tests on OSX (#65055)
elinor-fung Feb 9, 2022
1ac45f5
[wasm] Fix WebSocket tests on NodeJS (#64330)
maraf Feb 9, 2022
50cdcac
[Mono] Add arm64 SIMD intrinsic for Vector64/128 Ceiling and Floor (#…
simonrozsival Feb 9, 2022
50909ba
Consolidate _handshakeBuffer and _internalBuffer in SslStream (#64747)
rzikm Feb 9, 2022
fe24ab3
[main] Update dependencies from dotnet/icu dotnet/xharness dotnet/run…
dotnet-maestro[bot] Feb 9, 2022
baae8fa
Introduce DOTNET_AltJitOS (#64979)
EgorBo Feb 9, 2022
384e78e
[Mono] Add SIMD intrinsics for Vector64/128 ConditionalSelect on Arm6…
simonrozsival Feb 9, 2022
04bb6eb
Pull msquic from official microsoft linux package repository (#65063)
ManickaP Feb 9, 2022
4f2cd55
Move iOS/tvOS simulator runs back to the OSX.1015.Amd64.Open queue (#…
akoeplinger Feb 9, 2022
aaaa2a7
Implement TLS1.3 delayed client cert requests on Linux
rzikm Feb 9, 2022
ac82c68
[Android] Workaround for invalid return value from clock_nanosleep (#…
simonrozsival Feb 9, 2022
e6a340d
Change `OSX.1015.Arm64.Open` to `OSX.1100.Arm64.Open` (former does no…
premun Feb 9, 2022
e48b179
FileSystemWatcher.Unix: use CLOEXEC when initializing an inotify inst…
tmds Feb 9, 2022
9e45de4
Add default method support to virtual statics (#64717)
davidwrighton Feb 9, 2022
55b5c98
fix ping tests on unsupported unix platforms (#65060)
wfurt Feb 9, 2022
ee4640a
stabilize quic tests on server 2022 (#65057)
wfurt Feb 9, 2022
30abc7b
Limit the number of JIT/HardwareIntrinsics/* tests when running under…
echesakov Feb 9, 2022
99452b2
Account for HWI stores in LIR side effects code (#65079)
SingleAccretion Feb 9, 2022
1f48351
Fix Arm64 CFG dispatcher being always disabled (#65095)
AustinWise Feb 9, 2022
bdae9b9
For LclHeap touch a page at [originalSp] not at [originalSp+amount] i…
echesakov Feb 9, 2022
1a2e3c3
Clean up several special tests under JIT/Methodical (#64837)
trylek Feb 9, 2022
bbc766a
Deduplicate several special classes of JIT/Methodical tests (#64842)
trylek Feb 9, 2022
8f9b8ff
Don't throw from RemoteExecutor on SkipTestExceptions (#65105)
MihaZupan Feb 10, 2022
2210b74
JIT: verify containment safety before forming address modes (#65048)
AndyAyersMS Feb 10, 2022
e6349af
Overwrite existing inc file in h2inc (#65113)
am11 Feb 10, 2022
2b862d4
Update Parallel.ForEachAsync.cs (#65009)
theodorzoulias Feb 10, 2022
d85ec4e
Enable set of nullability checks in NativeAOT CoreLib (#64730)
kant2002 Feb 10, 2022
8129e4c
Fix System.Net.NetworkInformation.Tests.PingTest.SendPingToExternalHo…
rzikm Feb 10, 2022
855594f
[main] Update dependencies from dotnet/linker (#64983)
dotnet-maestro[bot] Feb 10, 2022
2f7726e
Clean-up DllImportGenerator packaging infra (#64810)
ViktorHofer Feb 10, 2022
b536fef
[wasm][debugger] Fixed debugger attachment to a project with special …
ilonatommy Feb 10, 2022
3933fc6
[Mono] Add arm64 SIMD intrinsic for Vector64/128 Abs (#65086)
mkhamoyan Feb 10, 2022
cf35d12
issue-22928 Add ImmutableArray Span-based APIs (#61196)
lateapexearlyspeed Feb 10, 2022
68bdfd3
Optimize `StringBuilder.Insert`. (#64922)
teo-tsirpanis Feb 10, 2022
70b2e20
disable TotalMemory2 test from gcstress runs (#65110)
mangod9 Feb 10, 2022
5f0cb44
Fix nullable annotations for MemoryCacheExtensions Set and GetOrCreat…
maxkoshevoi Feb 10, 2022
1f47f0e
Fix RegionInfo creation when using LOCALE_CUSTOM_UNSPECIFIED LCID (#6…
tarekgh Feb 10, 2022
dca4702
Fixing a runtime check and test to match the EnableISA flag behavior …
tannergooding Feb 10, 2022
52ec9fd
Fix too wide memory accesses for nullchecks (#64683)
EgorBo Feb 10, 2022
fea36d8
[mono] Fix support for calls to static virtual methods from gshared c…
vargaz Feb 10, 2022
b2eba58
Fix bool.TryParse/Format on big-endian systems (#65078)
uweigand Feb 10, 2022
43b39c2
Mark cctor tests with RequiresProcessIsolation property (#65036)
trylek Feb 10, 2022
b0e16a1
[wasm] Add exports to workaround emscripten bug (#64807)
radekdoulik Feb 10, 2022
ccd67b0
Move DllImportGenerator to use DisableRuntimeMarshalling for its blit…
jkoritzinsky Feb 10, 2022
7814396
Implement LoadPairVector64 and LoadPairVector128 (#64864)
echesakov Feb 10, 2022
1c80769
[tests][mobile] Enable diagnostic_tracing for mobile runtime tests (#…
mdh1418 Feb 10, 2022
161f13d
Copy propagation tweaking (#64378)
SingleAccretion Feb 10, 2022
5217c21
Removing Unity and StructureMap from DependencyInjection.ExternalCont…
eerhardt Feb 10, 2022
e453794
[wasm] Disable System.Threading.Channels.Tests (#65083)
radical Feb 10, 2022
acbd20e
Update linux-instructions.md for .NET 6/7 (#65160)
WardenGnaw Feb 10, 2022
21747c9
Update RateLimiter queues on cancellation (#64825)
BrennanConroy Feb 10, 2022
b0ec7f8
Fix DacEnumerableHashTable enumerator (#65157)
jkotas Feb 11, 2022
0238a39
Add a few more regex generator malformed input tests (#65159)
stephentoub Feb 11, 2022
1ba0394
Second round of changing null checks to !! (#65108)
stephentoub Feb 11, 2022
49fea67
Remove GeneratedDllImportAttribute.PreserveSig (#65164)
elinor-fung Feb 11, 2022
9293aab
Subtract instead of building the cartesian product in targets (#65123)
ViktorHofer Feb 11, 2022
5861bd9
Avoid InitialTarget in libs tree for CoreLib (#65146)
ViktorHofer Feb 11, 2022
615224c
Fix policheck warnings (#65179)
agocke Feb 11, 2022
65008a9
Update StyleCopAnalyzers to 1.2.0-beta.406 (#65142)
stephentoub Feb 11, 2022
6bf42eb
Add suppressions (#65030)
danmoseley Feb 11, 2022
f3eaf31
JIT: fgMorphModToSubMulDiv should not reorder operands (#65118)
AndyAyersMS Feb 11, 2022
5422e1f
Introduce `GenTreeDebugOperKind` (#64498)
SingleAccretion Feb 11, 2022
bf0492f
[Group 2] Enable nullable annotations for `Microsoft.Extensions.Optio…
maxkoshevoi Feb 11, 2022
8160c23
Avoid using object_gennum for objects that could come from frozen seg…
cshung Feb 11, 2022
77d6833
Move test with expected crash to outerloop (#65114)
elinor-fung Feb 11, 2022
a01be04
Increase arm32/arm64 maximum instruction group size (#65153)
BruceForstall Feb 11, 2022
a44b7c2
Make System.Math/MathF.Truncate an intrinsic (#65014)
MichalPetryka Feb 11, 2022
5d9ef56
Respect source generator projects in slngen (#65124)
ViktorHofer Feb 11, 2022
10aaeef
Add check for Android NDK 23 to AndroidAppBuilder (#65197)
akoeplinger Feb 11, 2022
0b61a12
Record callee saves in patchpoint info (#65196)
AndyAyersMS Feb 11, 2022
550a11d
Use lite ciphers for CNG symmetric one-shots
vcsjones Feb 11, 2022
6df806f
Use static abstract interface methods in SymbolicRegexMatcher (#63546)
stephentoub Feb 11, 2022
58ed181
Use generic math in System.Numerics.Vectors (#60365) (#60905)
Feb 11, 2022
6d8cc6f
[main] Update dependencies from dotnet/arcade dotnet/xharness dotnet/…
dotnet-maestro[bot] Feb 11, 2022
3c5fee9
[Group 3] Enable nullable annotations for Microsoft.Extensions.Option…
maxkoshevoi Feb 11, 2022
5fbd81a
Disable tests using external TLS1.2 server on win7 (#65188)
rzikm Feb 12, 2022
f3b925d
Fix race condition in InteropSyncBlock for ComWrappers map. (#65214)
AaronRobinsonMSFT Feb 12, 2022
a1f0147
Update Maui/Mobile pre.py's and disable android due to AOT Issue (#65…
LoopedBard3 Feb 12, 2022
24ae13f
Inspector wants the content-length set (#65216)
lewing Feb 12, 2022
d90711d
Merge with main from upstream
Feb 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"coverlet.console": {
"version": "3.1.0",
"version": "3.1.2",
"commands": [
"coverlet"
]
Expand All @@ -15,7 +15,7 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "1.0.0-prerelease.22101.2",
"version": "1.0.0-prerelease.22110.1",
"commands": [
"xharness"
]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
if (context.eventName !== "issue_comment") throw "Error: This action only works on issue_comment events.";

// extract the target branch name from the trigger phrase containing these characters: a-z, A-Z, digits, forward slash, dot, hyphen, underscore
const regex = /\/backport to ([a-zA-Z\d\/\.\-\_]+)/;
const regex = /^\/backport to ([a-zA-Z\d\/\.\-\_]+)/;
target_branch = regex.exec(context.payload.comment.body);
if (target_branch == null) throw "Error: No backport branch found in the trigger phrase.";

Expand Down
4 changes: 4 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<InformationalVersion Condition="'$(InformationalVersion)' == '' and '$(VersionSuffix)' != ''">$(ProductVersion)-$(VersionSuffix)</InformationalVersion>
</PropertyGroup>

<ItemGroup>
<SupportedNETCoreAppTargetFramework Include=".NETCoreApp,Version=v$(NETCoreAppMaximumVersion)" DisplayName=".NET $(NETCoreAppMaximumVersion)" Alias="net$(NETCoreAppMaximumVersion)" />
</ItemGroup>

<!-- The Default behavior in VS is to show files for the first target framework in TargetFrameworks property.
This is required to show all the files corresponding to all target frameworks in VS. -->
<ItemGroup Condition="'$(DefaultLanguageSourceExtension)' != '' and
Expand Down
22 changes: 22 additions & 0 deletions THIRD-PARTY-NOTICES.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -1026,3 +1026,25 @@ a. No trademark or patent rights held by Affirmer are waived, abandoned, surrend
b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.


License notice for FastFloat algorithm
-------------------------------------
MIT License
Copyright (c) 2021 csFastFloat authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

40 changes: 40 additions & 0 deletions docs/design/coreclr/botr/clr-abi.md
Original file line number Diff line number Diff line change
Expand Up @@ -752,3 +752,43 @@ The return value is handled as follows:
4. All other cases require the use of a return buffer, through which the value is returned.

In addition, there is a guarantee that if a return buffer is used a value is stored there only upon ordinary exit from the method. The buffer is not allowed to be used for temporary storage within the method and its contents will be unaltered if an exception occurs while executing the method.

# Control Flow Guard (CFG) support on Windows

Control Flow Guard (CFG) is a security mitigation available in Windows.
When CFG is enabled, the operating system maintains data structures that can be used to verify whether an address is to be considered a valid indirect call target.
This mechanism is exposed through two different helper functions, each with different characteristics.

The first mechanism is a validator that takes the target address as an argument and fails fast if the address is not an expected indirect call target; otherwise, it does nothing and returns.
The second mechanism is a dispatcher that takes the target address in a non-standard register; on successful validation of the address, it jumps directly to the target function.
Windows makes the dispatcher available only on ARM64 and x64, while the validator is available on all platforms.
However, the JIT supports CFG only on ARM64 and x64, with CFG by default being disabled for these platforms.
The expected use of the CFG feature is for NativeAOT scenarios that are running in constrained environments where CFG is required.

The helpers are exposed to the JIT as standard JIT helpers `CORINFO_HELP_VALIDATE_INDIRECT_CALL` and `CORINFO_HELP_DISPATCH_INDIRECT_CALL`.

To use the validator the JIT expands indirect calls into a call to the validator followed by a call to the validated address.
For the dispatcher the JIT will transform calls to pass the target along but otherwise set up the call as normal.

Note that "indirect call" here refers to any call that is not to an immediate (in the instruction stream) address.
For example, even direct calls may emit indirect call instructions in JIT codegen due to e.g. tiering or if they have not been compiled yet; these are expanded with the CFG mechanism as well.

The next sections describe the calling convention that the JIT expects from these helpers.

## CFG details for ARM64

On ARM64, `CORINFO_HELP_VALIDATE_INDIRECT_CALL` takes the call address in `x15`.
In addition to the usual registers it preserves all float registers, `x0`-`x8` and `x15`.

`CORINFO_HELP_DISPATCH_INDIRECT_CALL` takes the call address in `x9`.
The JIT does not use the dispatch helper by default due to worse branch predictor performance.
Therefore it will expand all indirect calls via the validation helper and a manual call.

## CFG details for x64

On x64, `CORINFO_HELP_VALIDATE_INDIRECT_CALL` takes the call address in `rcx`.
In addition to the usual registers it also preserves all float registers and `rcx` and `r10`; furthermore, shadow stack space is not required to be allocated.

`CORINFO_HELP_DISPATCH_INDIRECT_CALL` takes the call address in `rax` and it reserves the right to use and trash `r10` and `r11`.
The JIT uses the dispatch helper on x64 whenever possible as it is expected that the code size benefits outweighs the less accurate branch prediction.
However, note that the use of `r11` in the dispatcher makes it incompatible with VSD calls where the JIT must fall back to the validator and a manual call.
5 changes: 3 additions & 2 deletions docs/design/coreclr/botr/readytorun-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ The limitations of the current format are:

# Structures

The structures and accompanying constants are defined in the [readytorun.h]
(https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/readytorun.h) header file.
The structures and accompanying constants are defined in the
[readytorun.h](https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/readytorun.h)
header file.
Basically the entire R2R executable image is addressed through the READYTORUN_HEADER singleton
pointed to by the well-known export RTR_HEADER in the export section of the native executable
envelope.
Expand Down
5 changes: 2 additions & 3 deletions docs/design/specs/Ecma-335-Augments.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ https://www.ecma-international.org/publications-and-standards/standards/ecma-335

(Add second paragraph)

Static interface methods may be marked as virtual. Valid object types implementing such interfaces shall provide implementations
Static interface methods may be marked as virtual. Valid object types implementing such interfaces may provide implementations
for these methods by means of Method Implementations (II.15.1.4). Polymorphic behavior of calls to these methods is facilitated
by the constrained. call IL instruction where the constrained. prefix specifies the type to use for lookup of the static interface
method.
Expand Down Expand Up @@ -531,7 +531,6 @@ or static method actually implemented directly on the type.
(Add to the end of the 1st paragraph)

Interfaces may define static virtual methods that get resolved at runtime based on actual types involved.
These static virtual methods must be marked as abstract in the defining interfaces.

### II.12.2 Implementing virtual methods on interfaces

Expand Down Expand Up @@ -754,7 +753,7 @@ the call itself doesn't involve any instance or `this` pointer.
(Edit bulleted section "This contains informative text only" starting at the bottom of page
233):

Edit section *7.b*: Static | Virtual | !Abstract
Remove section *7.b*: ~~Static | Virtual~~

(Add new section 41 after the last section 40:)

Expand Down
12 changes: 6 additions & 6 deletions docs/workflow/building/coreclr/linux-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ This table of images might often become stale as we change our images as our req

| OS | Target Arch | Image location | crossrootfs location | Clang Version |
| --------------------------- | --------------- | ---------------------------------------------------------------------------------------------------- | -------------------- | ------------- |
| Ubuntu 16.04 | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-a50a721-20191120200116` | - | -clang9 |
| Alpine | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-WithNode-20200602002639-0fc54a3` | - | -clang5.0 |
| CentOS 7 (build for RHEL 7) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-359e48e-20200313130914` | - | -clang9 |
| Ubuntu 16.04 | arm32 (armhf) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-20200413125008-09ec757` | `/crossrootfs/arm` | -clang9 |
| Ubuntu 16.04 | arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-20201022204150-b2c2436` | `/crossrootfs/arm64` | -clang9 |
| Alpine | arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-20200413125008-406629a` | `/crossrootfs/arm64` | -clang9 |
| Alpine | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.13-WithNode-20210910135845-c401c85` | - | -clang5.0 |
| CentOS 7 (build for RHEL 7) | x64 | `mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-20210714125435-9b5bbc2` | - | -clang9 |
| Ubuntu 16.04 (x64, arm ROOTFS) | arm32 (armhf) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-20210719121212-8a8d3be` | `/crossrootfs/arm` | -clang9 |
| Ubuntu 16.04 (x64, arm64 ROOTFS) | arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-20210719121212-8a8d3be` | `/crossrootfs/arm64` | -clang9 |
| Alpine (x64, arm ROOTFS) | arm | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm-alpine-20210923140502-78f7860` | `/crossrootfs/arm64` | -clang9 |
| Alpine (x64, arm64 ROOTFS) | arm64 (arm64v8) | `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-alpine-20210719121212-b2c2436` | `/crossrootfs/arm64` | -clang9 |

Environment
===========
Expand Down
13 changes: 6 additions & 7 deletions docs/workflow/building/coreclr/nativeaot.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ The AOT compiler typically takes the app, core libraries, and framework librarie

The executable looks like a native executable, in the sense that it can be debugged with native debuggers and have full-fidelity access to locals, and stepping information.

The compiler also has a mode where each managed assembly can be compiled into a separate object file. The object files are later linked into a single executable using the platform linker. This mode is mostly used in testing (it's faster to compile this way because we don't need to recompiling the same code from e.g. CoreLib). It's not a shipping configuration and has many problems (requires exactly matching compilation settings, forfeits many optimizations, and has trouble around cross-module generic virtual method implementations).

## Building

- [Install pre-requisites](../../README.md#build-requirements)
- Run `build[.cmd|.sh] clr+libs -rc [Debug|Release] -lc Release` from the repo root. This will restore nuget packages required for building and build the parts of the repo required for general CoreCLR development. Alternatively, instead of specifying `clr+libs`, you can specify `clr.jit+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs` which is more targeted and builds faster. Replace `clr.jit` with `clr.alljits` if you need to crosscompile.
- Run `build[.cmd|.sh] clr+libs -rc [Debug|Release] -lc Release` from the repo root. This will restore nuget packages required for building and build the parts of the repo required for general CoreCLR development. Alternatively, instead of specifying `clr+libs`, you can specify `clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime+libs` which is more targeted and builds faster.
- [NOT PORTED OVER YET] The build will place the toolchain packages at `artifacts\packages\[Debug|Release]\Shipping`. To publish your project using these packages:
- [NOT PORTED OVER YET] Add the package directory to your `nuget.config` file. For example, replace `dotnet-experimental` line in `samples\HelloWorld\nuget.config` with `<add key="local" value="C:\runtimelab\artifacts\packages\Debug\Shipping" />`
- [NOT PORTED OVER YET] Run `dotnet publish --packages pkg -r [win-x64|linux-x64|osx-64] -c [Debug|Release]` to publish your project. `--packages pkg` option restores the package into a local directory that is easy to cleanup once you are done. It avoids polluting the global nuget cache with your locally built dev package.
Expand Down Expand Up @@ -65,15 +67,12 @@ To run all the tests that got built, run `src\tests\run.cmd runnativeaottests [D

To run an individual test (after it was built), navigate to the `artifacts\tests\coreclr\[Windows|Linux|OSX[.x64.[Debug|Release]\$path_to_test` directory. `$path_to_test` matches the subtree of `src\tests`. You should see a `[.cmd|.sh]` file there. This file is a script that will compile and launch the individual test for you. Before invoking the script, set the following environment variables:

* CORE_ROOT=$repo_root\artifacts\tests\coreclr\[Windows|Linux|OSX[.x64.[Debug|Release]\Tests\Core_Root
* RunNativeAot=1
* __TestDotNetCmd=$repo_root\dotnet[.cmd|.sh]
* CORE_ROOT=$repo_root\artifacts\tests\coreclr\[Windows|Linux|OSX].x64.[Debug|Release]\Tests\Core_Root
* CLRCustomTestLauncher=$repo_root\src\tests\Common\scripts\nativeaottest[.cmd|.sh]

`$repo_root` is the root of your clone of the repo.

By default the test suite will delete the build artifacts (Native AOT images and response files) if the test compiled successfully. If you want to keep these files instead of deleting them after test run, set the following environment variables and make sure you'll have enough disk space (tens of MB per test):

* CLRTestNoCleanup=1
Sometimes it's handy to be able to rebuild the managed test manually or run the compilation under a debugger. A response file that was used to invoke the ahead of time compiler can be found in `$repo_root\artifacts\tests\coreclr\obj\[Windows|Linux|OSX].x64.[Debug|Release]\Managed`.

For more advanced scenarios, look for at [Building Test Subsets](../../testing/coreclr/windows-test-instructions.md#building-test-subsets) and [Generating Core_Root](../../testing/coreclr/windows-test-instructions.md#generating-core_root)

Expand Down
4 changes: 2 additions & 2 deletions docs/workflow/testing/libraries/testing-wasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ The following shows how to run tests for a specific library

### Passing arguments to xharness

- `$(WasmXHarnessArgs)` - xharness command arguments
- `$(WasmXHarnessArgsCli)` - xharness command arguments

Example: `WasmXHarnessArgs="--set-web-server-http-env=DOTNET_TEST_WEBSOCKETHOST"` -> becomes `dotnet xharness wasm test --set-web-server-http-env=DOTNET_TEST_WEBSOCKETHOST`
Example: `WasmXHarnessArgsCli="--set-web-server-http-env=DOTNET_TEST_WEBSOCKETHOST"` -> becomes `dotnet xharness wasm test --set-web-server-http-env=DOTNET_TEST_WEBSOCKETHOST`

- `$(WasmXHarnessMonoArgs)` - arguments and variables for mono

Expand Down
3 changes: 3 additions & 0 deletions eng/CodeAnalysis.src.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,9 @@ dotnet_diagnostic.IDE0160.severity = silent
# IDE0161: Convert to file-scoped namespace
dotnet_diagnostic.IDE0161.severity = silent

# IDE0190: Null check can be simplified
dotnet_diagnostic.IDE0190.severity = suggestion

# IDE1005: Delegate invocation can be simplified.
dotnet_diagnostic.IDE1005.severity = suggestion

Expand Down
3 changes: 3 additions & 0 deletions eng/CodeAnalysis.test.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,9 @@ dotnet_diagnostic.IDE0160.severity = silent
# IDE0161: Convert to file-scoped namespace
dotnet_diagnostic.IDE0161.severity = silent

# IDE0190: Null check can be simplified
dotnet_diagnostic.IDE0190.severity = silent

# IDE1005: Delegate invocation can be simplified.
dotnet_diagnostic.IDE1005.severity = silent

Expand Down
3 changes: 2 additions & 1 deletion eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@
<ProjectToBuild Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler.csproj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />
<ProjectToBuild Include="$(CoreClrProjectRoot)nativeaot\BuildIntegration\BuildIntegration.proj" Category="clr" Condition="'$(NativeAotSupported)' == 'true'" />

<ProjectToBuild Condition="'$(TargetArchitecture)' != 'x64' and '$(BuildArchitecture)' == 'x64'" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_crossarch.csproj" Category="clr" />
<ProjectToBuild Condition="'$(NativeAotSupported)' == 'true' and '$(TargetArchitecture)' != '$(BuildArchitecture)'" Include="$(CoreClrProjectRoot)tools\aot\ILCompiler\ILCompiler_crossarch.csproj" Category="clr" />
<ProjectToBuild Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'" Include="$(CoreClrProjectRoot)tools\aot\crossgen2\crossgen2_crossarch.csproj" Category="clr" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+clr.toolstests+'))">
Expand Down
Loading