-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[interp] Add wide data item index static load and stores #59220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
For methods that require more than 64k data items, add a variant stsfld instruction that stores data item indices as 32-bit integers instead of 16-bit. To solve this problem in general, we need wide variants of more opcodes, but for specific (machine generated) methods, a wide stsfld instruction is sufficient. Resolves https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1398069
Tagging subscribers to this area: @BrzVlad Issue DetailsAdd A typical snippet from the method body:
The "wide" opcodes use 32-bit data item indices. Resolves https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1398069
|
For .NET 7.0 we should investigate how to fix this in general - I made an issue #59221. This version that just deals with |
f06ce51
to
3ee598f
Compare
Use stackval_from_data and stackval_to_data instead of memcpy. Don't duplicate code get_data_item_wide_index. Only use the wide opcodes if any of the data item indices of a given instruction need it, not just when the method total number of indices overflows.
3ee598f
to
2683a98
Compare
Ran some local tests always using the wide opcodes and it seems like it's working. But I'd appreciate another look at the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just those last nitpicks
/backport to release/6.0-rc2 |
Started backporting to release/6.0-rc2: https://github.com/dotnet/runtime/actions/runs/1245567304 |
…tores (#59262) Backport of #59220 Add ldsdfld.w and stsfld.w opcodes to the interpreter. These are needed for some machine-generated methods in Android projects that use AndroidX, MAUI, SkiaSharp or other toolkits. The app's Resource::UpdateIdValues can grow to exceed 64k interpreter data items, which means that 16-bit data item indices will roll over. Resolves https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1398069
Add
ldsdfld.w
andstsfld.w
opcodes to the interpreter. These are needed for some machine-generated methods in Android projects that use AndroidX, MAUI, SkiaSharp or other toolkits. The app'sResource::UpdateIdValues
can grow to exceed 64k interpreter data items, which means that 16-bit data item indices will roll over.A typical snippet from the method body:
The "wide" opcodes use 32-bit data item indices.
Resolves https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1398069