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/vm/method.hpp | |
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/vm/method.hpp')
-rw-r--r-- | src/vm/method.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vm/method.hpp b/src/vm/method.hpp index ca2e88fdcc..3122e4e91a 100644 --- a/src/vm/method.hpp +++ b/src/vm/method.hpp @@ -1666,6 +1666,12 @@ private: ReturnKind ParseReturnKindFromSig(INDEBUG(bool supportStringConstructors = false)); public: + // This method is used to restore ReturnKind using the class handle, it is fully supported only on x64 Ubuntu, + // other platforms do not support multi-reg return case with pointers. + // Use this method only when you can't hit this case + // (like ComPlusMethodFrame::GcScanRoots) or when you can tolerate RT_Illegal return. + // Also, on the other platforms for a single field struct return case + // the function can't distinguish RT_Object and RT_ByRef. ReturnKind GetReturnKind(INDEBUG(bool supportStringConstructors = false)); public: |