Skip to content

Conversation

yowl
Copy link
Contributor

@yowl yowl commented Oct 18, 2025

No description provided.

pavelsavara and others added 30 commits May 22, 2025 19:35
…(#115900)

ldind and stind are actually aliases for ldobj and stobj according to ecma. We already have helper code for generating appropriate intop_xxind opcodes based on type, so I just reused those helpers to generate the appropriate interpreter opcodes to do the ldobj/stobj. This meant I didn't need to add new opcodes.

cpobj is not covered since as far as i can tell roslyn never generates it. The only way I found to generate it (other than a handwritten IL test) is to use pinvoke marshaling because the marshaling generator will use it. So once we do pinvoke marshaling we'll need cpobj and that's probably the right point in time to add it.
Notable areas improved
- The funclets model uses the vectored exception handler to funnel debug events to the debugger
- FramePointer details for the debugger are inscrutable and weird. I've made it work, but enough of this is driven by subtleties in the stackwalker that I would not be surprised if there are additional issues here
- RtlpGetFunctionEndAddress needs to use a DAC pointer to read the unwind info.
- Funclet prologs for CoreCLR X86 Funclets need to have at least 1 instruction in them so that the Native->IL mapping is correct. Otherwise it gets shadowed by a mapping which says it is a PROLOG instruction. This is probably fixable by allowing an Native -> IL mapping for both the PROLOG as well as the IL offset in the funclet, but a nop here is both easy to generate an unlikely to be a major cost.
- Likewise, EnC frame generation is no longer able to rely on the shadow stack pointer logic injected by EH handling, and needed 1 bit of info not in the current emitted stack information. Notably, that there is synchronized codegen in the method. Instead of modifying the gcinfo to include that data, we just put in fake offsets for where the synchronized region is, and use the existence of any data as a flag in the EnC layout. NOTE: I also removed the general purpose logic to read the synchronized range from the data. The fix for this also needs to fix the runtime behavior around stackwalking, and in another case in the presence of a locallloc instruction in the method.

Contributes to #113985
The store can come from a `STORE_LCL_FLD`, so in reality there is no
relation between the type of the resultLcl and the call type. The code
below handles `STORE_LCL_FLD` correctly, so just remove the assert.
The check in the importer did not take into account that a `LCL_ADDR` of
an implicit byref local will turn into `LCL_VAR` after morph. The async
transformation requires the retbuf to be the address of a local, so
enhance the check to take this into account.

Also switch the `compIsAsync()` check to `call->IsAsync()`. Inside async
functions it is ok for non-async calls to use the normal logic.
* Use sln format for coreclr and corehost

* Update Program.cs
There were no unobserved exceptions in recent HttpStress runs, so it should be OK (and desired) to fail the test run if we detect one.
* Add dotnet to the path for copilot agent

* Update .github/workflows/copilot-setup-steps.yml

Co-authored-by: Copilot <[email protected]>

* Add dependency install step

* Sudo install dependencies + info

---------

Co-authored-by: Copilot <[email protected]>
…offsets between the source and destination. (#115798)

* clean old locations when shifting data inside methoddesc

* better fix

* added a test

* PR feedback

* missing rename
* x86: Implement basic support for unwinding longjmp across managed frames to match x64 behavior

Co-authored-by: Jan Kotas <[email protected]>
Delete unnecessary version check
* Add missing overrides for IsCollectible
* Add basic IsCollectible test cases for all reflection types

Co-authored-by: Jan Kotas <[email protected]>
This can be forwarded into an overlapping byref temp, which is invalid
IR.

We could look for that condition specifically, but that's more complex. Do the
simple thing for now and skip forward substituting trees containing async calls.
In the future when we have async contexts in SPMI collections we can try the
more precise check and see if it makes a difference.

The opposite might also be possible: forward substituting a TYP_BYREF
into a tree with an async call. However, I am not 100% sure that can
create overlapping lifetimes, so let's wait and see if Fuzzlyn comes up
with an example.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix Creating Undermined Culture

* Update src/libraries/System.Private.CoreLib/src/System/Globalization/CultureData.cs

Co-authored-by: Copilot <[email protected]>

* Update to work on OSX

* restore removed empty line

* Feedback

---------

Co-authored-by: Copilot <[email protected]>
* Support out of proc Histogram Base 2 Exponential aggregation

* Update src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/Base2ExponentialHistogramAggregator.cs

Co-authored-by: Copilot <[email protected]>

* ensure scale in range

* Feedback addressing 1

* Explicity write "Copyright"

* Apply suggestions from code review

Co-authored-by: Reiley Yang <[email protected]>

* Update src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/Metrics/CircularBufferBuckets.cs

Co-authored-by: Reiley Yang <[email protected]>

* Address the feedback

* fix issue causing failing test

* Refactor metric outer loop tests to separate projects to avoid timeout issues

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Reiley Yang <[email protected]>
* Change win-x86 configuration to build with FEATURE_EH_FUNCLETS

* Update CLR ABI document

* Bump R2R version

* Update JIT-EE interface GUID

* Report funclet prologs and epilogs as no-GC regions in x86 GC info

* Fix isFilterFunclet code path in EnumGcRefsX86

* Implement ShouldParentToFuncletUseUnwindTargetLocationForGCReporting code path on x86

* Fix hasReversePInvoke condition not to trigger when unwinding from funclet

* Cleanup usages of WantsReportOnlyLeaf
…time (#115926)

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: pavelsavara <[email protected]>
* [coreclr][wasm] Make clr.runtime+libs build on Windows

* Try to enable windows build of wasm coreclr

* More things required to do the right things on windows

---------

Co-authored-by: Steve Pfister <[email protected]>
* Delete FEATURE_DOUBLE_ALIGNMENT_HINT for allocations

This optimization is no longer relevant on current x86 hardware. The performance penalty for misaligned memory access is negligible compared to what it used to be.

Fixes #101284

* Delete tests that are no longer applicable
* add HttpMethod.Query

* docs: add comment for the query method

* test: update tests for query method
… (#115658)

* ilasm grammar

* ildasm

* Use newString helper function

* More fixes

* Regenerate grammar

* Add tests for unquoted identifiers

* Use live-built ilasm for tests

* Fix tests
BrzVlad and others added 29 commits June 6, 2025 15:45
…l branches (#116367)

There was a bug leading to adding of conversion in a different basic block. This also simplifies code a little bit. Backport of corresponding mono fix.
BRANCH26 relocs were handled by seeing if we can fit a relative offset
to the actual target in the instruction, and if so, doing that.
Otherwise we would hardcode a jump to the end of the code.

It turns out that outside macOS we never hit the former case, so we
always hardcode a jump to the end of the code section. That makes
diffing work outside macOS.

On macOS, it happens rarely that the target (that comes from the
original SPMI collection) is actually within range of the code that was
allocated during SPMI replay. When that happens we end up with a two
different immediates provided to the instruction by the base and the
diff compilers, and hence diffing fails.

Now, `NearDiffer::compareOffsets` actually has code that tries to
compensate for relative offsets like this, by seeing if the absolute
offset computed by "address + instrLen + immediate" is the same for the
base and the diff compilers. However, it turns out that LLVM does not
scale the immediate in the b/bl instruction representation. So for the
above to work, it would actually need to be something like `instrLen +
immediate << 2`. We could do that, but it seems better to align this
with x64, which just skips all of the troubles by hardcoding the lower
bits of the absolute offsets as if it was the relative offset.
* arm64: Implement missing SVE extract methods
* Fixes #115336

* Remove asserts & align intrinsic definitions

* Remove HasRMWSemantics from ExtractAfterLastActiveElementScalar
* SVE2 API for AbsoluteDifferenceWideningLower

Change-Id: Icac84e1e730993dbbcafe186b4e597c8536d4e58

* SVE2 API for AbsoluteDifferenceWideningUpper

Change-Id: Ide6440ac0753e046ca47ad77769a179996cb1809

* Renaming variable in test template

Change-Id: Idd85d335a9e46b002728699725bd1b4316e6f7fe
* Use vrange for Vector.Max if available

* Use fixup

* Jit formatting

* Same optimization for Min

* Rebase and make modifications from review.

* Make call to EvaluateBroadcastInPlace not ambiguous

---------

Co-authored-by: Alex Covington (Advanced Micro Devices <[email protected]>
…n (#116347)

Single-file scenarios that bundle additional content (via non-default bundling options) extract to a directory at run time. For tests that redirect the extraction root, we delete the extraction directory. However, for tests that use the default extraction root ($HOME/.net, <getpwuid>/.net, or %TMP%/.net), we do not. Especially for self-contained, this can result in a lot of extracted files left over by the test run.

- Update `BundledAppWithSubDirs` tests to delete the extraction directory used by the tests case
- Add assertions for expected new or reused extraction
- Make `NativeLibraries` specify the extraction root instead of using the default
- Move tests for app launch failure out of `BundledAppWithSubDirs` to `AppLaunch` test class.
* allow any baseline intrinsics in JIT

* formatting

* remove IsBaselineSimdIsaSupported

* update comments
dotnet/runtime#99576 changed the host to first
resolve symlinks before resolving the application directory. This means
that relative loads happen relative to the pointed-at file, not the
symbolic link. This was a breaking change made to match the symbolic
link behavior on all platforms.

Unfortunately, it seems a number of users have taken a dependency on the
Windows-specific behavior. This PR reverts the change and puts back in
place the old Windows behavior.
* Update InstructionSetDesc and regenerate code for approved but NYI xarch isas

* Add base JIT and VM support for the new xarch ISAs

* Define the new AVX512 instructions to be exposed

* Reduce the xarch ISA support matrix by combining bits where reasonable

* Ensure lzcnt and movbe can still be opportunistically used by NAOT/R2R

* Fixing up tests to match the adjusted implications

* Ensure the naot smoke test validates X86Base correctly

* Ensure NAOT continues working with lzcnt/movbe
…116374)

* Revert "Delete LOADEDMODULES cache (#116126)"

This reverts commit 7a06f23.

* Revert caching by file name path

* Additional cleanup
These annotations were used by prefast plugin that analyzed contract consistency. This prefast plugin is not coming back.
* Replace with bool[] in GC layout

* Cleanup empty layout input

* Cleanup _isReferenceTypeGCLayout

* Use Array.Empty
Add `matchAny: true` to the policy. This will make sure that the policy does not triggers on empty PR and the policy triggers if the PR contains any *ILLink* files

Co-authored-by: Copilot <[email protected]>
* Delete extra layer of metadata APIs
* Delegate extra layer of coreclr directory caching

Co-authored-by: Aaron Robinson <[email protected]>
Check if there are block preds that are not in phi preds if initial phi-inference succeeds.

Also add the ability to dump the flow graph via hash.

Fixes #116212.
* remove x86 ICF special handling

* remove unused check
Add basic support for shared generics to the interpreter
- Handle shared generics calling convention details for the newobj, and call opcodes
- Swap over to using `getCallInfo` on the jit interface to get information about how a call should be handled
- Add new instructions to resolve a generic dictionary lookup (generic.method, generic.class, generic.this)
- Add new instructions `ldtoken.var` and `newobj.var` which can use the result of a generic dictionary lookup. These are variants on `ldtoken` and `newobj` instructions.
  - we will eventually need variants for `newarr`, `box`, `unbox.any`, `unbox`, `call.helper.pp` and `call.helper.pp2`
- Rework how call opcodes work so that it uses GetMultiCallableAddrOfCode for dispatch instead of the NativeCode on a method, and stop re-using the NativeCode field for interpreter things, and instead add a new field to `MethodDesc` for that. This made it simple to enable support for string constructors.
- Also some drive by improvements to improve diagnostics. Notably `startIp` now  points at a strongly typed struct which allows much easier examination of the interpreter stack using the debugger.

This doesn't implement all of the various forms of generic call, but it shows the basics are working
@yowl yowl closed this Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.