Skip to content

[clr-interp] Implement intrinsics for startup path - #117263

Merged
kotlarmilos merged 15 commits into
dotnet:mainfrom
kotlarmilos:feature/coreclr-interp-startup-path
Jul 15, 2025
Merged

[clr-interp] Implement intrinsics for startup path#117263
kotlarmilos merged 15 commits into
dotnet:mainfrom
kotlarmilos:feature/coreclr-interp-startup-path

Conversation

@kotlarmilos

@kotlarmiloskotlarmilos commented Jul 3, 2025

Copy link
Copy Markdown
Member

Description

The goal is to identify and implement additional missing intrinsics used during startup.

This PR implements missing intrinsics for the startup path. It builds on changes from #116769 and #116924 which fixed conv opcodes and introduced scaffolding for intrinsic handling. This PR is a follow-up to mentioned PRs and will not be merged until those are merged.

Changes

  • Implemented StaticsHelpers.VolatileReadAsByref
  • Implemented Interlocked.CompareExchange
  • Implemented RuntimeHelpers.GetMethodTable
  • Implemented MemoryMarshal.GetArrayDataReference
  • Implemented RuntimeHelpers.IsReferenceOrContainsReferences

Tasks

  • Add tests

Run a sample desktop app using the following environment variables:

 "DOTNET_Interpreter" : "*!*",
"DOTNET_ReadyToRun" : "0"

@github-actionsgithub-actionsBot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 3, 2025
@kotlarmiloskotlarmilos added area-CodeGen-Interpreter-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jul 3, 2025
@kotlarmiloskotlarmilos added this to the 10.0.0 milestone Jul 3, 2025
@kotlarmiloskotlarmilos added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jul 3, 2025
Comment threadsrc/coreclr/vm/interpexec.cpp Outdated
Comment threadsrc/coreclr/interpreter/compiler.cpp
@kotlarmilos
kotlarmilos marked this pull request as ready for review July 10, 2025 11:06
@kotlarmiloskotlarmilos removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jul 10, 2025

@janvorlijanvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Comment threadsrc/coreclr/interpreter/eeinterp.cpp Outdated
Comment threadsrc/coreclr/interpreter/intops.def Outdated
Comment threadsrc/coreclr/vm/interpexec.cpp Outdated
Comment threadsrc/coreclr/interpreter/compiler.cpp
Comment threadsrc/coreclr/interpreter/compiler.cpp Outdated
Comment threadsrc/coreclr/interpreter/compiler.cpp
Comment threadsrc/coreclr/interpreter/intops.def Outdated
@kg

kg commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

other than my comments and jan's, LGTM, thanks!

Comment threadsrc/coreclr/vm/interpexec.cpp Outdated
- Updated EmitNamedIntrinsicCall to include emitMemBarrier parameter.
- Replaced INTOP_METHODTABLE with INTOP_GETMETHODTABLE in EmitNamedIntrinsicCall
- Introduced INTOP_NULLCHECK operation in intops.def and implemented its handling in the interpreter
- Removed debug print statements from compileMethod
- Added tests
Comment threadsrc/coreclr/interpreter/intrinsics.cpp Outdated
Comment threadsrc/coreclr/interpreter/compiler.cpp Outdated
Comment threadsrc/coreclr/interpreter/intrinsics.cpp Outdated
@kotlarmilos

Copy link
Copy Markdown
MemberAuthor

/ba-g android timeouts

@kotlarmilos
kotlarmilos merged commit 6ac6c21 into dotnet:mainJul 15, 2025
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 15, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@kotlarmilos@kg@BrzVlad@jkotas@janvorli