You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Generate reverse PInvoke transitions in the JIT #611
The JIT needs to generate the following code in prolog/epilog of reverse PInvoke calls. There needs to be a new flag added to JIT-EE interface to mark these methods (e.g. it can be called CORINFO_FLG_NATIVECALLABLE):
<regular prolog – allocate stack frame, spill argument registers, etc.>
ReservePInvokeTransitionFrame frame; // opaque local - the size is returned via JIT-EE interface
lea arg0, &frame
// No managed references can be in registers before the ENTER callout
call JIT_REVERSEPINVOKE_ENTER // new JIT helper
…
<method body>
…
lea arg0, &frame
call JIT_REVERSEPINVOKE_EXIT // new JIT helper
// No managed references can be in registers after the EXIT callout
<regular epilog– setup return value, deallocate stack frame and return, etc.>
None of this exist in RyuJIT today, but there are other prolog/epilog callbacks with similar structure.
Activity
JIT-EE interface changes to support CoreRT
jkotas commentedon Jun 24, 2016
This is done.