Remove Wrapper delegate kind; switch ARM32 VSD hidden arg to R12 and fix ARM32 fail-path register preservation#129403
Remove Wrapper delegate kind; switch ARM32 VSD hidden arg to R12 and fix ARM32 fail-path register preservation#129403Copilot wants to merge 5 commits into
Conversation
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
|
@copilot Remove all wrapper handling code from |
|
|
||
| CORINFO_CONST_LOOKUP instParamLookup; | ||
|
|
||
| bool wrapperDelegateInvoke; |
There was a problem hiding this comment.
@copilot This is JIT/EE interface change. You need to rev the JIT/EE interface GUID.
There was a problem hiding this comment.
Updated in commit cdd573d by revving JITEEVersionIdentifier in src/coreclr/inc/jiteeversionguid.h to match the JIT/EE interface change.
| @@ -1701,7 +1701,6 @@ private void getCallInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_RESO | |||
| pResult->sig.flags |= CorInfoSigInfoFlags.CORINFO_SIGFLAG_FAT_CALL; | |||
| } | |||
|
|
|||
There was a problem hiding this comment.
Fixed in 4611ce1 by removing the extra blank line.
| StubArrayOp = 9, | ||
| StubMulticastDelegate = 10, | ||
| StubWrapperDelegate = 11, | ||
| // 11 was StubWrapperDelegate |
There was a problem hiding this comment.
@copilot The cDAC contract is not stable yet. You can delete the unused value from here and cDAC.
There was a problem hiding this comment.
Done in 4611ce1. Removed the unused ILStubType value and renumbered the remaining values in the runtime-side contract enum.
| ILSTUB_UNBOXINGILSTUB = 0x80000005, | ||
| ILSTUB_INSTANTIATINGSTUB = 0x80000006, | ||
| ILSTUB_WRAPPERDELEGATE_INVOKE = 0x80000007, | ||
| // 0x80000007 was ILSTUB_WRAPPERDELEGATE_INVOKE |
|
@copilot Remove all wrapper handling code from MulticastDelegate.CoreCLR.cs too. |
|
Tagging subscribers to this area: @agocke |
|
|
||
| // ------------------------------------------------------------------ | ||
| // void ResolveWorkerAsmStub(r0, r1, r2, r3, r4:IndirectionCellAndFlags, r12:DispatchToken) | ||
| // void ResolveWorkerAsmStub(r0, r1, r2, r3, r12:IndirectionCellAndFlags, r4:DispatchToken) |
There was a problem hiding this comment.
@copilot r4 won't work here. It is callee saved register. This will need to use stack instead.
There was a problem hiding this comment.
Updated in 4611ce1. The fail path now preserves callee-saved r4 by saving/restoring it on the stack while using it as scratch.
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>
| // The delegate may be put into a wrapper delegate if our target method requires it. This local | ||
| // will always hold the real (un-wrapped) delegate. | ||
| DELEGATEREF refRealDelegate = NULL; | ||
| DELEGATEREF refRealDelegate = *pRefThis; |
There was a problem hiding this comment.
Rename the local since *pRefThis is always the real one now.
|
There seem to be tons of test failures on arm32 currently. |
CoreCLR’s
Wrapperdelegate kind was retained only to satisfy an ARM32 VSD ABI quirk (r4hidden cell). This change removes that special delegate path by moving ARM32 VSD hidden-parameter passing tor12and deleting wrapper-delegate infrastructure across VM/JIT/AOT/contracts andSystem.Private.CoreLib.ARM32 VSD calling-convention alignment
IndirectionCellAndFlagsinr12and token inr4.REG_R12.Wrapper delegate infrastructure removal
COMDelegate.MulticastDelegate.CoreCLR.cs.Cross-layer contract cleanup
wrapperDelegateInvokeandoffsetOfWrapperDelegateIndirectCellfrom EE/JIT interfaces and SuperPMI agnostic records.jiteeversionguid.hto match the interface change.IL stub enum cleanup
method.hpp,dllimport.h) and corresponding cDAC contract mapping.ARM32 ResolveStub correctness fix
ResolveStub::_failEntryPointto avoid clobberingr12(which now carriesIndirectionCellAndFlags).r4as decrement scratch for_pCounterupdate and preserves callee-savedr4via stack save/restore in the fail path.R2R compatibility boundary
Documentation update
docs/design/coreclr/botr/clr-abi.mdhidden-parameter section: ARM32 VSD hidden parameter is nowR12.