[release/6.0-rc2] [interp] Add wide data item index static load and stores (#59262)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Tue, 21 Sep 2021 20:45:00 +0000 (16:45 -0400)
committerGitHub <noreply@github.com>
Tue, 21 Sep 2021 20:45:00 +0000 (16:45 -0400)
commit4689875b63820da31c03ccf07a52e85edcb8ba03
treed8f2b8bd2a116515ef7c333aa609c534df1e0967
parente23bcf2401a6c231a9ff960b4055cdf3f9a78648
[release/6.0-rc2] [interp] Add wide data item index static load and stores (#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
src/mono/mono/metadata/object.c
src/mono/mono/mini/interp/interp.c
src/mono/mono/mini/interp/mintops.def
src/mono/mono/mini/interp/mintops.h
src/mono/mono/mini/interp/transform.c