Improve SuperPMI handling of CORINFO_SIG_INST handle arrays (#46604)
* Improve SuperPMI handling of CORINFO_SIG_INST handle arrays
CORINFO_SIG_INST, used by the CORINFO_SIG_INFO struct, contains
two pointers to arrays of handles. SuperPMI was saving/restoring
these assuming 8-byte pointers. This worked fine for same-bitness
record/playback (although on 32-bit it saved/restored twice as
much data as it should, reading beyond the actual arrays when
saving). However, when recording on 32-bit and replaying on 64-bit,
this didn't work.
Change the CORINFO_SIG_INST recording to record the handle arrays
in a new dense DWORDLONG map, SigInstHandleMap, in "agnostic" format (64-bit pointers),
and store an index into this map to the base of the array. The handle array
can then be serialized/deserialized properly for cross-bitness scenarios.
The map contains only unique array sequences, which is required so when
we look up an array we find the unique map index.
Create helpers for all the CORINFO_SIG_INST related serialization/deserialization/
dump/formatting.
Also, implement record/playback of getExpectedTargetArchitecture().
Added "-simple" option to "mcs -dump" to not print the function name/signature
for a method context. Useful for debugging problems where constructing that
name/signature causes mcs crashes/asserts.
Record on arm, playback on x64, using cross-compiler, now works.
* Change the JIT/EE GUID
The JIT/EE interface hasn't changed, but the SuperPMI data format
has changed incompatibly, so force a recollection that won't be
confused with the old collections.
* Fix non-Windows build
15 files changed: