Draft
Remove calli target tagging from CoreCLR interop stubs#131642
Conversation
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 6 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
jkotas
reviewed
Jul 31, 2026
jkotas
reviewed
Jul 31, 2026
Copilot created this pull request from a session on behalf of
jkotas
July 31, 2026 13:15
View session
Contributor
|
Tagging subscribers to this area: @agocke |
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
This was referenced Jul 31, 2026
jkotas
reviewed
Jul 31, 2026
jkotas
reviewed
Jul 31, 2026
| // If the stub parameter value is not needed, m_Datum will be initialized by the VM. | ||
| // CALLI stubs use the secret stub argument directly as the unmanaged target, so they leave m_Datum | ||
| // unused and keep the target only in the secret stub argument slot. | ||
| if (m_compiler->info.compPublishStubParam) |
jkotas
reviewed
Jul 31, 2026
| @@ -2100,12 +2100,11 @@ class InlinedCallFrame : public Frame | |||
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
jkotas
reviewed
Aug 1, 2026
jkotas
reviewed
Aug 1, 2026
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
jkotas
reviewed
Aug 2, 2026
| return true; | ||
| } | ||
|
|
||
| case NI_System_StubHelpers_SetNextCallFrameMethodDesc: |
jkotas
reviewed
Aug 2, 2026
Comment on lines
+7032
to
+7036
| if (m_compiler->info.compPublishStubParam && call->HasInlinedCallFrameMethodDesc()) | ||
| { | ||
| src = m_compiler->gtNewLclvNode(call->GetInlinedCallFrameMethodDescLclNum(), TYP_I_IMPL); | ||
| } | ||
| else if (m_compiler->opts.jitFlags->IsSet(JitFlags::JIT_FLAG_PUBLISH_STUB_PARAM_ICF_MD)) |
Member
There was a problem hiding this comment.
Suggested change
| if (m_compiler->info.compPublishStubParam && call->HasInlinedCallFrameMethodDesc()) | |
| { | |
| src = m_compiler->gtNewLclvNode(call->GetInlinedCallFrameMethodDescLclNum(), TYP_I_IMPL); | |
| } | |
| else if (m_compiler->opts.jitFlags->IsSet(JitFlags::JIT_FLAG_PUBLISH_STUB_PARAM_ICF_MD)) | |
| if (m_compiler->opts.jitFlags->IsSet(JitFlags::JIT_FLAG_PUBLISH_STUB_PARAM_ICF_MD)) |
Contributor
Author
There was a problem hiding this comment.
Fixed in 963f13c.
Note
This reply was generated by GitHub Copilot.
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
jkotas
reviewed
Aug 2, 2026
| CORJIT_FLAG_SOFTFP_ABI = 30, // Enable armel calling convention | ||
| #endif | ||
| CORJIT_FLAG_USE_DISPATCH_HELPERS = 31, // The JIT should use helpers for interface dispatch instead of virtual stub dispatch | ||
| CORJIT_FLAG_PUBLISH_STUB_PARAM_ICF_MD = 32, // JIT should publish the stub secret param in InlinedCallFrame.m_Datum for indirect unmanaged calls |
Member
There was a problem hiding this comment.
@copilot Delete this flag. We do not need to set the datum field for shared stubs
jkotas
reviewed
Aug 2, 2026
| 0xe1ec, | ||
| 0x4f52, | ||
| {0xa1, 0xbf, 0xf9, 0x19, 0x90, 0x8a, 0xa3, 0x3c} | ||
| constexpr GUID JITEEVersionIdentifier = { /* 8445fef6-8ba2-4cd4-bf1a-fa0c0fc276de */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change removes the
(target << 1) | 1encoding previously used for marshaling-required unmanagedcallipaths.MethodDescand unmanaged target handling now follow their actual storage semantics instead of relying on low-bit tagging.Interop stub fast paths
GenericPInvokeCalliHelperon 64-bit architectures.PInvokeStubLinker::DoPInvoke.InlinedCallFramesemanticsInlinedCallFrame::HasFunctionfor non-32-bit targets to treat non-nullm_Datumas a function-bearing frame.m_Datumis still overloaded for indirect-call stack metadata.EH marker cleanup
InlinedCallFrameMarker::ExceptionHandlingHelperhandling to a single low-bit marker.cDAC stack walking
StackWalkframe interpretation to match the new runtime encoding rules.InlinedCallFrameclassification.Example of the removed special-case flow:
Note
This PR description was created by GitHub Copilot.