diff options
author | Sergey Andreenko <seandree@microsoft.com> | 2019-06-05 17:25:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-05 17:25:24 -0700 |
commit | 3dd303f0004ed4771bc29167df30efda07e4cf7e (patch) | |
tree | 164a0fdc4a5f66dd3cecac12b1ebf20743ff0535 /src/inc | |
parent | 5d4ff2f11a87d7d434d05e72744946f48e017b11 (diff) | |
download | coreclr-3dd303f0004ed4771bc29167df30efda07e4cf7e.tar.gz coreclr-3dd303f0004ed4771bc29167df30efda07e4cf7e.tar.bz2 coreclr-3dd303f0004ed4771bc29167df30efda07e4cf7e.zip |
Fix GCStress coverage for multi reg returns. (#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.
Diffstat (limited to 'src/inc')
-rw-r--r-- | src/inc/gcinfotypes.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/inc/gcinfotypes.h b/src/inc/gcinfotypes.h index 652ab9fbff..d45b9a6292 100644 --- a/src/inc/gcinfotypes.h +++ b/src/inc/gcinfotypes.h @@ -251,6 +251,12 @@ inline bool IsValidFieldReturnKind(ReturnKind returnKind) return (returnKind == RT_Scalar || returnKind == RT_Object || returnKind == RT_ByRef); } +inline bool IsPointerFieldReturnKind(ReturnKind returnKind) +{ + _ASSERTE(IsValidFieldReturnKind(returnKind)); + return (returnKind == RT_Object || returnKind == RT_ByRef); +} + inline bool IsValidReturnRegister(size_t regNo) { return (regNo == 0) |