Fix GCStress coverage for multi reg returns. (dotnet/coreclr#24826)
* Extract ReplaceInstrAfterCall.
* Avoid GCStress when return multireg with pointers.
Determinate when we need to protect the second register and do not cause GCStress in such cases.
* Add a repro test.
* Reenable MethodImplOptionsTests.
* Extract IsGcCoveregeInterruptInstruction.
That changes how we do checks for arm32 in `IsGcCoverageInterrupt`.
* Tolerate direct call to JIT_RareDisableHelper.
x86 ILStubClass:IL_STUB_PInvoke(byref,ref,int,byref):int generates it like:
Generating: N119 ( 4, 7) [000118] ------------ * RETURNTRAP int REG NA
IN0021: cmp dword ptr [0F9BF9F8H], 0
New Basic Block BB10 [0009] created.
IN0022: je L_M6496_BB10
Call: GCvars=
00000001 {V01}, gcrefRegs=
00000000 {}, byrefRegs=
00000000 {}
IN0023: call CORINFO_HELP_STOP_FOR_GC
* Support GC stress protect return 1/2/both Unix x64.
* Fix arm64.
Do not insert GC Stress instrucitons when we can't determinate the exact return kind.
* Fix review1.
* Fix review2.
* Change the test as Andy suggested.
* Fix some typos.
* Replace all SLOT with PBYTE.
* Disable assert that can fail because of multithreading.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3dd303f0004ed4771bc29167df30efda07e4cf7e